You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2022/06/25 02:41:08 UTC

[incubator-kvrocks] branch unstable updated: Fix the role command can't be used when loading data (#661)

This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 9544858  Fix the role command can't be used when loading data (#661)
9544858 is described below

commit 9544858ecf5fd5daa29f84c7133ed45ca7bd81c1
Author: hulk <hu...@gmail.com>
AuthorDate: Sat Jun 25 10:41:04 2022 +0800

    Fix the role command can't be used when loading data (#661)
    
    Currently, Kvrocks forbid to use the DB pointer when loading data,
    so we add ok-loading to exclude those commands that do NOT use the DB pointer.
    But we forgot to add ok-loading to the role command which is using by the replication test case: tests/integration/replication.tcl#L254, and it got error when restoring the backup.
---
 src/redis_cmd.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/redis_cmd.cc b/src/redis_cmd.cc
index 17b0782..04e7d80 100644
--- a/src/redis_cmd.cc
+++ b/src/redis_cmd.cc
@@ -4723,7 +4723,7 @@ CommandAttributes redisCommandTable[] = {
     ADD_CMD("ping", 1, "read-only", 0, 0, 0, CommandPing),
     ADD_CMD("select", 2, "read-only", 0, 0, 0, CommandSelect),
     ADD_CMD("info", -1, "read-only ok-loading", 0, 0, 0, CommandInfo),
-    ADD_CMD("role", 1, "read-only", 0, 0, 0, CommandRole),
+    ADD_CMD("role", 1, "read-only ok-loading", 0, 0, 0, CommandRole),
     ADD_CMD("config", -2, "read-only", 0, 0, 0, CommandConfig),
     ADD_CMD("namespace", -3, "read-only", 0, 0, 0, CommandNamespace),
     ADD_CMD("keys", 2, "read-only", 0, 0, 0, CommandKeys),