mattisonchao commented on a change in pull request #14367:
URL: https://github.com/apache/pulsar/pull/14367#discussion_r810720963



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
##########
@@ -350,12 +347,6 @@ public void healthCheck(@Suspended AsyncResponse 
asyncResponse,
                                 clientAppId(), topicName);
                         throw new RestException(Status.NOT_FOUND, "Topic [{}] 
not found after create.");
                     }
-                    Topic topic = topicOptional.get();
-                    // clean all subscriptions
-                    return 
FutureUtil.waitForAll(topic.getSubscriptions().values()
-                            
.stream().map(Subscription::deleteForcefully).collect(Collectors.toList()))

Review comment:
       Hi, @michaeljmarshall 
   If we use the ``delete`` method instead of ``deleteForce``. When the reader 
call ``closeAsync``method throws an exception and the connection is not closed. 
They will always be there and cause issues like #7724 mentioned.
   So, I think we need to recheck the consumer last connected time to force 
deleted after the "delete" method to ensure this.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
##########
@@ -350,12 +347,6 @@ public void healthCheck(@Suspended AsyncResponse 
asyncResponse,
                                 clientAppId(), topicName);
                         throw new RestException(Status.NOT_FOUND, "Topic [{}] 
not found after create.");
                     }
-                    Topic topic = topicOptional.get();
-                    // clean all subscriptions
-                    return 
FutureUtil.waitForAll(topic.getSubscriptions().values()
-                            
.stream().map(Subscription::deleteForcefully).collect(Collectors.toList()))

Review comment:
       Hi, @michaeljmarshall  @Technoboy- 
   If we use the ``delete`` method instead of ``deleteForce``. When the reader 
call ``closeAsync``method throws an exception and the connection is not closed. 
They will always be there and cause issues like #7724 mentioned.
   So, I think we need to recheck the consumer last connected time to force 
deleted after the "delete" method to ensure this.




-- 
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]


Reply via email to