View Issue Details

IDProjectCategoryView StatusLast Update
0004822Talerobsolete componentpublic2017-06-06 12:18
ReporterFlorian Dold Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.3Fixed in Version0.3 
Summary0004822: bank does not run financial transactions in database transactions
Description... django requires decorators for that.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Marcello Stanisci

2016-11-28 23:45

reporter   ~0011551

Florian, can you elaborate a bit more on that?

Florian Dold

2016-11-28 23:49

manager   ~0011552

Sure, see: https://docs.djangoproject.com/en/1.10/topics/db/transactions/#autocommit-details

When we do a wire transfer, we of course have to touch multiple accounts. But these write operations are currently not run within a DB transaction, due to Django's autocommit behavior.

Marcello Stanisci

2016-12-22 16:10

reporter   ~0011608

Shall I wait your refactoring to be complete to work on this one?

Marcello Stanisci

2017-01-31 13:59

reporter   ~0011682

From [1], it seems that no decorators are needed. Just setting your DB as "atomic" should make it.

[1] https://docs.djangoproject.com/en/1.9/topics/db/transactions/#tying-transactions-to-http-requests

Marcello Stanisci

2017-01-31 14:03

reporter   ~0011683

OTOH, [2] is better, as you're not forced to be in a view to have transactions.

[2] https://docs.djangoproject.com/en/1.9/topics/db/transactions/#controlling-transactions-explicitly

Marcello Stanisci

2017-02-04 09:54

reporter   ~0011689

According to the recent refactoring, there might be few or no places
where this fix should be done.

Marcello Stanisci

2017-02-06 20:36

reporter   ~0011699

3ae843c. The fix occurred at user registration and in wire_transfer().

Issue History

Date ModifiedUsernameFieldChange
2016-11-28 23:39Florian DoldNew Issue
2016-11-28 23:39Florian DoldStatusnew => assigned
2016-11-28 23:39Florian DoldAssigned To => Marcello Stanisci
2016-11-28 23:45Marcello StanisciNote Added: 0011551
2016-11-28 23:49Florian DoldNote Added: 0011552
2016-12-22 16:10Marcello StanisciNote Added: 0011608
2017-01-31 13:59Marcello StanisciNote Added: 0011682
2017-01-31 14:03Marcello StanisciNote Added: 0011683
2017-02-04 09:54Marcello StanisciPrioritynormal => high
2017-02-04 09:54Marcello StanisciNote Added: 0011689
2017-02-06 20:36Marcello StanisciStatusassigned => informing
2017-02-06 20:36Marcello StanisciResolutionopen => fixed
2017-02-06 20:36Marcello StanisciNote Added: 0011699
2017-02-13 12:46Christian GrothoffProduct Version => git (master)
2017-02-13 12:46Christian GrothoffFixed in Version => 0.3
2017-02-13 12:46Christian GrothoffTarget Version => 0.3
2017-06-06 12:18Christian GrothoffStatusinforming => closed
2022-08-23 18:26Christian GrothoffCategorybank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 00:23Christian GrothoffCategorypy bank (demonstrator, obsolete) => obsolete componet
2023-12-11 19:08Florian DoldCategoryobsolete componet => obsolete component