[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -fix looping wirewatch (hopefull
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -fix looping wirewatch (hopefully) |
Date: |
Wed, 26 Oct 2022 23:06:30 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 38a078d5 -fix looping wirewatch (hopefully)
38a078d5 is described below
commit 38a078d543f53ca4925ea364919306395e7e4597
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Oct 26 23:06:23 2022 +0200
-fix looping wirewatch (hopefully)
---
src/exchange/taler-exchange-wirewatch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-wirewatch.c
b/src/exchange/taler-exchange-wirewatch.c
index 61af32dc..146f2ee7 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -827,6 +827,8 @@ lock_shard (void *cls)
struct WireAccount *wa = cls;
enum GNUNET_DB_QueryStatus qs;
struct GNUNET_TIME_Relative delay;
+ uint64_t last_shard_start = wa->shard_start;
+ uint64_t last_shard_end = wa->shard_end;
task = NULL;
if (GNUNET_SYSERR ==
@@ -904,6 +906,7 @@ lock_shard (void *cls)
GNUNET_YES));
wa->delayed_until = GNUNET_TIME_relative_to_absolute (
wirewatch_idle_sleep_interval);
+ wa->shard_open = false;
GNUNET_assert (NULL == task);
schedule_transfers (wa->next);
return;
@@ -912,7 +915,6 @@ lock_shard (void *cls)
break;
}
wa->shard_end_time = GNUNET_TIME_relative_to_absolute (delay);
- wa->shard_open = true;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Starting with shard %s at (%llu,%llu] locked for %s\n",
wa->job_name,
@@ -923,7 +925,13 @@ lock_shard (void *cls)
wa->delay = true; /* default is to delay, unless
we find out that we're really busy */
wa->batch_start = wa->shard_start;
- wa->latest_row_off = wa->batch_start;
+ if ( (wa->shard_open) &&
+ (wa->shard_start == last_shard_start) &&
+ (wa->shard_end == last_shard_end) )
+ GNUNET_break (wa->latest_row_off >= wa->batch_start); /* resume where we
left things */
+ else
+ wa->latest_row_off = wa->batch_start;
+ wa->shard_open = true;
task = GNUNET_SCHEDULER_add_now (&continue_with_shard,
wa);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -fix looping wirewatch (hopefully),
gnunet <=