Skip to content

Commit 45fc482

Browse files
committed
model: add minimal info for active-active table
Signed-off-by: xhe <[email protected]>
1 parent e10a603 commit 45fc482

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pkg/meta/model/table.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ type TableInfo struct {
199199

200200
TTLInfo *TTLInfo `json:"ttl_info"`
201201

202+
// IsActiveActive means the table is active-active table.
203+
IsActiveActive bool `json:"is_active_active"`
204+
// SoftdeleteInfo is softdelete TTL. It is required if IsActiveActive == true.
205+
SoftdeleteInfo *SoftdeleteInfo `json:"softdelete_info"`
206+
202207
// Revision is per table schema's version, it will be increased when the schema changed.
203208
Revision uint64 `json:"revision"`
204209

@@ -1436,3 +1441,16 @@ func (t *TTLInfo) GetJobInterval() (time.Duration, error) {
14361441

14371442
return duration.ParseDuration(t.JobInterval)
14381443
}
1444+
1445+
// SoftdeleteInfo records the Softdelete config.
1446+
type SoftdeleteInfo struct {
1447+
Enable bool `json:"enable"`
1448+
Retention string `json:"retention"`
1449+
JobInterval string `json:"job_interval"`
1450+
}
1451+
1452+
// Clone clones TTLInfo
1453+
func (t *SoftdeleteInfo) Clone() *SoftdeleteInfo {
1454+
cloned := *t
1455+
return &cloned
1456+
}

0 commit comments

Comments
 (0)