diff options
| author | Christian Grothoff <christian@grothoff.org> | 2022-04-14 00:00:50 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2022-04-14 00:00:50 +0200 | 
| commit | a13f90a15ee910c0ada316366e197de11bc6cc62 (patch) | |
| tree | 2e4b400aa740782f65918eff487949409205f1bd /src/exchange | |
| parent | 5882e6b56bd64296761ba10d1192499808e5c594 (diff) | |
add wirewatch shutdown shard cleanup logic
Diffstat (limited to 'src/exchange')
| -rw-r--r-- | src/exchange/taler-exchange-wirewatch.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c index 6b63de76..58c8f82a 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);      } | 
