Skip to content

MINOR: De-duplicate Metered*WithHeaders read-only-record iterators - #22975

Open
Jess668 wants to merge 1 commit into
apache:trunkfrom
Jess668:dedup-metered-withheaders-readonly-iterators
Open

MINOR: De-duplicate Metered*WithHeaders read-only-record iterators#22975
Jess668 wants to merge 1 commit into
apache:trunkfrom
Jess668:dedup-metered-withheaders-readonly-iterators

Conversation

@Jess668

@Jess668 Jess668 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The read-only-record iterators backing the headers-aware IQv2 query types (MeteredSessionStoreWithHeaders, MeteredTimestampedWindowStoreWithHeaders, MeteredTimestampedKeyValueStoreWithHeaders) each hand-rolled the same metering lifecycle: stamping the open time, registering in numOpenIterators/openIterators, and recording the operation and iterator-duration sensors on close. Only next() genuinely differs per store.

Extract that lifecycle into a shared AbstractMeteredReadOnlyRecordIterator<RawKey, K, V>. Each store's iterator now extends it and implements only next().

@github-actions github-actions Bot added triage PRs from the community streams labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant