View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005281 | Taler | merchant backend | public | 2018-02-20 12:10 | 2024-01-12 13:04 |
| Reporter | Florian Dold | Assigned To | Christian Grothoff | Resolution deadline | |
| Implementer | Reviewer | ||||
| Release signed by | Deployed by | ||||
| Verifier | Communicator | ||||
| Data protection authority notification required | No | ||||
| CSIRT notification required | No | ||||
| Estimated effort (hours) | Actual effort (hours) | 0 | |||
| Fast-track | No | ||||
| Work package | none | ||||
| 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. | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-02-20 12:10 | Florian Dold | New Issue | |
| 2018-02-20 12:10 | Florian Dold | Status | new => assigned |
| 2018-02-20 12:10 | Florian Dold | Assigned To | => Christian Grothoff |
| 2018-03-04 00:02 | Christian Grothoff | Note Added: 0012877 | |
| 2018-03-12 10:47 | Christian Grothoff | Note Added: 0012881 | |
| 2018-03-12 11:30 | Christian Grothoff | Note Added: 0012882 | |
| 2018-03-12 11:30 | Christian Grothoff | Status | assigned => informing |
| 2018-03-12 11:30 | Christian Grothoff | Resolution | open => fixed |
| 2018-03-12 11:30 | Christian Grothoff | Fixed in Version | => 0.5 |
| 2018-03-12 11:30 | Christian Grothoff | Target Version | 0.6 => 0.5 |
| 2018-04-15 18:33 | Christian Grothoff | Status | informing => closed |
| 2021-09-02 16:13 | Christian Grothoff | ||
| 2021-09-02 16:14 | Christian Grothoff | Note Added: 0018284 | |
| 2024-01-12 13:04 | Christian Grothoff | Category | merchant backend API (C) => mechant backend |
| 2025-03-22 13:09 | Christian Grothoff | Category | mechant backend => merchant backend |