Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-18080: Replace DelayedItem by Long type #17927

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

Yunyung
Copy link
Contributor

@Yunyung Yunyung commented Nov 23, 2024

Remove DelayedItem and update the code accordingly.

JIRA: https://issues.apache.org/jira/browse/KAFKA-18080

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added core Kafka Broker small Small PRs labels Nov 23, 2024
@Yunyung Yunyung marked this pull request as draft November 23, 2024 23:13
@chia7712
Copy link
Contributor

@Yunyung Could you please remove DelayedItem directly? the only use case is PartitionFetchState and so we can pass dueMs: Option[Long] instead of delay Option[DelayedItem]. The method isDelayed can be replaced by following code.

def isDelayed: Boolean = dueMs.map(_ - Time.SYSTEM.milliseconds).exists(_ > 0)

@Yunyung Yunyung marked this pull request as ready for review November 24, 2024 10:11
@Yunyung
Copy link
Contributor Author

Yunyung commented Nov 24, 2024

Thank you! I removed DelayedItem and updated the only use case, PartitionFetchState, accordingly.

@Yunyung
Copy link
Contributor Author

Yunyung commented Nov 24, 2024

Fix the typo I found in the code comment for PartitionFetchState.

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM

@chia7712 chia7712 merged commit cebec91 into apache:trunk Nov 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants