IGNITE-18843 Fix the behavior of MvPartitionStorage#pollForVacuum when trying to delete the same row in parallel#1697
Merged
tkalkirill merged 14 commits intoapache:mainfrom Feb 23, 2023
Merged
Conversation
ibessonov
reviewed
Feb 22, 2023
.../storage-api/src/main/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowId.java
Outdated
Show resolved
Hide resolved
.../storage-api/src/main/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowId.java
Outdated
Show resolved
Hide resolved
.../storage-api/src/main/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowId.java
Outdated
Show resolved
Hide resolved
.../storage-api/src/main/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowId.java
Outdated
Show resolved
Hide resolved
|
|
||
| return reentrantLockLockHolder.decrementHolders() ? null : reentrantLockLockHolder; | ||
| }); | ||
| } while (untilHoldByCurrentThread && lock.getHoldCount() > 0); |
Contributor
There was a problem hiding this comment.
You don't remove the holder from the map, is this intentional?
Contributor
Author
There was a problem hiding this comment.
I think that I delete holder when LockHolder#decrementHolders returned true i.e. no one else holds the lock.
Contributor
There was a problem hiding this comment.
I'm sorry, I made a mistake, I probably meant a thread-local set. You nullify it once somewhere later, right?
Contributor
Author
There was a problem hiding this comment.
I do it outside this private method.
| } | ||
|
|
||
| @Test | ||
| void testSimpleReEnter() { |
Contributor
There was a problem hiding this comment.
I see no assertions in this test
Contributor
Author
There was a problem hiding this comment.
This is a simple test that checks that there are no errors when using the api.
...rage-api/src/test/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowIdTest.java
Outdated
Show resolved
Hide resolved
...rage-api/src/test/java/org/apache/ignite/internal/storage/util/ReentrantLockByRowIdTest.java
Show resolved
Hide resolved
...tures/java/org/apache/ignite/internal/storage/AbstractMvPartitionStorageConcurrencyTest.java
Outdated
Show resolved
Hide resolved
ibessonov
reviewed
Feb 23, 2023
...ixtures/java/org/apache/ignite/internal/testframework/matchers/CompletableFutureMatcher.java
Outdated
Show resolved
Hide resolved
ibessonov
approved these changes
Feb 23, 2023
lowka
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Mar 18, 2023
…n trying to delete the same row in parallel (apache#1697)
lowka
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Apr 19, 2023
…n trying to delete the same row in parallel (apache#1697)
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.
https://issues.apache.org/jira/browse/IGNITE-18843