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

Commitd2c797c

Browse files
committed
Add artificial delay in DTMD
1 parentf39bac5 commitd2c797c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎contrib/multimaster/dtmd/src/server.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,6 @@ static bool stream_flush(stream_t stream) {
171171
/* nothing to do */
172172
return true;
173173
}
174-
{
175-
structtimespects;
176-
intrc;
177-
ts.tv_sec=0;
178-
ts.tv_nsec=100000;/* 100usec */
179-
while (nanosleep(&ts,&ts)<0);
180-
}
181174
char*cursor=stream->output.data;
182175
while (tosend>0) {
183176
/* repeat sending until we send everything */

‎contrib/multimaster/libdtm.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include<unistd.h>
77
#include<stdlib.h>
88
#include<assert.h>
9+
#include<time.h>
910

1011
#include"libdtm.h"
1112
#include"dtmd/include/proto.h"
@@ -168,6 +169,12 @@ static int dtm_recv_results(DTMConn dtm, int maxlen, xid_t *results)
168169
elog(ERROR,"The message body will not fit into the results array");
169170
return0;
170171
}
172+
{
173+
structtimespects;
174+
ts.tv_sec=0;
175+
ts.tv_nsec=100000;/* 100usec */
176+
while (nanosleep(&ts,&ts)<0);
177+
}
171178
while (recved<needed)
172179
{
173180
intnewbytes=read(dtm->sock, (char*)results+recved,needed-recved);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp