Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf7b135

Browse files
committed
GetCUrCId
1 parent62a3bb5 commitcf7b135

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
intnumready;
486486
#ifdefUSE_EPOLL
487487
structepoll_eventevents[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+
intcid=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)

[8]ページ先頭

©2009-2025 Movatter.jp