Skip to content

Commit b90ac09

Browse files
Introduce SYNCSLOTS CAPA for forwards compatibility (#2688)
For now, introduce this and have it do nothing. Eventually, we can use this to negotiate supported capabilities on either end. Right now, there is nothing to send or support, so it just accepts it and doesn't reply. --------- Signed-off-by: Jacob Murphy <[email protected]> Co-authored-by: Viktor Söderqvist <[email protected]> Signed-off-by: Jacob Murphy <[email protected]>
1 parent 68a666c commit b90ac09

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/cluster_migrateslots.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,13 @@ void clusterCommandSyncSlotsAck(client *c) {
25572557
}
25582558
}
25592559

2560+
void clusterCommandSyncSlotsCapa(client *c) {
2561+
UNUSED(c);
2562+
/* As of now there are no supported capa fields. We ignore unknown CAPA
2563+
* fields. */
2564+
return;
2565+
}
2566+
25602567
/* Sent by either the target or the source as a control message for progressing
25612568
* with slot import. */
25622569
void clusterCommandSyncSlots(client *c) {
@@ -2604,6 +2611,11 @@ void clusterCommandSyncSlots(client *c) {
26042611
clusterCommandSyncSlotsAck(c);
26052612
return;
26062613
}
2614+
if (!strcasecmp(c->argv[2]->ptr, "capa")) {
2615+
/* CLUSTER SYNCSLOTS CAPA <field> [<field>...] */
2616+
clusterCommandSyncSlotsCapa(c);
2617+
return;
2618+
}
26072619
if (c->slot_migration_job &&
26082620
isSlotMigrationJobInProgress(c->slot_migration_job)) {
26092621
serverLog(LL_WARNING, "Received unknown SYNCSLOTS subcommand from "

0 commit comments

Comments
 (0)