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

refactor: convert Payment Reconciliation to virtual doctype #38148

Merged

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Nov 17, 2023

On large datasets, Payment Reconciliation tool timesout on concurrent usage, with Lock Wait Timeout error. This is due to the design of 'Single' doctype, which fetches the values with for_update lock by default. To avoids this design bottleneck, the reconciliation tool will be converted to Virtual Doctype.

Below doctypes have been converted to Virtual:

  1. Payment Reconciliation
  2. Payment Reconciliation Invoice (Child table)
  3. Payment Reconciliation Payment (Child table)
  4. Payment Reconciliation Allocation (Child table)

Depends on frappe/frappe#23291

Depends on frappe/frappe#23257

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #38148 (f310026) into develop (a5a5341) will increase coverage by 0.00%.
Report is 21 commits behind head on develop.
The diff coverage is 65.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #38148   +/-   ##
========================================
  Coverage    67.26%   67.26%           
========================================
  Files          757      757           
  Lines        60492    60512   +20     
========================================
+ Hits         40689    40703   +14     
- Misses       19803    19809    +6     
Files Coverage Δ
...e/payment_reconciliation/payment_reconciliation.py 91.94% <65.00%> (-1.94%) ⬇️

... and 1 file with indirect coverage changes

@ruthra-kumar ruthra-kumar changed the title fix: prevent lock wait on concurrent usage of reconciliation tool refactor: convert Payment Reconciliation to virtual doctype Nov 20, 2023
@ruthra-kumar ruthra-kumar merged commit 880a85d into frappe:develop Nov 23, 2023
17 of 18 checks passed
@ruthra-kumar
Copy link
Member Author

ruthra-kumar commented Nov 24, 2023

Backport this as well: #38283

ruthra-kumar added a commit that referenced this pull request Dec 4, 2023
…-38148

refactor: convert Payment Reconciliation to virtual doctype (backport #38148)
ruthra-kumar added a commit that referenced this pull request Dec 4, 2023
…-38148

refactor: convert Payment Reconciliation to virtual doctype (backport #38148)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant