View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009273 | Taler | mechant backend | public | 2024-10-16 13:49 | 2024-10-16 13:49 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Product Version | git (master) | ||||
Summary | 0009273: Do we need some explicit transactions? ex: deposit_get_cb | ||||
Description | Here is the relevant code from deposit_get_cb (in src/backend/taler-merchant-depositcheck.c) 430 qs = db_plugin->insert_deposit_to_transfer ( 431 db_plugin->cls, 432 w->deposit_serial, 433 &dr->details.ok); 434 if (qs < 0) 435 { 436 GNUNET_break (0); 437 GNUNET_SCHEDULER_shutdown (); 438 return; 439 } 440 qs = db_plugin->update_deposit_confirmation_status ( 441 db_plugin->cls, 442 w->deposit_serial, 443 false, /* we are done, wire_pending is now false */ 444 GNUNET_TIME_absolute_to_timestamp (future_retry), 445 w->retry_backoff, 446 NULL); We do an insert first and then an update. If something happens in the middle, like an allocation failure, or a network issue to the database, do we leave the database in an inconsistent state without a transaction around them both here? | ||||
Tags | No tags attached. | ||||