Skip to content

Commit

Permalink
Add description for CLI
Browse files Browse the repository at this point in the history
Added a warning about writing requests with replicas option

Signed-off-by: bluayer <[email protected]>
  • Loading branch information
bluayer committed Dec 5, 2024
1 parent 776fc07 commit 0d26b0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/valkey-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,8 @@ static int fetchClusterSlotsConfiguration(client c) {
if (is_fetching_slots) return -1; // TODO: use other codes || errno ?
atomic_store_explicit(&config.is_fetching_slots, 1, memory_order_relaxed);
fprintf(stderr, "WARNING: Cluster slots configuration changed, fetching new one...\n");
fprintf(stderr, "If you are using the --replicas option and sending write requests (set type commands),\nthe requests could not be processed properly.\n");

const char *errmsg = "Failed to update cluster slots configuration";
static dictType dtype = {
dictSdsHash, /* hash function */
Expand Down Expand Up @@ -1495,7 +1497,9 @@ int parseOptions(int argc, char **argv) {
" mode, the key must contain \"{tag}\". Otherwise, the\n"
" command will not be sent to the right cluster node.\n"
" --replicas Enable read from replicas in cluster mode.\n"
" This command must be used with the --cluster option.\n"
" This command must be used with the --cluster option.\n"
" When using this option, it is recommended to use only \n"
" the commands for read requests."
" --enable-tracking Send CLIENT TRACKING on before starting benchmark.\n"
" -k <boolean> 1=keep alive 0=reconnect (default 1)\n"
" -r <keyspacelen> Use random keys for SET/GET/INCR, random values for SADD,\n"
Expand Down

0 comments on commit 0d26b0a

Please sign in to comment.