Skip to content

db/state: remove unused step param from IteratePrefix#20353

Merged
sudeepdino008 merged 2 commits into
mainfrom
remove-iterateprefix-step-param
Apr 6, 2026
Merged

db/state: remove unused step param from IteratePrefix#20353
sudeepdino008 merged 2 commits into
mainfrom
remove-iterateprefix-step-param

Conversation

@sudeepdino008

Copy link
Copy Markdown
Member
  • 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

@AskAlexSharov AskAlexSharov requested a review from Copilot April 6, 2026 12:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 step parameter from the IteratePrefix callback signature across interfaces, implementations, and call sites.
  • Remove the step field from CursorItem and stop carrying step data through debugIteratePrefixLatest.
  • Remove the unused step from DomainDelPrefix tombstone 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 sudeepdino008 added this pull request to the merge queue Apr 6, 2026
Merged via the queue into main with commit a06ba97 Apr 6, 2026
39 checks passed
@sudeepdino008 sudeepdino008 deleted the remove-iterateprefix-step-param branch April 6, 2026 13:44
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants