Skip to content

Commit 315b757

Browse files
Update server function's name to valkey (valkey-io#456)
Updated valkey in follwing functions. genRedisInfoString -> genValkeyInfoString genRedisInfoStringCommandStats -> genValkeyInfoStringCommandStats genRedisInfoStringACLStats -> genValkeyInfoStringACLStats genRedisInfoStringLatencyStats -> genValkeyInfoStringLatencyStats Signed-off-by: Shivshankar-Reddy <[email protected]>
1 parent 4e944ce commit 315b757

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ void logServerInfo(void) {
19971997
robj *argv[1];
19981998
argv[0] = createStringObject("all", strlen("all"));
19991999
dict *section_dict = genInfoSectionDict(argv, 1, NULL, &all, &everything);
2000-
infostring = genRedisInfoString(section_dict, all, everything);
2000+
infostring = genValkeyInfoString(section_dict, all, everything);
20012001
if (server.cluster_enabled){
20022002
infostring = genClusterDebugString(infostring);
20032003
}

src/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10447,7 +10447,7 @@ ValkeyModuleServerInfoData *VM_GetServerInfo(ValkeyModuleCtx *ctx, const char *s
1044710447
robj *argv[1];
1044810448
argv[0] = section ? createStringObject(section, strlen(section)) : NULL;
1044910449
dict *section_dict = genInfoSectionDict(argv, section ? 1 : 0, NULL, &all, &everything);
10450-
sds info = genRedisInfoString(section_dict, all, everything);
10450+
sds info = genValkeyInfoString(section_dict, all, everything);
1045110451
int totlines, i;
1045210452
sds *lines = sdssplitlen(info, sdslen(info), "\r\n", 2, &totlines);
1045310453
for(i=0; i<totlines; i++) {

src/sentinel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,7 +4265,7 @@ void sentinelInfoCommand(client *c) {
42654265
}
42664266
dictReleaseIterator(di);
42674267

4268-
/* Insert explicit all sections (don't pass these vars to genRedisInfoString) */
4268+
/* Insert explicit all sections (don't pass these vars to genValkeyInfoString) */
42694269
if (sec_all || sec_everything) {
42704270
releaseInfoSectionDict(sections_dict);
42714271
/* We cache this dict as an optimization. */
@@ -4276,7 +4276,7 @@ void sentinelInfoCommand(client *c) {
42764276
sections_dict = cached_all_info_sections;
42774277
}
42784278

4279-
sds info = genRedisInfoString(sections_dict, 0, 0);
4279+
sds info = genValkeyInfoString(sections_dict, 0, 0);
42804280
if (sec_all || (dictFind(sections_dict, "sentinel") != NULL)) {
42814281
dictIterator *di;
42824282
dictEntry *de;

src/server.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5432,7 +5432,7 @@ const char *getSafeInfoString(const char *s, size_t len, char **tmp) {
54325432
sizeof(unsafe_info_chars)-1);
54335433
}
54345434

5435-
sds genRedisInfoStringCommandStats(sds info, dict *commands) {
5435+
sds genValkeyInfoStringCommandStats(sds info, dict *commands) {
54365436
struct serverCommand *c;
54375437
dictEntry *de;
54385438
dictIterator *di;
@@ -5450,7 +5450,7 @@ sds genRedisInfoStringCommandStats(sds info, dict *commands) {
54505450
if (tmpsafe != NULL) zfree(tmpsafe);
54515451
}
54525452
if (c->subcommands_dict) {
5453-
info = genRedisInfoStringCommandStats(info, c->subcommands_dict);
5453+
info = genValkeyInfoStringCommandStats(info, c->subcommands_dict);
54545454
}
54555455
}
54565456
dictReleaseIterator(di);
@@ -5459,7 +5459,7 @@ sds genRedisInfoStringCommandStats(sds info, dict *commands) {
54595459
}
54605460

54615461
/* Writes the ACL metrics to the info */
5462-
sds genRedisInfoStringACLStats(sds info) {
5462+
sds genValkeyInfoStringACLStats(sds info) {
54635463
info = sdscatprintf(info,
54645464
"acl_access_denied_auth:%lld\r\n"
54655465
"acl_access_denied_cmd:%lld\r\n"
@@ -5472,7 +5472,7 @@ sds genRedisInfoStringACLStats(sds info) {
54725472
return info;
54735473
}
54745474

5475-
sds genRedisInfoStringLatencyStats(sds info, dict *commands) {
5475+
sds genValkeyInfoStringLatencyStats(sds info, dict *commands) {
54765476
struct serverCommand *c;
54775477
dictEntry *de;
54785478
dictIterator *di;
@@ -5487,7 +5487,7 @@ sds genRedisInfoStringLatencyStats(sds info, dict *commands) {
54875487
if (tmpsafe != NULL) zfree(tmpsafe);
54885488
}
54895489
if (c->subcommands_dict) {
5490-
info = genRedisInfoStringLatencyStats(info, c->subcommands_dict);
5490+
info = genValkeyInfoStringLatencyStats(info, c->subcommands_dict);
54915491
}
54925492
}
54935493
dictReleaseIterator(di);
@@ -5513,7 +5513,7 @@ void releaseInfoSectionDict(dict *sec) {
55135513
dictRelease(sec);
55145514
}
55155515

5516-
/* Create a dictionary with unique section names to be used by genRedisInfoString.
5516+
/* Create a dictionary with unique section names to be used by genValkeyInfoString.
55175517
* 'argv' and 'argc' are list of arguments for INFO.
55185518
* 'defaults' is an optional null terminated list of default sections.
55195519
* 'out_all' and 'out_everything' are optional.
@@ -5577,7 +5577,7 @@ void totalNumberOfStatefulKeys(unsigned long *blocking_keys, unsigned long *bloc
55775577
/* Create the string returned by the INFO command. This is decoupled
55785578
* by the INFO command itself as we need to report the same information
55795579
* on memory corruption problems. */
5580-
sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
5580+
sds genValkeyInfoString(dict *section_dict, int all_sections, int everything) {
55815581
sds info = sdsempty();
55825582
time_t uptime = server.unixtime-server.stat_starttime;
55835583
int j;
@@ -5942,7 +5942,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
59425942
"eventloop_duration_cmd_sum:%llu\r\n", server.duration_stats[EL_DURATION_TYPE_CMD].sum,
59435943
"instantaneous_eventloop_cycles_per_sec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_CYCLE),
59445944
"instantaneous_eventloop_duration_usec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_DURATION)));
5945-
info = genRedisInfoStringACLStats(info);
5945+
info = genValkeyInfoStringACLStats(info);
59465946
}
59475947

59485948
/* Replication */
@@ -6092,7 +6092,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
60926092
if (all_sections || (dictFind(section_dict,"commandstats") != NULL)) {
60936093
if (sections++) info = sdscat(info,"\r\n");
60946094
info = sdscatprintf(info, "# Commandstats\r\n");
6095-
info = genRedisInfoStringCommandStats(info, server.commands);
6095+
info = genValkeyInfoStringCommandStats(info, server.commands);
60966096
}
60976097

60986098
/* Error statistics */
@@ -6119,7 +6119,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
61196119
if (sections++) info = sdscat(info,"\r\n");
61206120
info = sdscatprintf(info, "# Latencystats\r\n");
61216121
if (server.latency_tracking_enabled) {
6122-
info = genRedisInfoStringLatencyStats(info, server.commands);
6122+
info = genValkeyInfoStringLatencyStats(info, server.commands);
61236123
}
61246124
}
61256125

@@ -6185,7 +6185,7 @@ void infoCommand(client *c) {
61856185
int all_sections = 0;
61866186
int everything = 0;
61876187
dict *sections_dict = genInfoSectionDict(c->argv+1, c->argc-1, NULL, &all_sections, &everything);
6188-
sds info = genRedisInfoString(sections_dict, all_sections, everything);
6188+
sds info = genValkeyInfoString(sections_dict, all_sections, everything);
61896189
addReplyVerbatim(c,info,sdslen(info),"txt");
61906190
sdsfree(info);
61916191
releaseInfoSectionDict(sections_dict);

src/server.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,7 +2975,7 @@ void ACLFreeUserAndKillClients(user *u);
29752975
void addACLLogEntry(client *c, int reason, int context, int argpos, sds username, sds object);
29762976
sds getAclErrorMessage(int acl_res, user *user, struct serverCommand *cmd, sds errored_val, int verbose);
29772977
void ACLUpdateDefaultUserPassword(sds password);
2978-
sds genRedisInfoStringACLStats(sds info);
2978+
sds genValkeyInfoStringACLStats(sds info);
29792979
void ACLRecomputeCommandBitsFromCommandRulesAllUsers(void);
29802980

29812981
/* Sorted sets data type */
@@ -3766,7 +3766,7 @@ void removeSigSegvHandlers(void);
37663766
const char *getSafeInfoString(const char *s, size_t len, char **tmp);
37673767
dict *genInfoSectionDict(robj **argv, int argc, char **defaults, int *out_all, int *out_everything);
37683768
void releaseInfoSectionDict(dict *sec);
3769-
sds genRedisInfoString(dict *section_dict, int all_sections, int everything);
3769+
sds genValkeyInfoString(dict *section_dict, int all_sections, int everything);
37703770
sds genModulesInfoString(sds info);
37713771
void applyWatchdogPeriod(void);
37723772
void watchdogScheduleSignal(int period);

0 commit comments

Comments
 (0)