trans error
This commit is contained in:
parent
c18883bc03
commit
8977e08fb1
|
@ -216,7 +216,7 @@ do { \
|
||||||
|
|
||||||
#define TSDB_TRANS_STAGE_LEN 12
|
#define TSDB_TRANS_STAGE_LEN 12
|
||||||
#define TSDB_TRANS_TYPE_LEN 16
|
#define TSDB_TRANS_TYPE_LEN 16
|
||||||
#define TSDB_TRANS_ERROR_LEN 128
|
#define TSDB_TRANS_ERROR_LEN 64
|
||||||
|
|
||||||
#define TSDB_STEP_NAME_LEN 32
|
#define TSDB_STEP_NAME_LEN 32
|
||||||
#define TSDB_STEP_DESC_LEN 128
|
#define TSDB_STEP_DESC_LEN 128
|
||||||
|
|
|
@ -805,6 +805,9 @@ void mndTransProcessRsp(SMnodeMsg *pRsp) {
|
||||||
if (pAction != NULL) {
|
if (pAction != NULL) {
|
||||||
pAction->msgReceived = 1;
|
pAction->msgReceived = 1;
|
||||||
pAction->errCode = pRsp->rpcMsg.code;
|
pAction->errCode = pRsp->rpcMsg.code;
|
||||||
|
if (pAction->errCode != 0) {
|
||||||
|
tstrncpy(pTrans->lastError, tstrerror(pAction->errCode), TSDB_TRANS_ERROR_LEN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mDebug("trans:%d, action:%d response is received, code:0x%x, accept:0x%x", transId, action, pRsp->rpcMsg.code,
|
mDebug("trans:%d, action:%d response is received, code:0x%x, accept:0x%x", transId, action, pRsp->rpcMsg.code,
|
||||||
|
@ -1110,6 +1113,7 @@ static void mndTransExecute(SMnode *pMnode, STrans *pTrans) {
|
||||||
bool continueExec = true;
|
bool continueExec = true;
|
||||||
|
|
||||||
while (continueExec) {
|
while (continueExec) {
|
||||||
|
pTrans->lastExecTime = taosGetTimestampMs();
|
||||||
switch (pTrans->stage) {
|
switch (pTrans->stage) {
|
||||||
case TRN_STAGE_PREPARE:
|
case TRN_STAGE_PREPARE:
|
||||||
continueExec = mndTransPerformPrepareStage(pMnode, pTrans);
|
continueExec = mndTransPerformPrepareStage(pMnode, pTrans);
|
||||||
|
|
Loading…
Reference in New Issue