Repository navigation
Synchronize packed validity updates in writable vectors - #904
Merged
staticlibs merged 2 commits intoOct 10, 2026
Merged
staticlibs merged 2 commits into
staticlibs merged 2 commits into
Conversation
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
requested changes
Oct 9, 2026
staticlibs
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR, this is a good catch! The change looks good to me, just a one request to change the lock handling.
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
added a commit
that referenced
this pull request
Oct 10, 2026
This is a backport of the PR #904 to `v2.0-cyanoptera` branch. Co-Authored-By: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
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.
Parallel producers writing different rows of a
DuckDBWritableVectorcan still update the same packed 64-bit validity word. The non-atomic read/modify/write drops other producers' bits, so valid scalar-function results are returned as SQL NULL (and concurrent null writes can be lost).Synchronize only the validity word update on the existing buffer, preserving parallel data writes and Java 8 API compatibility. Extend the existing parallel stream regression and add a barrier-based test covering concurrent valid/null writes.
Validation on JDK 17:
threads=1in the new test to isolate its Java worker barriers, both focused tests passed again; the production change was unchanged apart from comments.AI assistance: DeepSeek assisted implementation and first review; the final diff and actual test output were checked before submission.