]> git.saurik.com Git - redis.git/blobdiff - redis.c
DEBUG OBJECT provide info about serialized object length even when VM is disabled
[redis.git] / redis.c
diff --git a/redis.c b/redis.c
index 2f5abc8a332b3c8d8676a0aeefc5b75523e7a246..5da103d8773c35d44c2d4c32d41e1e6066d07a4d 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -8171,8 +8171,8 @@ static void debugCommand(redisClient *c) {
         }
         key = dictGetEntryKey(de);
         val = dictGetEntryVal(de);
-        if (server.vm_enabled && (key->storage == REDIS_VM_MEMORY ||
-                                  key->storage == REDIS_VM_SWAPPING)) {
+        if (!server.vm_enabled || (key->storage == REDIS_VM_MEMORY ||
+                                   key->storage == REDIS_VM_SWAPPING)) {
             addReplySds(c,sdscatprintf(sdsempty(),
                 "+Key at:%p refcount:%d, value at:%p refcount:%d "
                 "encoding:%d serializedlength:%lld\r\n",