View Issue Details

IDProjectCategoryView StatusLast Update
0009273Talermechant backendpublic2024-10-16 13:49
Reporterfefe Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Product Versiongit (master) 
Summary0009273: Do we need some explicit transactions? ex: deposit_get_cb
DescriptionHere 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?


TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-10-16 13:49 fefe New Issue
2024-10-16 13:49 fefe Status new => assigned
2024-10-16 13:49 fefe Assigned To => Christian Grothoff