Skip to content

KAFKA-15859: Complete delayed RemoteListOffsets requests when replica moves away from broker#17487

Merged
junrao merged 2 commits intoapache:trunkfrom
kamalcph:KAFKA-15859
Oct 16, 2024
Merged

KAFKA-15859: Complete delayed RemoteListOffsets requests when replica moves away from broker#17487
junrao merged 2 commits intoapache:trunkfrom
kamalcph:KAFKA-15859

Conversation

@kamalcph
Copy link
Copy Markdown
Contributor

Committer Checklist (excluded from commit message)

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

…ca is removed from broker.

- Removed the ListOffsetsMetadata wrapper class.
- Addressed review comments from PR apache#16602
@github-actions github-actions Bot added the core Kafka Broker label Oct 12, 2024
@kamalcph kamalcph changed the title KAFKA-15859: Complete delayed RemoteListOffsets requests when a replica moves away KAFKA-15859: Complete delayed RemoteListOffsets requests when replica moves away from broker Oct 12, 2024
import scala.jdk.CollectionConverters._

case class ListOffsetsPartitionStatus(var responseOpt: Option[ListOffsetsPartitionResponse] = None,
case class ListOffsetsPartitionStatus(@volatile var responseOpt: Option[ListOffsetsPartitionResponse],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intellij shows "Class parameter shadows superclass var". How to fix this warning?

Screenshot 2024-10-13 at 1 14 39 AM

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.

Probably this conflicts with the case class. Maybe use a non-case class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Used a non-case class with object to overcome the warning.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@kamalcph : Thanks for the updated PR. LGTM

@junrao junrao merged commit 604564c into apache:trunk Oct 16, 2024
@kamalcph kamalcph deleted the KAFKA-15859 branch October 16, 2024 03:01
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
… moves away from broker (apache#17487)

Removed the ListOffsetsMetadata wrapper class. Complete the response when replica is not a leader.

Reviewers: Jun Rao <junrao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants