mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
fix for #3187
I've renamed maxmemoryToString to evictPolicyToString since that is more accurate (and easier to mentally connect with the correct data), as well as updated the function to user server.maxmemory_policy rather than server.maxmemory. Now with a default config it is actually returning the correct policy rather than volatile-lru.
This commit is contained in:
parent
4cbe044439
commit
14086a46ca
@ -126,8 +126,8 @@ const char *configEnumGetNameOrUnknown(configEnum *ce, int val) {
|
||||
}
|
||||
|
||||
/* Used for INFO generation. */
|
||||
const char *maxmemoryToString(void) {
|
||||
return configEnumGetNameOrUnknown(maxmemory_policy_enum,server.maxmemory);
|
||||
const char *evictPolicyToString(void) {
|
||||
return configEnumGetNameOrUnknown(maxmemory_policy_enum,server.maxmemory_policy);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -2937,7 +2937,7 @@ sds genRedisInfoString(char *section) {
|
||||
char maxmemory_hmem[64];
|
||||
size_t zmalloc_used = zmalloc_used_memory();
|
||||
size_t total_system_mem = server.system_memory_size;
|
||||
const char *evict_policy = maxmemoryToString();
|
||||
const char *evict_policy = evictPolicyToString();
|
||||
long long memory_lua = (long long)lua_gc(server.lua,LUA_GCCOUNT,0)*1024;
|
||||
|
||||
/* Peak memory is updated from time to time by serverCron() so it
|
||||
|
@ -1368,7 +1368,7 @@ void closeListeningSockets(int unlink_unix_socket);
|
||||
void updateCachedTime(void);
|
||||
void resetServerStats(void);
|
||||
unsigned int getLRUClock(void);
|
||||
const char *maxmemoryToString(void);
|
||||
const char *evictPolicyToString(void);
|
||||
|
||||
#define RESTART_SERVER_NONE 0
|
||||
#define RESTART_SERVER_GRACEFULLY (1<<0) /* Do proper shutdown. */
|
||||
|
Loading…
Reference in New Issue
Block a user