You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/04/11 17:18:01 UTC
[GitHub] [incubator-kvrocks] enjoy-binbin opened a new pull request, #1379: Add cluster section into the info command
enjoy-binbin opened a new pull request, #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379
Currently the Redis Info cluster command only has cluster_enabled,
a value of 0 or 1 indicates whether the cluster mode is enabled.
Closes #1378
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] torwig commented on a diff in pull request #1379: Add cluster section into the info command
Posted by "torwig (via GitHub)" <gi...@apache.org>.
torwig commented on code in PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379#discussion_r1163246103
##########
tests/gocase/unit/info/info_test.go:
##########
@@ -88,4 +88,8 @@ func TestInfo(t *testing.T) {
require.GreaterOrEqual(t, lastBgsaveTimeSec, 0)
require.Less(t, lastBgsaveTimeSec, 3)
})
+
+ t.Run("get cluster information by INFO", func(t *testing.T) {
+ require.Equal(t, "0", util.FindInfoEntry(rdb, "cluster_enabled", "cluster"))
+ })
Review Comment:
@enjoy-binbin Thank you for your contribution.
LGTM.
Additionally, you can add a test for the case when a cluster mode is enabled like the following:
```
t.Run("get cluster information by INFO - cluster not enabled", func(t *testing.T) { // <---- your test case
require.Equal(t, "0", util.FindInfoEntry(rdb, "cluster_enabled", "cluster"))
})
srv0 := util.StartServer(t, map[string]string{"cluster-enabled": "yes"})
defer func() { srv0.Close() }()
rdb0 := srv0.NewClient()
defer func() { require.NoError(t, rdb0.Close()) }()
t.Run("get cluster information by INFO - cluster enabled", func(t *testing.T) {
require.Equal(t, "1", util.FindInfoEntry(rdb0, "cluster_enabled", "cluster"))
})
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] enjoy-binbin commented on pull request #1379: Add cluster section into the info command
Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379#issuecomment-1504467004
another question, i see the code i added, now cluster info is below rocksdb sestion, the location feels a bit strange, should i move it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1379: Add cluster section into the info command
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379#issuecomment-1504818612
Thanks all, merging...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1379: Add cluster section into the info command
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379#issuecomment-1504481521
> another question, i see the code i added, now cluster info is below rocksdb sestion, the location feels a bit strange, should i move it?
Yes, can move it if you don't mind.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] enjoy-binbin commented on a diff in pull request #1379: Add cluster section into the info command
Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on code in PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379#discussion_r1163512098
##########
tests/gocase/unit/info/info_test.go:
##########
@@ -88,4 +88,8 @@ func TestInfo(t *testing.T) {
require.GreaterOrEqual(t, lastBgsaveTimeSec, 0)
require.Less(t, lastBgsaveTimeSec, 3)
})
+
+ t.Run("get cluster information by INFO", func(t *testing.T) {
+ require.Equal(t, "0", util.FindInfoEntry(rdb, "cluster_enabled", "cluster"))
+ })
Review Comment:
thanks, i wanted to add one, but it was too late yesterday. took your suggestions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kvrocks] git-hulk merged pull request #1379: Add cluster section into the info command
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #1379:
URL: https://github.com/apache/incubator-kvrocks/pull/1379
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org