Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ private void checkAndPrepareMeta() {
return;
}

// reset next version to visible version + 1 for all partitions
remoteOlapTbl.resetVersionForRestore();

// Reset properties to correct values.
remoteOlapTbl.resetPropertiesForRestore(reserveDynamicPartitionEnable, reserveReplica,
replicaAlloc, isBeingSynced);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,12 @@ public void resetPropertiesForRestore(boolean reserveDynamicPartitionEnable, boo
setColocateGroup(null);
}

public void resetVersionForRestore() {
for (Partition partition : idToPartition.values()) {
partition.setNextVersion(partition.getVisibleVersion() + 1);
}
}

public Status resetIdsForRestore(Env env, Database db, ReplicaAllocation restoreReplicaAlloc,
boolean reserveReplica, String srcDbName) {
// ATTN: The meta of the restore may come from different clusters, so the
Expand Down