提交 dab726ab 编写于 作者: S Shengliang Guan

TD-1832

上级 5b4dc831
......@@ -273,6 +273,8 @@ static void sdbConfirmForward(void *ahandle, void *param, int32_t code) {
tstrerror(code));
}
if (((SSdbTable *)pOper->table)->tableId == SDB_TABLE_CTABLE)
pOper->retCode = TSDB_CODE_MND_APP_ERROR;
// failed to forward, need revert insert
if (pOper->retCode != TSDB_CODE_SUCCESS) {
SWalHead *pHead = (void *)pOper + sizeof(SSdbOper) + SDB_SYNC_HACK;
......@@ -281,7 +283,14 @@ static void sdbConfirmForward(void *ahandle, void *param, int32_t code) {
((SSdbTable *)pOper->table)->tableName, pOper->pObj, sdbGetKeyStr(pOper->table, pHead->cont),
pHead->version, action, tstrerror(pOper->retCode));
if (action == SDB_ACTION_INSERT) {
sdbDeleteHash(pOper->table, pOper);
// It's better to create a table in two stages, create it first and then set it success
//sdbDeleteHash(pOper->table, pOper);
SSdbOper oper = {
.type = SDB_OPER_GLOBAL,
.table = pOper->table,
.pObj = pOper->pObj
};
sdbDeleteRow(&oper);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册