View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005281 | Taler | mechant backend | public | 2018-02-20 13:10 | 2024-01-12 14:04 |
Reporter | Florian Dold | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.5 | Fixed in Version | 0.5 | ||
Summary | 0005281: before handling a request, we should check if we are running in an un-commited transaction | ||||
Description | Currently it is very hard to notice when we forgot to commit/abort a transaction. It can lead to weird results, like a constraint violation when we then "accidentally" abort previous inserts in a soft-failure retry. Instead every request should first check if we are running inside a transaction, and if that's the case, commit it (or abort??) and log an error. | ||||
Tags | No tags attached. | ||||
|
Well, I've checked, and the only way to _check_ whether we are in an uncommitted transaction seems to be to either try to COMMIT or ROLLBACK it. I am not sure which one is better... |
|
While the psql tool somehow can indicate on COMMIT that no transaction is pending, the libpq API doesn't seem to disclose that state to me (these transactions _always_ succeed, even without START). So I've added some explicit logic inside our code to track START/COMMIT/ROLLBACK events. This is not quite as certain to catch the un-COMMITed transactions as asking psql might be, but it is more efficient *and* should catch all but the most blatant violations of the overall design. |
|
Fixed now (last commit to merchant: 5f64092..9b56f3e). |
|
Fix committed to master branch. |
exchange: master a166ca7f 2018-03-12 12:33 Details Diff |
fix 0005281 for exchange: do preflight check that an old transaction is no longer running by accident |
Affected Issues 0005281 |
|
mod - src/auditor/taler-auditor.c | Diff File | ||
mod - src/auditor/taler-wire-auditor.c | Diff File | ||
mod - src/exchange/taler-exchange-aggregator.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_db.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_db.h | Diff File | ||
mod - src/exchange/taler-exchange-httpd_deposit.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_keystate.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_payback.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_refresh_link.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_refresh_melt.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_refresh_reveal.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_refund.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_reserve_status.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_reserve_withdraw.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_track_transaction.c | Diff File | ||
mod - src/exchange/taler-exchange-httpd_track_transfer.c | Diff File | ||
mod - src/exchange/taler-exchange-wirewatch.c | Diff File | ||
mod - src/exchange/test_taler_exchange_aggregator.c | Diff File | ||
mod - src/exchangedb/perf_taler_exchangedb_interpreter.c | Diff File | ||
mod - src/exchangedb/plugin_exchangedb_postgres.c | Diff File | ||
mod - src/exchangedb/test_exchangedb.c | Diff File | ||
mod - src/include/taler_exchangedb_plugin.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-20 13:10 | Florian Dold | New Issue | |
2018-02-20 13:10 | Florian Dold | Status | new => assigned |
2018-02-20 13:10 | Florian Dold | Assigned To | => Christian Grothoff |
2018-03-04 01:02 | Christian Grothoff | Note Added: 0012877 | |
2018-03-12 11:47 | Christian Grothoff | Note Added: 0012881 | |
2018-03-12 12:30 | Christian Grothoff | Note Added: 0012882 | |
2018-03-12 12:30 | Christian Grothoff | Status | assigned => resolved |
2018-03-12 12:30 | Christian Grothoff | Resolution | open => fixed |
2018-03-12 12:30 | Christian Grothoff | Fixed in Version | => 0.5 |
2018-03-12 12:30 | Christian Grothoff | Target Version | 0.6 => 0.5 |
2018-04-15 20:33 | Christian Grothoff | Status | resolved => closed |
2021-09-02 18:13 | Christian Grothoff | Changeset attached | => Taler-exchange master a166ca7f |
2021-09-02 18:14 | Christian Grothoff | Note Added: 0018284 | |
2024-01-12 14:04 | Christian Grothoff | Category | merchant backend API (C) => mechant backend |