未验证 提交 4cacb51e 编写于 作者: L Li Minghao 提交者: GitHub

Merge pull request #14037 from taosdata/feature/3.0_mhli

fix(sync): set standby when not follower
......@@ -154,10 +154,10 @@ int32_t syncSetStandby(int64_t rid) {
return -1;
}
if (pSyncNode->state == TAOS_SYNC_STATE_LEADER) {
if (pSyncNode->state != TAOS_SYNC_STATE_FOLLOWER) {
taosReleaseRef(tsNodeRefId, pSyncNode->rid);
terrno = TSDB_CODE_SYN_IS_LEADER;
sError("failed to set standby since it is leader, rid:%" PRId64, rid);
sError("failed to set standby since it is not follower, rid:%" PRId64, rid);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册