-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrongly try to rewrite the namespace in the cluster mode (#2221)
This closes #2214 The namespace mechanism is NOT allowed in cluster mode, so it's unnecessary to rewrite while the cluster mode is enabled. This config rewrite behavior will cause the replication issue mentioned in #2214 when starting the cluster node. The root cause is that the server will try to rewrite the namespace into the rocksdb if the option `repl-namespace-enabled` is enabled. So it will increase the server's rocksdb sequence and replication will start with the wrong offset. We have checked if the role is a slave before rewriting, but the cluster replication is NOT set at that time(master-replica is good). The good news is it only affects the cluster users who enabled the option `repl-namespace-enabled`, so I guess almost no user will do this since the namespace replication is meaningless to the cluster mode. ``` === RUN TestClusterReplication/Cluster_replication_should_work_normally_after_restart replication_test.go:88: Error Trace: /Users/hulk/code/cxx/kvrocks/tests/gocase/integration/replication/replication_test.go:88 Error: Not equal: expected: "v1" actual : "v0" ``` And it works well after this patch.
- Loading branch information
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters