Disable mark list optimization if we hit a per region mark list overflow (#86508) #87339
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.
Backport of #86508 to release/7.0-staging
Customer Impact
FASTER is a popular open-source key-value store in .NET that has production use within and across Microsoft. This bug is causing a direct impact on the usability of FASTER, for the scenario where instances are created and destroyed frequently. Fixing this will allow the safe use of FASTER in production by both Microsoft and external customers of FASTER.
The root cause of this bug is that under server GC, it is possible for us to run out of memory to store the mark list for a region. In that case, the code before the fix will assume the partially filled mark list as all the marked objects and therefore prematurely release the marked objects that were left out. This change will fix the issue by making sure we don't use the partially filled mark list in case we ran out of space.
Testing
Risk
Low, this change is merged to the main branch for a month now and nothing happened since.