kamalcph commented on code in PR #14329:
URL: https://github.com/apache/kafka/pull/14329#discussion_r1315134679
##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -379,9 +379,9 @@ public void stopPartitions(Set<TopicPartition>
topicPartitions,
LOGGER.error("Error while stopping the partition: {}, delete:
{}", tpId.topicPartition(), delete, ex);
}
});
- remoteLogMetadataManager.onStopPartitions(topicIdPartitions);
if (delete) {
// NOTE: this#stopPartitions method is called when Replica state
changes to Offline and ReplicaDeletionStarted
+ remoteLogMetadataManager.onStopPartitions(topicIdPartitions);
Review Comment:
yes, you're right. When the replica is moved to another node, then the
RLMM#stopPartition won't be called. We can handle this case in TBRLMM by adding
a test to ensure that if the same replica is reverted back to the previous
node, then it gets handled gracefully. But, we need to handle this case for any
RLMM implementation.
Another way to fix this issue is that we can always invoke the
`RLMM#stopPartition` when `deleteLocalLog` is set to true but that requires
good amount of changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]