git-hulk commented on code in PR #1855:
URL: https://github.com/apache/kvrocks/pull/1855#discussion_r1374529815
##########
src/server/redis_connection.cc:
##########
@@ -74,6 +75,17 @@ void Connection::Close() {
void Connection::Detach() { owner_->DetachConnection(this); }
+bool Connection::IsBlockingMode() const {
+ if (current_cmd == nullptr) return false;
+ if (dynamic_cast<BlockingCommander *>(current_cmd.get()) != nullptr) return
true;
+
+ auto args = current_cmd->GetArgs();
+ if (args.empty()) return false;
+
+ std::string cmd_name = util::ToLower(args.front());
+ return cmd_name == "xread";
Review Comment:
Gotcha, thank you!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]