refactor(sei-db): return cleanup closure from newTSReadOptions#2929
Open
pdrobnjak wants to merge 1 commit intopd/fix-rocks-db-ci-failfrom
Open
refactor(sei-db): return cleanup closure from newTSReadOptions#2929pdrobnjak wants to merge 1 commit intopd/fix-rocks-db-ci-failfrom
pdrobnjak wants to merge 1 commit intopd/fix-rocks-db-ci-failfrom
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## pd/fix-rocks-db-ci-fail #2929 +/- ##
========================================================
Coverage 57.34% 57.34%
========================================================
Files 2095 2095
Lines 172896 172896
========================================================
+ Hits 99142 99145 +3
- Misses 64867 64868 +1
+ Partials 8887 8883 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
newTSReadOptions now returns a cleanup function alongside the ReadOptions, making it harder to forget Destroy() — the compiler forces callers to use or explicitly discard the second return value. The iterator stores a cleanup func() instead of *ReadOptions, called on Close(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
936b2f7 to
73de9e4
Compare
2 tasks
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.
Stacked on #2928.
Summary
ReadOptionscreation into the iterator constructors so callers never handleReadOptionsdirectly — eliminates the possibility of forgetting toDestroy()themnewIterator()creates a versioned iterator with internally managedReadOptions, used byIterator()andReverseIterator()newRangeIterator()creates a timestamp-range iterator with internally managedReadOptions, used byRawIterate()newTSReadOptions()now returns a cleanup closure alongside theReadOptions— for non-iterator uses (getSlice), the compiler forces you to either use or explicitly discard the second return valuecleanup func()instead of*ReadOptions, called onClose()Test plan
🤖 Generated with Claude Code