fix(sei-db): fix flaky RocksDB parallel iteration test#2928
Open
fix(sei-db): fix flaky RocksDB parallel iteration test#2928
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
5a7372d to
65d9a47
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2928 +/- ##
===========================================
- Coverage 68.42% 57.70% -10.72%
===========================================
Files 5 2111 +2106
Lines 456 174218 +173762
===========================================
+ Hits 312 100532 +100220
- Misses 114 64698 +64584
- Partials 30 8988 +8958
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The ReadOptions (and its timestamp slice) created by newTSReadOptions() was not stored after being passed to NewIteratorCF(), making it eligible for GC while the C++ iterator still held a dangling Slice pointer to the timestamp data. Under parallel access this caused iterators to read with corrupted timestamps, returning values from wrong versions. Store ReadOptions in the iterator struct and Destroy() it on Close(). Also fix the same leak in getSlice() used by Get/Has. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65d9a47 to
8f3bc86
Compare
2 tasks
yzang2019
approved these changes
Feb 19, 2026
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.
Summary
TestDatabaseParallelIterationVersionsto flakeReadOptionsobject (and its timestamp slice) created bynewTSReadOptions()was passed toNewIteratorCF()but never stored, making it eligible for GC while the C++ iterator still held a danglingSlicepointer to the timestamp dataval002-011but gotval002-017)ReadOptionsin the iterator struct and callsDestroy()onClose(), ensuring the timestamp data remains valid for the iterator's lifetimeReadOptionsleak ingetSlice()(used byGet/Has)Test plan
TestDatabaseParallelIterationVersions— the previously flaky test should now pass consistently🤖 Generated with Claude Code