diff --git a/src/debug.c b/src/debug.c index 5327a231a..314238917 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1997,7 +1997,7 @@ void logServerInfo(void) { robj *argv[1]; argv[0] = createStringObject("all", strlen("all")); dict *section_dict = genInfoSectionDict(argv, 1, NULL, &all, &everything); - infostring = genRedisInfoString(section_dict, all, everything); + infostring = genValkeyInfoString(section_dict, all, everything); if (server.cluster_enabled){ infostring = genClusterDebugString(infostring); } diff --git a/src/module.c b/src/module.c index b0c5f8fe2..e8ed4182e 100644 --- a/src/module.c +++ b/src/module.c @@ -10447,7 +10447,7 @@ ValkeyModuleServerInfoData *VM_GetServerInfo(ValkeyModuleCtx *ctx, const char *s robj *argv[1]; argv[0] = section ? createStringObject(section, strlen(section)) : NULL; dict *section_dict = genInfoSectionDict(argv, section ? 1 : 0, NULL, &all, &everything); - sds info = genRedisInfoString(section_dict, all, everything); + sds info = genValkeyInfoString(section_dict, all, everything); int totlines, i; sds *lines = sdssplitlen(info, sdslen(info), "\r\n", 2, &totlines); for(i=0; isubcommands_dict) { - info = genRedisInfoStringCommandStats(info, c->subcommands_dict); + info = genValkeyInfoStringCommandStats(info, c->subcommands_dict); } } dictReleaseIterator(di); @@ -5459,7 +5459,7 @@ sds genRedisInfoStringCommandStats(sds info, dict *commands) { } /* Writes the ACL metrics to the info */ -sds genRedisInfoStringACLStats(sds info) { +sds genValkeyInfoStringACLStats(sds info) { info = sdscatprintf(info, "acl_access_denied_auth:%lld\r\n" "acl_access_denied_cmd:%lld\r\n" @@ -5472,7 +5472,7 @@ sds genRedisInfoStringACLStats(sds info) { return info; } -sds genRedisInfoStringLatencyStats(sds info, dict *commands) { +sds genValkeyInfoStringLatencyStats(sds info, dict *commands) { struct serverCommand *c; dictEntry *de; dictIterator *di; @@ -5487,7 +5487,7 @@ sds genRedisInfoStringLatencyStats(sds info, dict *commands) { if (tmpsafe != NULL) zfree(tmpsafe); } if (c->subcommands_dict) { - info = genRedisInfoStringLatencyStats(info, c->subcommands_dict); + info = genValkeyInfoStringLatencyStats(info, c->subcommands_dict); } } dictReleaseIterator(di); @@ -5513,7 +5513,7 @@ void releaseInfoSectionDict(dict *sec) { dictRelease(sec); } -/* Create a dictionary with unique section names to be used by genRedisInfoString. +/* Create a dictionary with unique section names to be used by genValkeyInfoString. * 'argv' and 'argc' are list of arguments for INFO. * 'defaults' is an optional null terminated list of default sections. * 'out_all' and 'out_everything' are optional. @@ -5577,7 +5577,7 @@ void totalNumberOfStatefulKeys(unsigned long *blocking_keys, unsigned long *bloc /* Create the string returned by the INFO command. This is decoupled * by the INFO command itself as we need to report the same information * on memory corruption problems. */ -sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { +sds genValkeyInfoString(dict *section_dict, int all_sections, int everything) { sds info = sdsempty(); time_t uptime = server.unixtime-server.stat_starttime; int j; @@ -5942,7 +5942,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { "eventloop_duration_cmd_sum:%llu\r\n", server.duration_stats[EL_DURATION_TYPE_CMD].sum, "instantaneous_eventloop_cycles_per_sec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_CYCLE), "instantaneous_eventloop_duration_usec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_DURATION))); - info = genRedisInfoStringACLStats(info); + info = genValkeyInfoStringACLStats(info); } /* Replication */ @@ -6092,7 +6092,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { if (all_sections || (dictFind(section_dict,"commandstats") != NULL)) { if (sections++) info = sdscat(info,"\r\n"); info = sdscatprintf(info, "# Commandstats\r\n"); - info = genRedisInfoStringCommandStats(info, server.commands); + info = genValkeyInfoStringCommandStats(info, server.commands); } /* Error statistics */ @@ -6119,7 +6119,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { if (sections++) info = sdscat(info,"\r\n"); info = sdscatprintf(info, "# Latencystats\r\n"); if (server.latency_tracking_enabled) { - info = genRedisInfoStringLatencyStats(info, server.commands); + info = genValkeyInfoStringLatencyStats(info, server.commands); } } @@ -6185,7 +6185,7 @@ void infoCommand(client *c) { int all_sections = 0; int everything = 0; dict *sections_dict = genInfoSectionDict(c->argv+1, c->argc-1, NULL, &all_sections, &everything); - sds info = genRedisInfoString(sections_dict, all_sections, everything); + sds info = genValkeyInfoString(sections_dict, all_sections, everything); addReplyVerbatim(c,info,sdslen(info),"txt"); sdsfree(info); releaseInfoSectionDict(sections_dict); diff --git a/src/server.h b/src/server.h index 98ac30b7d..23bcda81d 100644 --- a/src/server.h +++ b/src/server.h @@ -2975,7 +2975,7 @@ void ACLFreeUserAndKillClients(user *u); void addACLLogEntry(client *c, int reason, int context, int argpos, sds username, sds object); sds getAclErrorMessage(int acl_res, user *user, struct serverCommand *cmd, sds errored_val, int verbose); void ACLUpdateDefaultUserPassword(sds password); -sds genRedisInfoStringACLStats(sds info); +sds genValkeyInfoStringACLStats(sds info); void ACLRecomputeCommandBitsFromCommandRulesAllUsers(void); /* Sorted sets data type */ @@ -3766,7 +3766,7 @@ void removeSigSegvHandlers(void); const char *getSafeInfoString(const char *s, size_t len, char **tmp); dict *genInfoSectionDict(robj **argv, int argc, char **defaults, int *out_all, int *out_everything); void releaseInfoSectionDict(dict *sec); -sds genRedisInfoString(dict *section_dict, int all_sections, int everything); +sds genValkeyInfoString(dict *section_dict, int all_sections, int everything); sds genModulesInfoString(sds info); void applyWatchdogPeriod(void); void watchdogScheduleSignal(int period);