Repository: valkey-io/valkey
File: src/debug.c (C)

Code before:
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "loadaof")) {
        if (server.aof_state != AOF_OFF) flushAppendOnlyFile(1);
        emptyData(-1, EMPTYDB_NO_FLAGS, NULL);
        protectClient(c);
        if (server.aof_manifest) aofManifestFree(server.aof_manifest);
        aofLoadManifestFromDisk();
        aofDelHistoryFiles();
        int ret = loadAppendOnlyFiles(server.aof_manifest);
        unprotectClient(c);
        if (ret != AOF_OK && ret != AOF_EMPTY) {
            addReplyError(c, "Error trying to load the AOF files, check server logs.");
            return;
        }
        server.dirty = 0; /* Prevent AOF / replication */
        serverLog(LL_NOTICE, "Append Only File loaded by DEBUG LOADAOF");
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "drop-cluster-packet-filter") && c->argc == 3) {
        long packet_type;
        if (getLongFromObjectOrReply(c, c->argv[2], &packet_type, NULL) != C_OK) return;
        server.cluster_drop_packet_filter = packet_type;
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "close-cluster-link-on-packet-drop") && c->argc == 3) {
        server.debug_cluster_close_link_on_packet_drop = atoi(c->argv[2]->ptr);
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "cluster-random-min-ping") && c->argc == 3) {
        server.debug_cluster_random_ping = atoi(c->argv[2]->ptr);
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "object") && (c->argc == 3 || c->argc == 4)) {
        dictEntry *de;
        robj *val;
        char *strenc;

        int fast = 0;
        if (c->argc == 4 && !strcasecmp(c->argv[3]->ptr, "fast")) fast = 1;

        if ((de = dbFind(c->db, c->argv[2]->ptr)) == NULL) {
            addReplyErrorObject(c, shared.nokeyerr);
            return;
        }
        val = dictGetVal(de);
        strenc = strEncoding(val->encoding);

        char extra[138] = {0};
        if (val->encoding == OBJ_ENCODING_QUICKLIST) {
            char *nextra = extra;
            int remaining = sizeof(extra);
            quicklist *ql = val->ptr;
            /* Add number of quicklist nodes */
            int used = snprintf(nextra, remaining, " ql_nodes:%lu", ql->len);
            nextra += used;

Review comment (suggestion):
Let's remove "min" from the name?


```suggestion
    } else if (!strcasecmp(c->argv[1]->ptr, "cluster-random-ping") && c->argc == 3) {
```

Code after:
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "loadaof")) {
        if (server.aof_state != AOF_OFF) flushAppendOnlyFile(1);
        emptyData(-1, EMPTYDB_NO_FLAGS, NULL);
        protectClient(c);
        if (server.aof_manifest) aofManifestFree(server.aof_manifest);
        aofLoadManifestFromDisk();
        aofDelHistoryFiles();
        int ret = loadAppendOnlyFiles(server.aof_manifest);
        unprotectClient(c);
        if (ret != AOF_OK && ret != AOF_EMPTY) {
            addReplyError(c, "Error trying to load the AOF files, check server logs.");
            return;
        }
        server.dirty = 0; /* Prevent AOF / replication */
        serverLog(LL_NOTICE, "Append Only File loaded by DEBUG LOADAOF");
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "drop-cluster-packet-filter") && c->argc == 3) {
        long packet_type;
        if (getLongFromObjectOrReply(c, c->argv[2], &packet_type, NULL) != C_OK) return;
        server.cluster_drop_packet_filter = packet_type;
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "close-cluster-link-on-packet-drop") && c->argc == 3) {
        server.debug_cluster_close_link_on_packet_drop = atoi(c->argv[2]->ptr);
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "disable-cluster-random-ping") && c->argc == 3) {
        server.debug_cluster_disable_random_ping = atoi(c->argv[2]->ptr);
        addReply(c, shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr, "object") && (c->argc == 3 || c->argc == 4)) {
        dictEntry *de;
        robj *val;
        char *strenc;

        int fast = 0;
        if (c->argc == 4 && !strcasecmp(c->argv[3]->ptr, "fast")) fast = 1;

        if ((de = dbFind(c->db, c->argv[2]->ptr)) == NULL) {
            addReplyErrorObject(c, shared.nokeyerr);
            return;
        }
        val = dictGetVal(de);
        strenc = strEncoding(val->encoding);

        char extra[138] = {0};
        if (val->encoding == OBJ_ENCODING_QUICKLIST) {
            char *nextra = extra;
            int remaining = sizeof(extra);
            quicklist *ql = val->ptr;
            /* Add number of quicklist nodes */
            int used = snprintf(nextra, remaining, " ql_nodes:%lu", ql->len);
            nextra += used;