Skip to content

perf: GLE reposting with progress and chunking#31343

Merged
ankush merged 1 commit intofrappe:developfrom
ankush:chunked_gl_reposting
Jun 14, 2022
Merged

perf: GLE reposting with progress and chunking#31343
ankush merged 1 commit intofrappe:developfrom
ankush:chunked_gl_reposting

Conversation

@ankush
Copy link
Member

@ankush ankush commented Jun 13, 2022

If stock voucher count goes >1000 then fetching all gles and reposting
them all at once requires much more memory and can cause crash.

@github-actions github-actions bot added accounts needs-tests This PR needs automated unit-tests. labels Jun 13, 2022
@ankush ankush force-pushed the chunked_gl_reposting branch from cc15826 to c19d3ed Compare June 13, 2022 15:14
@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #31343 (817c615) into develop (39338e7) will increase coverage by 0.07%.
The diff coverage is 95.83%.

@@             Coverage Diff             @@
##           develop   #31343      +/-   ##
===========================================
+ Coverage    63.57%   63.64%   +0.07%     
===========================================
  Files          984      984              
  Lines        67530    67539       +9     
===========================================
+ Hits         42931    42985      +54     
+ Misses       24599    24554      -45     
Impacted Files Coverage Δ
...ype/repost_item_valuation/repost_item_valuation.py 70.46% <ø> (ø)
erpnext/accounts/utils.py 70.37% <95.83%> (+0.11%) ⬆️
...tch_item_expiry_status/batch_item_expiry_status.py 67.92% <0.00%> (-24.53%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 67.79% <0.00%> (-22.04%) ⬇️
...unts/report/purchase_register/purchase_register.py 71.71% <0.00%> (-5.27%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 74.25% <0.00%> (-2.98%) ⬇️
...next/accounts/doctype/bank_account/bank_account.py 77.27% <0.00%> (-2.28%) ⬇️
erpnext/stock/doctype/item_price/item_price.py 92.98% <0.00%> (-1.76%) ⬇️
.../fifo_queue_vs_qty_after_transaction_comparison.py 93.10% <0.00%> (-1.73%) ⬇️
...e_sales_analytics/supplier_wise_sales_analytics.py 88.52% <0.00%> (-1.64%) ⬇️
... and 27 more

@ankush ankush force-pushed the chunked_gl_reposting branch 2 times, most recently from b2c0b9c to c1e2fb5 Compare June 13, 2022 16:36
@ankush ankush changed the title perf: chunked GLE reposting perf: GLE reposting with progress and chunking Jun 13, 2022
@ankush ankush removed the needs-tests This PR needs automated unit-tests. label Jun 13, 2022
If stock voucher count goes >1000 then fetching all gles and reposting
them all at once requires much more memory and can cause crash.

- This PR ensures that GLE reposting is done in chunks of 100 vouchers.
- This PR also starts keeping track of how many such chunks were
  processed so in future progress is resumed in event of timeout.
@ankush ankush force-pushed the chunked_gl_reposting branch from c1e2fb5 to 817c615 Compare June 13, 2022 17:14
@ankush ankush linked an issue Jun 14, 2022 that may be closed by this pull request
@ankush ankush marked this pull request as ready for review June 14, 2022 12:50
@ankush ankush merged commit 2535d5e into frappe:develop Jun 14, 2022
@ankush ankush deleted the chunked_gl_reposting branch June 14, 2022 12:50
mergify bot pushed a commit that referenced this pull request Jun 14, 2022
If stock voucher count goes >1000 then fetching all gles and reposting
them all at once requires much more memory and can cause crash.

- This PR ensures that GLE reposting is done in chunks of 100 vouchers.
- This PR also starts keeping track of how many such chunks were
  processed so in future progress is resumed in event of timeout.

(cherry picked from commit 2535d5e)

# Conflicts:
#	erpnext/accounts/utils.py
ankush added a commit that referenced this pull request Jun 15, 2022
)

* fix: dont use cached doc for GLE reposts

ported from #31240

* perf: GLE reposting with progress and chunking

If stock voucher count goes >1000 then fetching all gles and reposting
them all at once requires much more memory and can cause crash.

- This PR ensures that GLE reposting is done in chunks of 100 vouchers.
- This PR also starts keeping track of how many such chunks were
  processed so in future progress is resumed in event of timeout.

* test: add "actual" test for chunked GLE reposting
frappe-pr-bot pushed a commit that referenced this pull request Jun 21, 2022
## [13.34.1](v13.34.0...v13.34.1) (2022-06-21)

### Bug Fixes

* Conversion rate validation for multi-currency invoices ([4186aaf](4186aaf))
* **india:** e-invoice eligibility if company gstin is not configured ([#31247](#31247)) ([7696ae4](7696ae4))
* internal transfer GLE validation ([8a4cd2a](8a4cd2a))
* Merge Conflicts ([0f3a02d](0f3a02d))
* Pick Template BOM if variant BOM absent in WO popup from SO ([7c35887](7c35887))
* Quotation lost update ([3b9f943](3b9f943))
* Spelling mistake in quotation depend on (backport [#31362](#31362)) ([#31363](#31363)) ([ebcdaf7](ebcdaf7))
* transaction date gets unset in material request ([#31387](#31387)) ([4e2ed6f](4e2ed6f)), closes [#31327](#31327)
* UOM handling for transaction without item (backport [#31389](#31389)) ([#31391](#31391)) ([051e5cd](051e5cd))

### Performance Improvements

* GLE reposting with progress and chunking (backport [#31343](#31343)) ([#31373](#31373)) ([f19ed0b](f19ed0b))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chunk GLE reposts

1 participant