Skip to content

Commit 8837c4b

Browse files
huangzhwenjoy-binbin
authored andcommitted
Remove the NONDETERMINISTIC_OUTPUT flag from most CLUSTER sub-commands. (redis#11157)
TLDR: the CLUSTER command originally had the `random` flag, so all the sub-commands initially got that new flag, but in fact many of them don't need it. The only effect of this change is on the output of COMMAND INFO.
1 parent 8aebcd8 commit 8837c4b

17 files changed

+16
-112
lines changed

src/commands.c

Lines changed: 16 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@ struct redisCommandArg SETBIT_Args[] = {
229229
#define CLUSTER_ADDSLOTS_History NULL
230230

231231
/* CLUSTER ADDSLOTS tips */
232-
const char *CLUSTER_ADDSLOTS_tips[] = {
233-
"nondeterministic_output",
234-
NULL
235-
};
232+
#define CLUSTER_ADDSLOTS_tips NULL
236233

237234
/* CLUSTER ADDSLOTS argument table */
238235
struct redisCommandArg CLUSTER_ADDSLOTS_Args[] = {
@@ -246,10 +243,7 @@ struct redisCommandArg CLUSTER_ADDSLOTS_Args[] = {
246243
#define CLUSTER_ADDSLOTSRANGE_History NULL
247244

248245
/* CLUSTER ADDSLOTSRANGE tips */
249-
const char *CLUSTER_ADDSLOTSRANGE_tips[] = {
250-
"nondeterministic_output",
251-
NULL
252-
};
246+
#define CLUSTER_ADDSLOTSRANGE_tips NULL
253247

254248
/* CLUSTER ADDSLOTSRANGE range argument table */
255249
struct redisCommandArg CLUSTER_ADDSLOTSRANGE_range_Subargs[] = {
@@ -298,10 +292,7 @@ struct redisCommandArg CLUSTER_COUNT_FAILURE_REPORTS_Args[] = {
298292
#define CLUSTER_COUNTKEYSINSLOT_History NULL
299293

300294
/* CLUSTER COUNTKEYSINSLOT tips */
301-
const char *CLUSTER_COUNTKEYSINSLOT_tips[] = {
302-
"nondeterministic_output",
303-
NULL
304-
};
295+
#define CLUSTER_COUNTKEYSINSLOT_tips NULL
305296

306297
/* CLUSTER COUNTKEYSINSLOT argument table */
307298
struct redisCommandArg CLUSTER_COUNTKEYSINSLOT_Args[] = {
@@ -315,10 +306,7 @@ struct redisCommandArg CLUSTER_COUNTKEYSINSLOT_Args[] = {
315306
#define CLUSTER_DELSLOTS_History NULL
316307

317308
/* CLUSTER DELSLOTS tips */
318-
const char *CLUSTER_DELSLOTS_tips[] = {
319-
"nondeterministic_output",
320-
NULL
321-
};
309+
#define CLUSTER_DELSLOTS_tips NULL
322310

323311
/* CLUSTER DELSLOTS argument table */
324312
struct redisCommandArg CLUSTER_DELSLOTS_Args[] = {
@@ -332,10 +320,7 @@ struct redisCommandArg CLUSTER_DELSLOTS_Args[] = {
332320
#define CLUSTER_DELSLOTSRANGE_History NULL
333321

334322
/* CLUSTER DELSLOTSRANGE tips */
335-
const char *CLUSTER_DELSLOTSRANGE_tips[] = {
336-
"nondeterministic_output",
337-
NULL
338-
};
323+
#define CLUSTER_DELSLOTSRANGE_tips NULL
339324

340325
/* CLUSTER DELSLOTSRANGE range argument table */
341326
struct redisCommandArg CLUSTER_DELSLOTSRANGE_range_Subargs[] = {
@@ -356,10 +341,7 @@ struct redisCommandArg CLUSTER_DELSLOTSRANGE_Args[] = {
356341
#define CLUSTER_FAILOVER_History NULL
357342

358343
/* CLUSTER FAILOVER tips */
359-
const char *CLUSTER_FAILOVER_tips[] = {
360-
"nondeterministic_output",
361-
NULL
362-
};
344+
#define CLUSTER_FAILOVER_tips NULL
363345

364346
/* CLUSTER FAILOVER options argument table */
365347
struct redisCommandArg CLUSTER_FAILOVER_options_Subargs[] = {
@@ -380,21 +362,15 @@ struct redisCommandArg CLUSTER_FAILOVER_Args[] = {
380362
#define CLUSTER_FLUSHSLOTS_History NULL
381363

382364
/* CLUSTER FLUSHSLOTS tips */
383-
const char *CLUSTER_FLUSHSLOTS_tips[] = {
384-
"nondeterministic_output",
385-
NULL
386-
};
365+
#define CLUSTER_FLUSHSLOTS_tips NULL
387366

388367
/********** CLUSTER FORGET ********************/
389368

390369
/* CLUSTER FORGET history */
391370
#define CLUSTER_FORGET_History NULL
392371

393372
/* CLUSTER FORGET tips */
394-
const char *CLUSTER_FORGET_tips[] = {
395-
"nondeterministic_output",
396-
NULL
397-
};
373+
#define CLUSTER_FORGET_tips NULL
398374

399375
/* CLUSTER FORGET argument table */
400376
struct redisCommandArg CLUSTER_FORGET_Args[] = {
@@ -445,10 +421,7 @@ NULL
445421
#define CLUSTER_KEYSLOT_History NULL
446422

447423
/* CLUSTER KEYSLOT tips */
448-
const char *CLUSTER_KEYSLOT_tips[] = {
449-
"nondeterministic_output",
450-
NULL
451-
};
424+
#define CLUSTER_KEYSLOT_tips NULL
452425

453426
/* CLUSTER KEYSLOT argument table */
454427
struct redisCommandArg CLUSTER_KEYSLOT_Args[] = {
@@ -476,10 +449,7 @@ commandHistory CLUSTER_MEET_History[] = {
476449
};
477450

478451
/* CLUSTER MEET tips */
479-
const char *CLUSTER_MEET_tips[] = {
480-
"nondeterministic_output",
481-
NULL
482-
};
452+
#define CLUSTER_MEET_tips NULL
483453

484454
/* CLUSTER MEET argument table */
485455
struct redisCommandArg CLUSTER_MEET_Args[] = {
@@ -495,10 +465,7 @@ struct redisCommandArg CLUSTER_MEET_Args[] = {
495465
#define CLUSTER_MYID_History NULL
496466

497467
/* CLUSTER MYID tips */
498-
const char *CLUSTER_MYID_tips[] = {
499-
"nondeterministic_output",
500-
NULL
501-
};
468+
#define CLUSTER_MYID_tips NULL
502469

503470
/********** CLUSTER NODES ********************/
504471

@@ -534,10 +501,7 @@ struct redisCommandArg CLUSTER_REPLICAS_Args[] = {
534501
#define CLUSTER_REPLICATE_History NULL
535502

536503
/* CLUSTER REPLICATE tips */
537-
const char *CLUSTER_REPLICATE_tips[] = {
538-
"nondeterministic_output",
539-
NULL
540-
};
504+
#define CLUSTER_REPLICATE_tips NULL
541505

542506
/* CLUSTER REPLICATE argument table */
543507
struct redisCommandArg CLUSTER_REPLICATE_Args[] = {
@@ -551,10 +515,7 @@ struct redisCommandArg CLUSTER_REPLICATE_Args[] = {
551515
#define CLUSTER_RESET_History NULL
552516

553517
/* CLUSTER RESET tips */
554-
const char *CLUSTER_RESET_tips[] = {
555-
"nondeterministic_output",
556-
NULL
557-
};
518+
#define CLUSTER_RESET_tips NULL
558519

559520
/* CLUSTER RESET reset_type argument table */
560521
struct redisCommandArg CLUSTER_RESET_reset_type_Subargs[] = {
@@ -575,21 +536,15 @@ struct redisCommandArg CLUSTER_RESET_Args[] = {
575536
#define CLUSTER_SAVECONFIG_History NULL
576537

577538
/* CLUSTER SAVECONFIG tips */
578-
const char *CLUSTER_SAVECONFIG_tips[] = {
579-
"nondeterministic_output",
580-
NULL
581-
};
539+
#define CLUSTER_SAVECONFIG_tips NULL
582540

583541
/********** CLUSTER SET_CONFIG_EPOCH ********************/
584542

585543
/* CLUSTER SET_CONFIG_EPOCH history */
586544
#define CLUSTER_SET_CONFIG_EPOCH_History NULL
587545

588546
/* CLUSTER SET_CONFIG_EPOCH tips */
589-
const char *CLUSTER_SET_CONFIG_EPOCH_tips[] = {
590-
"nondeterministic_output",
591-
NULL
592-
};
547+
#define CLUSTER_SET_CONFIG_EPOCH_tips NULL
593548

594549
/* CLUSTER SET_CONFIG_EPOCH argument table */
595550
struct redisCommandArg CLUSTER_SET_CONFIG_EPOCH_Args[] = {
@@ -603,10 +558,7 @@ struct redisCommandArg CLUSTER_SET_CONFIG_EPOCH_Args[] = {
603558
#define CLUSTER_SETSLOT_History NULL
604559

605560
/* CLUSTER SETSLOT tips */
606-
const char *CLUSTER_SETSLOT_tips[] = {
607-
"nondeterministic_output",
608-
NULL
609-
};
561+
#define CLUSTER_SETSLOT_tips NULL
610562

611563
/* CLUSTER SETSLOT subcommand argument table */
612564
struct redisCommandArg CLUSTER_SETSLOT_subcommand_Subargs[] = {

src/commands/cluster-addslots.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "slot",

src/commands/cluster-addslotsrange.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "range",

src/commands/cluster-countkeysinslot.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
"command_flags": [
1111
"STALE"
1212
],
13-
"command_tips": [
14-
"NONDETERMINISTIC_OUTPUT"
15-
],
1613
"arguments": [
1714
{
1815
"name": "slot",

src/commands/cluster-delslots.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "slot",

src/commands/cluster-delslotsrange.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "range",

src/commands/cluster-failover.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "options",

src/commands/cluster-flushslots.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
"NO_ASYNC_LOADING",
1212
"ADMIN",
1313
"STALE"
14-
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
1714
]
1815
}
1916
}

src/commands/cluster-forget.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"ADMIN",
1313
"STALE"
1414
],
15-
"command_tips": [
16-
"NONDETERMINISTIC_OUTPUT"
17-
],
1815
"arguments": [
1916
{
2017
"name": "node-id",

src/commands/cluster-keyslot.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
"command_flags": [
1111
"STALE"
1212
],
13-
"command_tips": [
14-
"NONDETERMINISTIC_OUTPUT"
15-
],
1613
"arguments": [
1714
{
1815
"name": "key",

0 commit comments

Comments
 (0)