fix: splitable auto_incremental steps should be more than 1 (in case of HA setup) (#14501)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2022-06-22 06:36:32 +08:00
committed by GitHub
parent d94ca385bb
commit 63b9bb0167
+2 -1
View File
@@ -95,7 +95,8 @@ func (t *SSplitTableSpec) newTable(lastRecIndex int64, lastDate time.Time) (*sql
Table: fmt.Sprintf("%s_%d", t.tableName, lastDate.Unix()),
}
if lastRecIndex > 0 {
meta.Start = lastRecIndex + 1
// auto_increment offset should consider HA setup
meta.Start = lastRecIndex + 10000
meta.StartDate = lastDate
}
err := t.metaSpec.Insert(&meta)