Skip to content

Memory fixes#20040

Merged
sopel39 merged 3 commits intomasterfrom
memory_fixes
Dec 6, 2023
Merged

Memory fixes#20040
sopel39 merged 3 commits intomasterfrom
memory_fixes

Conversation

@sopel39
Copy link
Copy Markdown
Member

@sopel39 sopel39 commented Dec 6, 2023

#19973 with fixups on top (already approved)

@cla-bot cla-bot bot added the cla-signed label Dec 6, 2023
@sopel39
Copy link
Copy Markdown
Member Author

sopel39 commented Dec 6, 2023

cc @gaurav8297

Only update the scaling state if the memory
used is below the limit. Otherwise, if we keep
updating the scaling state and the memory used
is fluctuating around the limit, then we could
do massive scaling in a single rebalancing cycle
which could cause OOM error.
Since we estimate the partitionDataSize based on
partitionRowCount and total data processed. It is
possible that the estimated partitionDataSize is
slightly less than it was estimated at the last
rebalance cycle. That's because for a given partition,
row count hasn't increased, however overall data
processed has increased. Therefore, we need to
make sure that the estimated partitionDataSize
since last rebalance is always greater than 0.
Otherwise, it will affect the ordering of
minTaskBuckets priority queue.
@sopel39 sopel39 merged commit b5d978d into master Dec 6, 2023
@sopel39 sopel39 deleted the memory_fixes branch December 6, 2023 11:59
This was referenced Dec 6, 2023
@github-actions github-actions bot added this to the 435 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants