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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to