提交 0838afaa 编写于 作者: M Minghao Li

refactor(sync): add syncIsReadyForRead, set error code

上级 a4b54c4f
......@@ -466,6 +466,14 @@ bool syncIsReadyForRead(int64_t rid) {
}
}
if (!ready) {
if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) {
terrno = TSDB_CODE_SYN_NOT_LEADER;
} else {
terrno = TSDB_CODE_APP_NOT_READY;
}
}
syncNodeRelease(pSyncNode);
return ready;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册