You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/30 13:01:55 UTC
[GitHub] [pinot] KKcorps commented on a diff in pull request #9859: Use Pulsar AdminClient to delete unused subscriptions
KKcorps commented on code in PR #9859:
URL: https://github.com/apache/pinot/pull/9859#discussion_r1035941781
##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/main/java/org/apache/pinot/plugin/stream/pulsar/PulsarStreamMetadataProvider.java:
##########
@@ -156,11 +174,21 @@ public List<PartitionGroupMetadata> computePartitionGroupMetadata(String clientI
LOGGER.warn("Error encountered while calculating pulsar partition group metadata: " + e.getMessage(), e);
} finally {
closeConsumer(consumer);
+ deleteSubscription(_topic, subscription);
}
return newPartitionGroupMetadataList;
}
+ private void deleteSubscription(String topicName, String subscription) {
+ try {
+ _pulsarAdminClient.topics().deleteSubscription(topicName, subscription);
Review Comment:
IMO, we can make this change. This subscription is only used to fetch metadata so it is fine if its non durable.
https://pulsar.apache.org/docs/2.10.x/concepts-messaging/#subscription-modes
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org