Skip to content

Commit

Permalink
Restrict RecoverWorkerTransactions to Remote Worker Nodes
Browse files Browse the repository at this point in the history
Prepared transactions on the local node are initiated and managed by a
remote worker in the cluster. As such, we now only call
RecoverWorkerTransactions for remote nodes, ensuring that transaction
recovery is handled by the appropriate node.
  • Loading branch information
codeforall committed Feb 26, 2025
1 parent ca8cb7a commit 261c0c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/distributed/transaction/transaction_recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ RecoverTwoPhaseCommits(void)
/* take advisory lock first to avoid running concurrently */
LockTransactionRecovery(ShareUpdateExclusiveLock);

List *workerList = ActivePrimaryNodeList(NoLock);
List *workerList = ActivePrimaryRemoteNodeList(NoLock);
List *workerConnections = NIL;
WorkerNode *workerNode = NULL;
MultiConnection *connection = NULL;
Expand Down

0 comments on commit 261c0c9

Please sign in to comment.