未验证 提交 682c85a3 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2619 from taosdata/hotfix/crash

Hotfix/crash
...@@ -967,7 +967,12 @@ static void *sdbWorkerFp(void *param) { ...@@ -967,7 +967,12 @@ static void *sdbWorkerFp(void *param) {
} }
int32_t code = sdbWrite(pOper, pHead, type); int32_t code = sdbWrite(pOper, pHead, type);
if (pOper && code <= 0) pOper->retCode = code; if (code < 0) {
if (pOper)
pOper->retCode = code;
else
pHead->len = code; // hackway
}
} }
walFsync(tsSdbObj.wal); walFsync(tsSdbObj.wal);
...@@ -983,7 +988,7 @@ static void *sdbWorkerFp(void *param) { ...@@ -983,7 +988,7 @@ static void *sdbWorkerFp(void *param) {
sdbConfirmForward(NULL, pOper, pOper->retCode); sdbConfirmForward(NULL, pOper, pOper->retCode);
} else if (type == TAOS_QTYPE_FWD) { } else if (type == TAOS_QTYPE_FWD) {
pHead = (SWalHead *)item; pHead = (SWalHead *)item;
syncConfirmForward(tsSdbObj.sync, pHead->version, TSDB_CODE_SUCCESS); syncConfirmForward(tsSdbObj.sync, pHead->version, pHead->len);
taosFreeQitem(item); taosFreeQitem(item);
} else { } else {
taosFreeQitem(item); taosFreeQitem(item);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册