feat(cluster): Send number of keys for incoming and outgoing migrations. (#2858)

The number of keys in an _incoming_ migration indicates how many keys
were received, while for _outgoing_ it shows the total number. Combining
the two can provide the control plane with percentage.

This slightly modified the format of the response.

Fixes #2756
This commit is contained in:
Shahar Mike 2024-04-08 21:17:03 +03:00 committed by GitHub
parent 2e00d42fa6
commit b8693b4805
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 62 additions and 40 deletions

View file

@ -343,7 +343,7 @@ def migrate(args):
while True:
sync_status = send_command(target_node, ["DFLYCLUSTER", "SLOT-MIGRATION-STATUS"])
assert len(sync_status) == 1
if sync_status[0].endswith("STABLE_SYNC"):
if "STABLE_SYNC" in sync_status[0]:
break
print("Reached stable sync: ", sync_status)