Skip to content

Add partition offset methods for multiple OffsetSpecs - #1938

Merged
masesdevelopers merged 3 commits into
masterfrom
1936-add-more-function-to-retrieve-earliest-offsets-and-other-kind
Aug 7, 2026
Merged

Add partition offset methods for multiple OffsetSpecs#1938
masesdevelopers merged 3 commits into
masterfrom
1936-add-more-function-to-retrieve-earliest-offsets-and-other-kind

Conversation

@masesdevelopers

Copy link
Copy Markdown
Contributor

Description

Introduce multiple partition-offset helpers: ForTimestampPartitionOffsetForTopic (DateTime and unix-ms), MaxTimestamp, Earliest, EarliestLocal, EarliestPendingUpload, Latest and LatestTiered. Refactor PartitionOffsetForTopic to accept an OffsetSpec and a delta adjustment (used to normalize latest offsets), and update offset computation accordingly. Also add System using. This replaces the prior LastPartitionOffsetForTopic with more explicit OffsetSpec-based methods and centralizes disposal/OffsetSpec handling.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Introduce multiple partition-offset helpers: ForTimestampPartitionOffsetForTopic (DateTime and unix-ms), MaxTimestamp, Earliest, EarliestLocal, EarliestPendingUpload, Latest and LatestTiered. Refactor PartitionOffsetForTopic to accept an OffsetSpec and a delta adjustment (used to normalize latest offsets), and update offset computation accordingly. Also add System using. This replaces the prior LastPartitionOffsetForTopic with more explicit OffsetSpec-based methods and centralizes disposal/OffsetSpec handling.
@masesdevelopers masesdevelopers self-assigned this Aug 7, 2026
@masesdevelopers
masesdevelopers requested a review from a team as a code owner August 7, 2026 21:19
@masesdevelopers masesdevelopers added enhancement New feature or request KNet KNet related issue labels Aug 7, 2026
@masesdevelopers masesdevelopers linked an issue Aug 7, 2026 that may be closed by this pull request
@masesdevelopers
masesdevelopers merged commit 6022cef into master Aug 7, 2026
29 checks passed
@masesdevelopers
masesdevelopers deleted the 1936-add-more-function-to-retrieve-earliest-offsets-and-other-kind branch August 7, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request KNet KNet related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more function to retrieve Earliest offsets and other kind

1 participant