Content-Length: 277578 | pFad | http://github.com/postgrespro/postgres_cluster/commit/47bb53478f34f75b392844c60a2323ff28968806

B9 Add -s option to dtmacid · postgrespro/postgres_cluster@47bb534 · GitHub
Skip to content

Commit 47bb534

Browse files
committed
Add -s option to dtmacid
1 parent e19bdea commit 47bb534

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/mmts/tests/dtmacid.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ void* writer(void* arg)
166166
//work
167167
//transaction<repeatable_read> txn(*conns[random() % conns.size()]);
168168
transaction<read_committed> txn(*conns[random() % conns.size()]);
169-
int acc = random() % cfg.nAccounts;
169+
int acc = cfg.scatter
170+
? random() % (cfg.nAccounts/cfg.nWriters) * cfg.nWriters + t.id
171+
: random() % cfg.nAccounts;
172+
170173
try {
171174
exec(txn, "update t set v = v + 1 where u=%d", acc);
172175
txn.commit();
@@ -247,6 +250,7 @@ int main (int argc, char* argv[])
247250
"\t-n N\tnumber of iterations (1000)\n"
248251
"\t-p N\tupdate percent (100)\n"
249252
"\t-c STR\tdatabase connection string\n"
253+
"\t-s\tavoid conflicts\n"
250254
"\t-i\tinitialize database\n");
251255
return 1;
252256
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/47bb53478f34f75b392844c60a2323ff28968806

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy