Repository: valkey-io/valkey
File: src/cluster_migrateslots.c (C)

Code before:
        /* CLUSTER SYNCSLOTS REQUEST-PAUSE */
        clusterCommandSyncSlotsRequestPause(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "paused")) {
        /* CLUSTER SYNCSLOTS PAUSED */
        clusterCommandSyncSlotsPaused(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "request-failover")) {
        /* CLUSTER SYNCSLOTS REQUEST-FAILOVER */
        clusterCommandSyncSlotsRequestFailover(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "failover-granted")) {
        /* CLUSTER SYNCSLOTS FAILOVER-GRANTED */
        clusterCommandSyncSlotsFailoverGranted(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "ack")) {
        /* CLUSTER SYNCSLOTS ACK */
        clusterCommandSyncSlotsAck(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "capa")) {
        /* CLUSTER SYNCSLOTS CAPA <field> [CAPA <field>...] */
        clusterCommandSyncSlotsCapa(c);
        return;
    }
    if (c->slot_migration_job &&
        isSlotMigrationJobInProgress(c->slot_migration_job)) {
        serverLog(LL_WARNING, "Received unknown SYNCSLOTS subcommand from "
                              "slot migration %s. Failing the migration.",
                  c->slot_migration_job->description);
        finishSlotMigrationJob(c->slot_migration_job,
                               SLOT_MIGRATION_JOB_FAILED,
                               "Unknown SYNCSLOTS subcommand used");
        return;
    }
    addReplyErrorObject(c, shared.syntaxerr);
}


Review comment (suggestion):
The word CAPA shouldn't be repeated. (It isn't for REPLCONF CAPA.)

```suggestion
        /* CLUSTER SYNCSLOTS CAPA <field> [<field>...] */
```

Code after:
        /* CLUSTER SYNCSLOTS REQUEST-PAUSE */
        clusterCommandSyncSlotsRequestPause(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "paused")) {
        /* CLUSTER SYNCSLOTS PAUSED */
        clusterCommandSyncSlotsPaused(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "request-failover")) {
        /* CLUSTER SYNCSLOTS REQUEST-FAILOVER */
        clusterCommandSyncSlotsRequestFailover(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "failover-granted")) {
        /* CLUSTER SYNCSLOTS FAILOVER-GRANTED */
        clusterCommandSyncSlotsFailoverGranted(c);
        return;
    }
    if (!strcasecmp(c->argv[2]->ptr, "ack")) {
        /* CLUSTER SYNCSLOTS ACK */
        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 "
                              "slot migration %s. Failing the migration.",
                  c->slot_migration_job->description);
        finishSlotMigrationJob(c->slot_migration_job,
                               SLOT_MIGRATION_JOB_FAILED,
                               "Unknown SYNCSLOTS subcommand used");
        return;
    }
    addReplyErrorObject(c, shared.syntaxerr);
}