MCPcopy
hub / github.com/psycopg/psycopg / tpc_rollback

Method tpc_rollback

psycopg/psycopg/connection_async.py:607–612  ·  view source on GitHub ↗

Roll back a prepared two-phase transaction.

(self, xid: Xid | str | None = None)

Source from the content-addressed store, hash-verified

605 await self.wait(self._tpc_finish_gen("COMMIT", xid))
606
607 async def tpc_rollback(self, xid: Xid | str | None = None) -> None:
608 """
609 Roll back a prepared two-phase transaction.
610 """
611 async with self.lock:
612 await self.wait(self._tpc_finish_gen("ROLLBACK", xid))
613
614 async def tpc_recover(self) -> list[Xid]:
615 self._check_tpc()

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
_tpc_finish_genMethod · 0.80

Tested by

no test coverage detected