Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate transactions #64

Closed
jantman opened this issue May 11, 2017 · 0 comments
Closed

Duplicate transactions #64

jantman opened this issue May 11, 2017 · 0 comments

Comments

@jantman
Copy link
Owner

jantman commented May 11, 2017

I was using the transaction input form from a device with poor connectivity, and ended up with duplicate transactions - specifically, 2 transactions with the same content. This seemed to happen intermittently. E.g.:

2017-05-11 00:17:19,122 [INFO transactions.py:293 - biweeklybudget.flaskapp.views.transactions.submit() ] creating new Transaction: {'description': 'Foo', 'date': datetime.date(2017, 5, 10), 'actual_amount': 92.95, 'account_id': 1, 'budget_id': 14, 'notes': ''}
2017-05-11 00:17:19,137 [INFO db.py:172 - biweeklybudget.db.cleanup_db() ] Closing DB session
2017-05-11 00:17:21,313 [INFO db.py:172 - biweeklybudget.db.cleanup_db() ] Closing DB session
2017-05-11 00:18:08,537 [INFO transactions.py:293 - biweeklybudget.flaskapp.views.transactions.submit() ] creating new Transaction: {'description': 'Kroger', 'date': datetime.date(2017, 5, 10), 'actual_amount': 6.43, 'account_id': 1, 'budget_id': 12, 'notes': ''}
2017-05-11 00:18:08,556 [INFO transactions.py:293 - biweeklybudget.flaskapp.views.transactions.submit() ] creating new Transaction: {'description': 'Kroger', 'date': datetime.date(2017, 5, 10), 'actual_amount': 6.43, 'account_id': 1, 'budget_id': 12, 'notes': ''}
2017-05-11 00:18:08,561 [INFO db.py:172 - biweeklybudget.db.cleanup_db() ] Closing DB session
2017-05-11 00:18:08,570 [INFO db.py:172 - biweeklybudget.db.cleanup_db() ] Closing DB session

I don't have gunicorn logs (#63) but it looks like this is coming from the UI side.

Probably need to enable debugging of any POST requests (or anything else that manipulates data) and then try to reproduce this, maybe by artifically injecting latency, and then figure out how to prevent it in the future. My gut reaction is that high latency is probably causing jquery retries...

@jantman jantman added the ready label May 13, 2017
@jantman jantman removed the ready label May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant