Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1200b6a

Browse files
knizhnikkelvich
authored andcommitted
More 2PC
1 parent 17a908a commit 1200b6a

File tree

5 files changed

+172
-124
lines changed

5 files changed

+172
-124
lines changed

arbiter.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ static void MtmTransReceiver(Datum arg)
544544
int nResponses;
545545
int i, j, n, rc;
546546
MtmBuffer* rxBuffer = (MtmBuffer*)palloc(sizeof(MtmBuffer)*nNodes);
547-
HTAB* xid2state;
548547

549548
#if USE_EPOLL
550549
struct epoll_event* events = (struct epoll_event*)palloc(sizeof(struct epoll_event)*nNodes);
@@ -557,7 +556,6 @@ static void MtmTransReceiver(Datum arg)
557556
ds = MtmGetState();
558557

559558
MtmAcceptIncomingConnections();
560-
xid2state = MtmCreateHash();
561559

562560
for (i = 0; i < nNodes; i++) {
563561
rxBuffer[i].used = 0;
@@ -611,7 +609,7 @@ static void MtmTransReceiver(Datum arg)
611609

612610
for (j = 0; j < nResponses; j++) {
613611
MtmArbiterMessage* msg = &rxBuffer[i].data[j];
614-
MtmTransState* ts = (MtmTransState*)hash_search(xid2state, &msg->dxid, HASH_FIND, NULL);
612+
MtmTransState* ts = (MtmTransState*)hash_search(MtmXid2State, &msg->dxid, HASH_FIND, NULL);
615613
Assert(ts != NULL);
616614
Assert(msg->node > 0 && msg->node <= nNodes && msg->node != MtmNodeId);
617615
Assert (MtmIsCoordinator(ts));

0 commit comments

Comments
 (0)