summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-14 00:00:50 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-14 00:00:50 +0200
commita13f90a15ee910c0ada316366e197de11bc6cc62 (patch)
tree2e4b400aa740782f65918eff487949409205f1bd /src/exchange
parent5882e6b56bd64296761ba10d1192499808e5c594 (diff)
downloadexchange-a13f90a15ee910c0ada316366e197de11bc6cc62.tar.gz
exchange-a13f90a15ee910c0ada316366e197de11bc6cc62.tar.bz2
exchange-a13f90a15ee910c0ada316366e197de11bc6cc62.zip
add wirewatch shutdown shard cleanup logic
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-wirewatch.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
index 6b63de76a..58c8f82a5 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -226,6 +226,8 @@ shutdown_task (void *cls)
while (NULL != (wa = wa_head))
{
+ enum GNUNET_DB_QueryStatus qs;
+
if (NULL != wa->hh)
{
TALER_BANK_credit_history_cancel (wa->hh);
@@ -239,7 +241,13 @@ shutdown_task (void *cls)
db_plugin->rollback (db_plugin->cls);
wa->started_transaction = false;
}
- // FIXME: delete shard lock here (#7124)
+ qs = db_plugin->abort_shard (db_plugin->cls,
+ wa_pos->job_name,
+ wa_pos->shard_start,
+ wa_pos->shard_end);
+ if (qs <= 0)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failed to abort work shard on shutdown\n");
GNUNET_free (wa->job_name);
GNUNET_free (wa);
}