Skip to content

Commit

Permalink
tarsAdminRegistry support tarsgo gracefull patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Jul 19, 2020
1 parent 879351d commit baefecd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AdminRegistryServer/ExecuteTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ EMTaskItemStatus TaskList::graceRestart(const TaskItemReq &req, string &log)
{
vector<ServerDescriptor> server;
server = DBPROXY->getServers(req.application, req.serverName, req.nodeName, true);
if (server.size() != 0)
if (server.size() == 0)
{
// TLOGERROR("TaskList::graceRestartServer error: server is not tars go, grace restart command is not allowed" << endl);
log = "no servers";
TLOGERROR("TaskList::graceRestartServer no servers" << endl);
return EM_I_FAILED;
}
ret = _adminPrx->notifyServer_inner(req.application, req.serverName, req.nodeName, "tars.gracerestart",log);
Expand Down

0 comments on commit baefecd

Please sign in to comment.