Skip to content

Commit

Permalink
modify the checkpoint fcv
Browse files Browse the repository at this point in the history
  • Loading branch information
vinllen committed Apr 22, 2020
1 parent c5a5f3c commit a685e1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/redis-shake/checkpoint/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func LoadCheckpoint(dbSyncerId int, sourceAddr string, target []string, authType
var newestOffset int64 = -1
var recRunId string
var recDb int32
var recVersion int
var recVersion = -1
for db := range mp {
log.Infof("DbSyncer[%d] load checkpoint check db[%v]", dbSyncerId, db)
runId, offset, version, err := fetchCheckpoint(sourceAddr, c, int(db), checkpointName)
Expand All @@ -46,8 +46,8 @@ func LoadCheckpoint(dbSyncerId int, sourceAddr string, target []string, authType
}
}

if recVersion < utils.FcvCheckpoint.FeatureCompatibleVersion {
return "", 0, 0, fmt.Errorf("current required configuration version[%v] > input[%v], please upgrade MongoShake to version >= %v",
if recVersion != -1 && recVersion < utils.FcvCheckpoint.FeatureCompatibleVersion {
return "", 0, 0, fmt.Errorf("current required checkpoint version[%v] > input[%v], please upgrade RedisShake to version >= %v",
utils.FcvCheckpoint.FeatureCompatibleVersion, recVersion,
utils.LowestCheckpointVersion[utils.FcvCheckpoint.FeatureCompatibleVersion])
}
Expand Down
2 changes: 1 addition & 1 deletion src/redis-shake/common/fcv.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func CheckFcv(file string, fcv int) (int, error) {
}

if version < fcv {
return version, fmt.Errorf("current required configuration version[%v] > input[%v], please upgrade MongoShake to version >= %v",
return version, fmt.Errorf("current required configuration version[%v] > input[%v], please upgrade RedisShake to version >= %v",
fcv, version, LowestConfigurationVersion[fcv])
}
return version, nil
Expand Down

0 comments on commit a685e1c

Please sign in to comment.