Avoid promoting in sweep_in_plan when we already decided not to promote #72998
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.
Fixes #70262
If we happened to be in a case such that:
settings.promote == 0,surv_ratio >= sip_surv_ratio_th, andold_card_surv_ratio >= sip_old_card_surv_ratio_th.Note that when
settings.promote == 0,new_gen_numcomputed byget_plan_gen_numfor a gen 1 region will be 1, so the following condition is satisfied.(new_gen_num < max_generation) && (sip_maxgen_regions_per_gen[gen_num] == regions_per_gen[gen_num])But then
gen_num == 1, now we will hit the assertion.Note that we shouldn't be promoting regions if
settings.promote == 0, if we make the change as in the PR to avoid promoting regions due to old card survival, we will never increasesip_maxgen_regions_per_genand therefore we will not enter the branch leading to the assertion.