mirror of
https://github.com/valkey-io/valkey.git
synced 2026-05-06 05:26:42 -04:00
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 <jkmurphy@google.com> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
This commit is contained in:
@@ -2557,6 +2557,13 @@ void clusterCommandSyncSlotsAck(client *c) {
|
||||
}
|
||||
}
|
||||
|
||||
void clusterCommandSyncSlotsCapa(client *c) {
|
||||
UNUSED(c);
|
||||
/* As of now there are no supported capa fields. We ignore unknown CAPA
|
||||
* fields. */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sent by either the target or the source as a control message for progressing
|
||||
* with slot import. */
|
||||
void clusterCommandSyncSlots(client *c) {
|
||||
@@ -2604,6 +2611,11 @@ void clusterCommandSyncSlots(client *c) {
|
||||
clusterCommandSyncSlotsAck(c);
|
||||
return;
|
||||
}
|
||||
if (!strcasecmp(c->argv[2]->ptr, "capa")) {
|
||||
/* CLUSTER SYNCSLOTS CAPA <field> [<field>...] */
|
||||
clusterCommandSyncSlotsCapa(c);
|
||||
return;
|
||||
}
|
||||
if (c->slot_migration_job &&
|
||||
isSlotMigrationJobInProgress(c->slot_migration_job)) {
|
||||
serverLog(LL_WARNING, "Received unknown SYNCSLOTS subcommand from "
|
||||
|
||||
Reference in New Issue
Block a user