fukua95 commented on code in PR #2815:
URL: https://github.com/apache/kvrocks/pull/2815#discussion_r1981606360
##########
src/server/server.cc:
##########
@@ -853,6 +840,19 @@ void Server::cron() {
CleanupExitedSlaves();
recordInstantaneousMetrics();
}
+
+ assert(stop_);
Review Comment:
> I suspect the issue was caused by the server being stopped before the
replication was started.
I think before the replication was started, the
`ReplicationThread::stop_flag_` is true, so `ReplicationThread::Stop()` will
not call the `join()`.
And according to the log:
```
I20250226 11:50:45.351392 140030983013952 main.cc:50] Signal Terminated (15)
received, stopping the server
W20250226 11:50:45.351526 140030983013952 replication.cc:371] Replication
thread operation failed: thread #140030983013952 cannot be `join`ed: Resource
deadlock avoided
I20250226 11:50:45.351537 140030983013952 replication.cc:373] [replication]
Stopped
```
`3952` (the repl thread) receive the signal -> call `Server::Stop()` -> join
itself.
Above is my thinking, it maybe wrong. Thanks.
--
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]