Skip to content

Commit cf7b135

Browse files
committed
GetCUrCId
1 parent 62a3bb5 commit cf7b135

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

contrib/multimaster/dtmd/src/server.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,11 @@ void server_loop(server_t server) {
485485
int numready;
486486
#ifdef USE_EPOLL
487487
struct epoll_event events[MAX_EVENTS];
488-
numready = epoll_wait(server->epollfd, events, MAX_EVENTS, -1);
488+
numready = epoll_wait(server->epollfd, events, MAX_EVENTS, -1);
489489
if (numready < 0) {
490+
if (errno == EINTR) {
491+
continue;
492+
}
490493
shout("failed to select: %s\n", strerror(errno));
491494
return;
492495
}

contrib/multimaster/multimaster.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,11 @@ static Snapshot DtmGetSnapshot(Snapshot snapshot)
617617
{
618618
if (TransactionIdIsValid(DtmNextXid) && snapshot != &CatalogSnapshotData)
619619
{
620-
if (!DtmHasGlobalSnapshot && (snapshot != DtmLastSnapshot || DtmCurcid != snapshot->curcid)) {
620+
int cid = GetCurrentCommandId(false);
621+
if (!DtmHasGlobalSnapshot && (snapshot != DtmLastSnapshot || DtmCurcid != cid) {
621622
DtmGlobalGetSnapshot(DtmNextXid, &DtmSnapshot, &dtm->minXid);
622623
}
623-
DtmCurcid = snapshot->curcid;
624+
DtmCurcid = cid;
624625
DtmLastSnapshot = snapshot;
625626
DtmMergeWithGlobalSnapshot(snapshot);
626627
if (!IsolationUsesXactSnapshot())

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy