Repository navigation
refactor: separate graph_batch_size from parallel_batches (lanes) - #220
Merged
NityamPareek merged 2 commits intoNov 17, 2026
Merged
Conversation
The "Parallel Batches" slider is meant to control migration plan lanes only, but its value was also passed as ScanConfig.parallel_batches, which the EO estimators use as the Graph $batch sub-request count. Use a dedicated GRAPH_BATCH_REQUEST_SIZE constant (10, the previous default) for scanning; lanes still read the slider directly.
ScanConfig.parallel_batches now only denotes the number of parallel migration plan lanes (the UI slider). The number of sub-requests per Graph $batch call moves to a new ScanConfig.graph_batch_size field (default DEFAULT_GRAPH_BATCH_SIZE = 10). - EO and Files estimators read config.graph_batch_size for create_batches. - Exchange UI passes the slider value as parallel_batches again. - Files UI drops its parallel_batches = 10 override, which only existed to keep the slider out of the $batch size. - Tests that set the $batch size use graph_batch_size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 7 of the Exchange Recoverable Items (litigation hold) work. Targets the
exchange-litigation-holdintegration branch.Problem
ScanConfig.parallel_batcheshad two meanings:$batchsize: the EO and Files estimators passed it tocreate_batchesas the number of sub-requests per Microsoft Graph$batchcall.In the Exchange planner, moving the lanes slider therefore silently changed scan batching (e.g. a value of 1 sent one request per
$batch). The Files planner worked around this by forcingconfig.parallel_batches = 10.Change
util/constants.py: newDEFAULT_GRAPH_BATCH_SIZE = 10.util/utils.py: newScanConfig.graph_batch_size(default 10).ScanConfig.parallel_batchesnow only means lanes.file_estimator.py:create_batchesusesconfig.graph_batch_size(22 call sites).ui/exchange_online_ui.py: still passes the slider asparallel_batches(lanes); the$batchsize comes from the new default.ui/files_ui.py: removed theconfig.parallel_batches = 10override. It is no longer needed, and Files lanes keep usingval_parallel_batches.$batchsize now usegraph_batch_sizewith the same values.Impact
$batchsize = slider value$batchsize = 10; slider controls lanes only$batchsize forced to 10$batchsize = 10 (no behaviour change)parallel_batches= lanesUnchanged: child-folder crawls still use
hierarchial_crawl_batch_limit(4). The shallow file estimator and chat estimator don't callcreate_batches.Testing