symfonic.memory.backends.postgres_forget_deadline¶
postgres_forget_deadline ¶
Private graph forget budget and explicit commit outcome handling.
ForgetCommitIndeterminateError ¶
Bases: RuntimeError
COMMIT was not confirmed; reconcile durable state before retrying.
This does not establish rollback. PostgreSQL can complete COMMIT after the client loses its acknowledgement, including deferred trigger work which PostgreSQL 16 does not cancel with statement_timeout.
forget_transaction
async
¶
Bound graph forget and distinguish confirmed from uncertain commit.
The ambient binding makes graph operations join the fence's connection. A savepoint protects an existing caller transaction on refusal. LOCAL settings remain effective through top-level COMMIT. In a caller transaction, restoration happens before RELEASE so refusal can still roll back the deletion. Disposal after a successful COMMIT cannot report budget refusal. Acquisition, locks and mutations share the one-second deadline. COMMIT is shielded for a 250ms acknowledgement grace after expiry; an unconfirmed outcome discards the connection and raises a distinct error. Any isolation but READ COMMITTED, own or inherited, refuses before work.
Source code in src/symfonic/memory/backends/postgres_forget_deadline.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |