kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-15038: Replace topicIdByPartitionMap with MetadataCache instance in RemoteLogManager

Open aheev opened this issue 4 months ago • 13 comments

Reopen https://github.com/apache/kafka/pull/14136

  • Rebase with latest trunk and account for new changes
  • Replace TopicPartition with TopicIdPartition in StopPartition to handle a case where MetadataCache is updated first on removeTopic delta, so, during ReplicaManager.applyDelta, RLM can't find the topicId

PS: The race between LeaderAndISR and UpdateMetadata requests are no longer valid as, in KRaftMetadataCache is first updated before applying topicsDelta

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

Reviewers: @kamalcph

aheev avatar Jul 29 '25 13:07 aheev

@divijvaidya @kamalcph could you please take a look at this?

aheev avatar Jul 29 '25 14:07 aheev

@aheev

Thanks for the PR! Could you add a comment to understand why PR#14136 was abandoned and how this PR addresses it?

kamalcph avatar Jul 29 '25 14:07 kamalcph

@aheev

Thanks for the PR! Could you add a comment to understand why PR#14136 was abandoned and how this PR addresses it?

updated

aheev avatar Jul 30 '25 15:07 aheev

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Aug 06 '25 03:08 github-actions[bot]

@kamalcph gentle ping for the review

aheev avatar Aug 12 '25 11:08 aheev

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Aug 14 '25 03:08 github-actions[bot]

will look at the test failures today

aheev avatar Aug 18 '25 07:08 aheev

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Aug 20 '25 03:08 github-actions[bot]

@kamalcph found a new issue. Since metadataCache is first updated before ReplicaManager.applyDelta, stopPartitions, inturn rlm.stopPartitions is not able to find topicId. Why can't we just use TopicIdPartition in StopPartition class :thinking:

aheev avatar Aug 20 '25 10:08 aheev

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Aug 22 '25 03:08 github-actions[bot]

@aheev could you please rebase code to include CI changes?

chia7712 avatar Aug 23 '25 19:08 chia7712

Thanks for the patch!

Since metadataCache is first updated before ReplicaManager.applyDelta, stopPartitions, inturn rlm.stopPartitions is not able to find topicId. Why can't we just use TopicIdPartition in StopPartition class

yeah, I think topicId can be set in the StopPartition object to propagate the value to the RemoteLogManager. The deletedTopicIds is available in the TopicsDelta.

Replaced TopicPartition with TopicIdPartition in StopPartition

aheev avatar Aug 27 '25 17:08 aheev

This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Dec 03 '25 03:12 github-actions[bot]