为什么StorageServer::stop的时候,是先stop kvstore,把part等内存信息删除完毕,再cleanup thrift server呢?这样会导致请求到来时,因为kvstore已经stop了raft service,导致不能走raft请求。为什么不先cleanup thrift server,停止接收请求,再stop kvstore呢?
代码:nebula/StorageServer.cpp at master · vesoft-inc/nebula · GitHub
void StorageServer::stop() {
// Stop http service
webSvc_.reset();
// Stop all thrift server: raft/storage/admin
if (kvstore_) {
// stop kvstore background job and raft services
kvstore_->stop();
}
if (adminServer_) {
adminServer_->cleanUp();
}
if (storageServer_) {
#ifndef BUILD_STANDALONE
storageServer_->cleanUp();
#endif
}
…
}