MCPcopy Create free account
hub / github.com/apache/cloudberry / doNotifyingOnePhaseCommit

Function doNotifyingOnePhaseCommit

src/backend/cdb/cdbtm.c:550–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550static void
551doNotifyingOnePhaseCommit(void)
552{
553 bool succeeded;
554
555 if (MyTmGxactLocal->dtxSegments == NIL)
556 return;
557
558 elog(DTM_DEBUG5, "doNotifyingOnePhaseCommit entering in state = %s", DtxStateToString(MyTmGxactLocal->state));
559
560 Assert(MyTmGxactLocal->state == DTX_STATE_ONE_PHASE_COMMIT);
561 setCurrentDtxState(DTX_STATE_NOTIFYING_ONE_PHASE_COMMIT);
562
563 succeeded = currentDtxDispatchProtocolCommand(DTX_PROTOCOL_COMMAND_COMMIT_ONEPHASE, true);
564 if (!succeeded)
565 {
566 /* If error is not thrown after failure then we have to throw it. */
567 Assert(MyTmGxactLocal->state == DTX_STATE_NOTIFYING_ONE_PHASE_COMMIT);
568 ereport(ERROR,
569 (errmsg("one phase commit notification failed"),
570 TM_ERRDETAIL));
571 }
572}
573
574static void
575doNotifyingCommitPrepared(void)

Callers 1

prepareDtxTransactionFunction · 0.85

Calls 4

DtxStateToStringFunction · 0.85
setCurrentDtxStateFunction · 0.85
errmsgFunction · 0.50

Tested by

no test coverage detected