[controller] do not delay RT topic deletion if the store is no longer hybrid #1358
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Avoid
getStore
from the controller which is not the leader of cluster this store is a part ofWhen TopicCleanupService tries to delete RT topics, it does not have to wait for all the corresponding VT topics to get deleted if all the versions of the store has changed from hybrid to batch. If all the versions are batch, it can be safely assumed that no VT topic is consuming from that RT topic.
This was already done in #1234 but that commit was reverted in #1355
It was reverted because TCS was trying to get
Store
for which it was not the leader controller. Only leader controller caches and stores the information for all the stores in the cluster it is leader of.So this time,
isRTTopicDeletionPermittedByAllControllers
will not takeStore
object, it will use the ControllerClientMap to get Store information for all the stores.Resolves #XXX
How was this PR tested?
Does this PR introduce any user-facing changes?