Fix a bug of backup/restore (#19585)

Signed-off-by: yhmo <yihua.mo@zilliz.com>

Signed-off-by: yhmo <yihua.mo@zilliz.com>
This commit is contained in:
groot 2022-09-30 17:42:57 +08:00 committed by GitHub
parent 58a9f260ad
commit bbedd4a852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -514,8 +514,9 @@ func (p *BinlogAdapter) getShardingListByPrimaryInt64(primaryKeys []int64,
shardList := make([]int32, 0, len(primaryKeys))
for i, key := range primaryKeys {
// if this entity's timestamp is greater than the tsEndPoint, set shardID = -1 to skip this entity
// timestamp is stored as int64 type in log file, actually it is uint64, compare with uint64
ts := timestampList[i]
if ts > int64(p.tsEndPoint) {
if uint64(ts) > p.tsEndPoint {
shardList = append(shardList, -1)
excluded++
continue
@ -565,8 +566,9 @@ func (p *BinlogAdapter) getShardingListByPrimaryVarchar(primaryKeys []string,
shardList := make([]int32, 0, len(primaryKeys))
for i, key := range primaryKeys {
// if this entity's timestamp is greater than the tsEndPoint, set shardID = -1 to skip this entity
// timestamp is stored as int64 type in log file, actually it is uint64, compare with uint64
ts := timestampList[i]
if ts > int64(p.tsEndPoint) {
if uint64(ts) > p.tsEndPoint {
shardList = append(shardList, -1)
excluded++
continue