Content-Length: 267355 | pFad | http://github.com/postgrespro/postgres_cluster/commit/e5b999cdf25775509b5cc13d642498e3c785a32d

3B End transaction if a participand disconnects from DTMD. · postgrespro/postgres_cluster@e5b999c · GitHub
Skip to content

Commit e5b999c

Browse files
committed
End transaction if a participand disconnects from DTMD.
1 parent 006a3df commit e5b999c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

contrib/pg_dtm/dtmd/src/main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,12 @@ static void ondisconnect(client_t client) {
167167

168168
if ((t = CLIENT_XPART(client))) {
169169
transaction_remove_listener(t, 's', client);
170-
if (use_raft && (raft.role == ROLE_LEADER)) {
171-
raft_emit(&raft, NEGATIVE, t->xid);
170+
if (use_raft) {
171+
if (raft.role == ROLE_LEADER) {
172+
raft_emit(&raft, NEGATIVE, t->xid);
173+
}
174+
} else {
175+
apply_clog_update(NEGATIVE, t->xid);
172176
}
173177
}
174178

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/e5b999cdf25775509b5cc13d642498e3c785a32d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy