diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2021-12-13 12:36:14 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2021-12-13 12:36:14 +0100 |
commit | c1455977c18df6ce317d1aa67d58b133e277596d (patch) | |
tree | 485f042d507f1e19b3718bb09c09642b05a2664f | |
parent | 8b8605852e10a76f10a1e7198bd82caa47179892 (diff) | |
download | exchange-v0.8.4-cb.tar.gz exchange-v0.8.4-cb.tar.bz2 exchange-v0.8.4-cb.zip |
fix shard lock calculation, reduce default number of workers to 0 for nowv0.8.4-cb
m--------- | contrib/gana | 0 | ||||
-rw-r--r-- | src/exchange/taler-exchange-wirewatch.c | 11 |
2 files changed, 8 insertions, 3 deletions
diff --git a/contrib/gana b/contrib/gana -Subproject b7320181c5e0d95c6f2e2a9e5c53dce0bc1a35a +Subproject b123140349c3e3b300878d2e35cea1553c9a381 diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c index fb1fde31..4e805c2e 100644 --- a/src/exchange/taler-exchange-wirewatch.c +++ b/src/exchange/taler-exchange-wirewatch.c @@ -187,7 +187,7 @@ static unsigned int shard_size = MAXIMUM_BATCH_SIZE; /** * How many workers should we plan our scheduling with? */ -static unsigned int max_workers = 16; +static unsigned int max_workers = 0; /** @@ -400,7 +400,10 @@ do_commit (struct WireAccount *wa) break; case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: /* normal case */ - shard_delay = GNUNET_TIME_absolute_get_duration (wa->shard_start_time); + if (wa->delay) + shard_delay = GNUNET_TIME_UNIT_ZERO; + else + shard_delay = GNUNET_TIME_absolute_get_duration (wa->shard_start_time); break; } @@ -512,6 +515,8 @@ history_cb (void *cls, wa->hh = NULL; return GNUNET_SYSERR; } + if (wa->delay) + wa_pos->shard_start_time = GNUNET_TIME_absolute_get (); if (serial_id > wa->shard_end) { /* we are done with the current shard, commit and stop this iteration! */ @@ -750,7 +755,7 @@ main (int argc, GNUNET_GETOPT_option_uint ('w', "workers", "COUNT", - "Plan work load with up to COUNT worker processes (default: 16)", + "Plan work load with up to COUNT worker processes (default: 0)", &max_workers), GNUNET_GETOPT_OPTION_END }; |