You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/10/31 13:31:27 UTC
[PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
git-hulk opened a new pull request, #1863:
URL: https://github.com/apache/kvrocks/pull/1863
(no comment)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1813587435
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [2.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1789539062
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1797747503
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.6% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1794618043
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.6% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1382405513
##########
src/server/redis_connection.h:
##########
@@ -111,6 +111,7 @@ class Connection : public EvbufCallbackBase<Connection> {
Worker *Owner() { return owner_; }
void SetOwner(Worker *new_owner) { owner_ = new_owner; };
int GetFD() { return bufferevent_getfd(bev_); }
+ bool HasRunningCommand() const { return saved_current_command_ != nullptr; }
Review Comment:
I'm wondering if there are non-blocking commands which are running in some situation?
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1380960617
##########
src/server/worker.cc:
##########
@@ -252,7 +252,8 @@ Status Worker::listenTCP(const std::string &host, uint32_t port, int backlog) {
}
evutil_make_socket_nonblocking(fd);
- auto lev = NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_CLOSE_ON_FREE, backlog, fd);
+ auto lev =
+ NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_THREADSAFE | LEV_OPT_CLOSE_ON_FREE, backlog, fd);
Review Comment:
I wonder if `THREADSAFE` flag will affect performance in a explicit way?
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1382582778
##########
src/server/redis_connection.h:
##########
@@ -111,6 +111,7 @@ class Connection : public EvbufCallbackBase<Connection> {
Worker *Owner() { return owner_; }
void SetOwner(Worker *new_owner) { owner_ = new_owner; };
int GetFD() { return bufferevent_getfd(bev_); }
+ bool HasRunningCommand() const { return saved_current_command_ != nullptr; }
Review Comment:
Yes, I also misunderstood what you mean. You're right, it should only have the data race in current_command, and the other variables should have the same issue.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1799124641
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.5% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1805359650
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [2.3% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1382597823
##########
src/server/redis_connection.h:
##########
@@ -111,6 +111,7 @@ class Connection : public EvbufCallbackBase<Connection> {
Worker *Owner() { return owner_; }
void SetOwner(Worker *new_owner) { owner_ = new_owner; };
int GetFD() { return bufferevent_getfd(bev_); }
+ bool HasRunningCommand() const { return saved_current_command_ != nullptr; }
Review Comment:
Fixed
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1791727682
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1792780920
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1790980050
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1790670086
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1381023447
##########
src/commands/blocking_commander.h:
##########
@@ -44,7 +44,6 @@ class BlockingCommander : public Commander,
// in other words, returning true indicates ending the blocking
virtual bool OnBlockingWrite() = 0;
- bool IsBlocking() const override { return true; }
Review Comment:
Yes, we don't migrate the connection once it has the running command to avoid data race between the new and old worker. The data race condition was mentioned in PR summary.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1793420347
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.7% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1793699502
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.6% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1380961008
##########
src/commands/blocking_commander.h:
##########
@@ -44,7 +44,6 @@ class BlockingCommander : public Commander,
// in other words, returning true indicates ending the blocking
virtual bool OnBlockingWrite() = 0;
- bool IsBlocking() const override { return true; }
Review Comment:
Now we do not need to check if it is blocking or not?
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1793752079
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.6% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1790705566
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1381023447
##########
src/commands/blocking_commander.h:
##########
@@ -44,7 +44,6 @@ class BlockingCommander : public Commander,
// in other words, returning true indicates ending the blocking
virtual bool OnBlockingWrite() = 0;
- bool IsBlocking() const override { return true; }
Review Comment:
Yes, we don't migrate the connection once it has the running command to avoid data race between the new and old worker.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1792781605
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.7% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1793433707
This PR opened before changing the sonar reconfigured, so just ignore it. cc @PragmaTwice
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1382406859
##########
src/server/redis_connection.h:
##########
@@ -111,6 +111,7 @@ class Connection : public EvbufCallbackBase<Connection> {
Worker *Owner() { return owner_; }
void SetOwner(Worker *new_owner) { owner_ = new_owner; };
int GetFD() { return bufferevent_getfd(bev_); }
+ bool HasRunningCommand() const { return saved_current_command_ != nullptr; }
Review Comment:
Yes, that's possible.
For example, connection0 is running on worker0 with the command `Get`, but it will wait for the lock if the migrating connection process is ongoing, then connection0 will be migrated to a new worker. Since then the new worker will start schedule the connection0 and the old worker will be still using the connection while resuming the ExecuteCommands.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1790806653
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [5.8% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1382578943
##########
src/server/redis_connection.h:
##########
@@ -111,6 +111,7 @@ class Connection : public EvbufCallbackBase<Connection> {
Worker *Owner() { return owner_; }
void SetOwner(Worker *new_owner) { owner_ = new_owner; };
int GetFD() { return bufferevent_getfd(bev_); }
+ bool HasRunningCommand() const { return saved_current_command_ != nullptr; }
Review Comment:
Oh, I mean, only blocking commands will be stored in `saved_current_command_ `.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1381938618
##########
src/server/worker.cc:
##########
@@ -252,7 +252,8 @@ Status Worker::listenTCP(const std::string &host, uint32_t port, int backlog) {
}
evutil_make_socket_nonblocking(fd);
- auto lev = NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_CLOSE_ON_FREE, backlog, fd);
+ auto lev =
+ NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_THREADSAFE | LEV_OPT_CLOSE_ON_FREE, backlog, fd);
Review Comment:
I tested on Ubuntu 22.04, it's no different. The performance of connecting is around 1.4W QPS.
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#issuecomment-1812750075
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=1863)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT) [3 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=1863&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=1863&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list) [2.2% Duplication](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=1863&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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
Re: [PR] Graceful shutdown the workers when reducing worker threads [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1863:
URL: https://github.com/apache/kvrocks/pull/1863#discussion_r1381020139
##########
src/server/worker.cc:
##########
@@ -252,7 +252,8 @@ Status Worker::listenTCP(const std::string &host, uint32_t port, int backlog) {
}
evutil_make_socket_nonblocking(fd);
- auto lev = NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_CLOSE_ON_FREE, backlog, fd);
+ auto lev =
+ NewEvconnlistener<&Worker::newTCPConnection>(base_, LEV_OPT_THREADSAFE | LEV_OPT_CLOSE_ON_FREE, backlog, fd);
Review Comment:
Yes, I guess it will affect the performance since it needs an extra lock and unlock operation. But it should be fine since the bottlenecks of accept connections won't be here. Let's me have a performance compare later.
--
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