db/state: remove unused step param from IteratePrefix#20353
Merged
Conversation
AskAlexSharov
approved these changes
Apr 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the state-domain prefix iteration API by removing an unused step argument from the IteratePrefix callback and cleaning up now-redundant plumbing in cursor and delete-by-prefix code paths.
Changes:
- Remove the unused
stepparameter from theIteratePrefixcallback signature across interfaces, implementations, and call sites. - Remove the
stepfield fromCursorItemand stop carrying step data throughdebugIteratePrefixLatest. - Remove the unused
stepfromDomainDelPrefixtombstone tuple collection and simplify DB cursor advancement logic.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| db/state/temporal_mem_batch.go | Updates TemporalMemBatch.IteratePrefix/HasPrefix to use the new callback signature. |
| db/state/execctx/domain_shared.go | Updates SharedDomains.IteratePrefix signature and removes unused step from DomainDelPrefix tomb collection. |
| db/state/execctx/domain_shared_test.go | Updates tests to match the new IteratePrefix callback signature. |
| db/state/domain_stream.go | Removes CursorItem.step and updates debugIteratePrefixLatest to no longer pass/track step. |
| db/kv/kv_interface.go | Updates TemporalMemBatch interface IteratePrefix callback signature to drop step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sudeepdino008
added a commit
that referenced
this pull request
Apr 13, 2026
- Remove unused `step` parameter from the `IteratePrefix` callback signature (interface, implementations, and all call sites) - Remove `step` field from `CursorItem` struct (only used by `debugIteratePrefixLatest`) - Remove `step` field from `DomainDelPrefix` tombs tuple (was stored but never read) - Collapse step decode in DB cursor advancement to a single `endTxNum` assignment
sudeepdino008
added a commit
that referenced
this pull request
Apr 13, 2026
- Remove unused `step` parameter from the `IteratePrefix` callback signature (interface, implementations, and all call sites) - Remove `step` field from `CursorItem` struct (only used by `debugIteratePrefixLatest`) - Remove `step` field from `DomainDelPrefix` tombs tuple (was stored but never read) - Collapse step decode in DB cursor advancement to a single `endTxNum` assignment
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.
stepparameter from theIteratePrefixcallback signature (interface, implementations, and all call sites)stepfield fromCursorItemstruct (only used bydebugIteratePrefixLatest)stepfield fromDomainDelPrefixtombs tuple (was stored but never read)endTxNumassignment