-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix NPE when concurrent delete #518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1683,6 +1679,114 @@ public void findOneAndReplace() { | |||
} | |||
} | |||
|
|||
@Nested | |||
@Order(8) | |||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem to be duplicate for FindOneAndDeleteIntegrationTest
, but just with vector column.
I think I would not add these since it's more code to maintain and does not add much more verification.
@@ -321,4 +317,151 @@ public void checkMetrics() { | |||
FindOneAndDeleteIntegrationTest.super.checkMetrics("FindOneAndDeleteCommand"); | |||
} | |||
} | |||
|
|||
@Nested | |||
class ConcurrentDelete { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! If these failed (at least for some runs) without the fix, and pass (reliably) with the fix (couple of sample runs should be enough to prove), that's good.
What this PR does:
findOneAndDelete with projection under concurrent situation.
For example, some requests read
a
successfully, but delete will fail becausea
has been deleted. In the retry process, JSON API will try to reada
again, this time it read anull
. Then when apply projection, there will be a NPE.This issue will occur not with vectors, but also when doing findOneAndDelete with normal filter +projection.
The fix has passed the IT and also benchmark test.
Which issue(s) this PR fixes:
Fixes #517
Checklist