RUM-2467: Fix ConcurrentModificationException during ConsentAwareStorage.dropAll call#1764
Merged
0xnm merged 1 commit intoDec 15, 2023
Conversation
mariusc83
reviewed
Dec 15, 2023
| deleteBatch(it, RemovalReason.Flushed) | ||
| lockedBatches.remove(it) | ||
| } | ||
| lockedBatches.clear() |
mariusc83
approved these changes
Dec 15, 2023
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1764 +/- ##
===========================================
+ Coverage 83.43% 83.48% +0.05%
===========================================
Files 469 469
Lines 16394 16391 -3
Branches 2448 2447 -1
===========================================
+ Hits 13678 13683 +5
+ Misses 2048 2039 -9
- Partials 668 669 +1
|
0xnm
deleted the
nogorodnikov/rum-2467/fix-concurrentmodificationexception-in-dropall-call
branch
December 15, 2023 12:52
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.
What does this PR do?
We were removing items from collection during its traversal, this PR fixes that.
The issue doesn't reproduce with only single item in the collection, because modification check it done on the next iteration, so I also updated test to have multiple locked batches.
Review checklist (to be filled by reviewers)