提交 90e66f0c 编写于 作者: A Asim R P 提交者: Asim RP

Flush error state before making a retry attempt in DTM

Each DTM retry needs a clean error state because the previous error is
already written to csv log and is handled by subsequent retry.
上级 ab0f3296
......@@ -801,6 +801,7 @@ doNotifyingCommitPrepared(void)
*/
InterruptHoldoffCount = savedInterruptHoldoffCount;
succeeded = false;
FlushErrorState();
}
PG_END_TRY();
......@@ -849,6 +850,7 @@ doNotifyingCommitPrepared(void)
*/
InterruptHoldoffCount = savedInterruptHoldoffCount;
succeeded = false;
FlushErrorState();
}
PG_END_TRY();
}
......@@ -899,7 +901,7 @@ retryAbortPrepared(void)
succeeded = doDispatchDtxProtocolCommand(
DTX_PROTOCOL_COMMAND_RETRY_ABORT_PREPARED, /* flags */ 0,
currentGxact->gid, currentGxact->gxid,
&badGangs, /* raiseError */ false,
&badGangs, /* raiseError */ true,
&direct, NULL, 0);
if (!succeeded)
elog(WARNING, "the distributed transaction 'Abort' broadcast "
......@@ -913,6 +915,7 @@ retryAbortPrepared(void)
*/
InterruptHoldoffCount = savedInterruptHoldoffCount;
succeeded = false;
FlushErrorState();
}
PG_END_TRY();
}
......@@ -1008,7 +1011,7 @@ doNotifyingAbort(void)
{
succeeded = doDispatchDtxProtocolCommand(dtxProtocolCommand, /* flags */ 0,
currentGxact->gid, currentGxact->gxid,
&badGangs, /* raiseError */ false,
&badGangs, /* raiseError */ true,
&direct, NULL, 0);
}
PG_CATCH();
......@@ -1018,6 +1021,7 @@ doNotifyingAbort(void)
*/
InterruptHoldoffCount = savedInterruptHoldoffCount;
succeeded = false;
FlushErrorState();
}
PG_END_TRY();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册