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

Commit14d6ed8

Browse files
committed
Change DtmAdjustOldestXid
1 parentddfe0c0 commit14d6ed8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎contrib/pg_tsdtm/pg_dtm.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ static TransactionId DtmAdjustOldestXid(TransactionId xid)
393393
DtmTransStatus*ts,*prev=NULL;
394394
timestamp_tcutoff_time=dtm_get_current_time()-DtmVacuumDelay*USEC;
395395
SpinLockAcquire(&local->lock);
396+
ts= (DtmTransStatus*)hash_search(xid2status,&xid,HASH_FIND,NULL);
397+
if (ts!=NULL) {
398+
cutoff_time=ts->cid-DtmVacuumDelay*USEC;
399+
}
396400
for (ts=local->trans_list_head;ts!=NULL&&ts->cid<cutoff_time;prev=ts,ts=ts->next) {
397401
if (prev!=NULL) {
398402
hash_search(xid2status,&prev->xid,HASH_REMOVE,NULL);

‎contrib/pg_tsdtm/tests/transfers.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

1212
const (
13-
TRANSFER_CONNECTIONS=100
13+
TRANSFER_CONNECTIONS=10
1414
INIT_AMOUNT=10000
15-
N_ITERATIONS=1000
15+
N_ITERATIONS=10000
1616
N_ACCOUNTS=100000
1717
)
1818

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp