BewareMyPower commented on code in PR #20563:
URL: https://github.com/apache/pulsar/pull/20563#discussion_r1236178836


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -1454,10 +1450,6 @@ public ScheduledExecutorService getExecutor() {
         return executor;
     }
 
-    public ScheduledExecutorService getCacheExecutor() {
-        return cacheExecutor;
-    }

Review Comment:
   A better way might be adding the `@Deprecated` annotation to all these 
public methods first, then the extension developer could be aware that these 
methods could be removed in future.
   
   But I think it's reasonable to remove unused methods in Pulsar, the 
extension should not depend on public methods from a class (rather than an 
interface) too much. Public methods are added too casually. Just like 
https://github.com/apache/pulsar/pull/20537, authors might just add a getter 
(e.g. `NamespaceBundles#getNsname`) for a very limited use case and they might 
not realize they have added interfaces that could bring breaking changes if 
they are removed.
   
   If we want to guarantee all public methods in classes that should not be 
removed directly, we should guarantee any public method should not be added 
without any care. Otherwise, there could be too many public methods that 
require PIPs to remove them.
   
   However, if so, it could be a burden to Pulsar developers that each new 
public method requires a PIP.



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