mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat(store): add WaitForStoreVersion API to wait for cluster store replication up to target version
This commit is contained in:
1 parent
c6d0371f15
commit
0f6c03240b
9 files changed
+450
-134
No files matched your search
@@ -446,11 +446,11 @@ func (cc *clusterController) waitStoreSync(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// laggingActors returns target actors whose local version is below the required value, as [have, need].
|
||||
func laggingActors(local, target map[string]int64) map[string][2]int64 {
|
||||
lagging := make(map[string][2]int64)
|
||||
func laggingActors(local, target map[string]uint64) map[string][2]uint64 {
|
||||
lagging := make(map[string][2]uint64)
|
||||
for actor, need := range target {
|
||||
if have := local[actor]; have < need {
|
||||
lagging[actor] = [2]int64{have, need}
|
||||
lagging[actor] = [2]uint64{have, need}
|
||||
}
|
||||
}
|
||||
return lagging
|
||||
|
||||
Reference in new issue
Block a user