mattisonchao commented on code in PR #22479:
URL: https://github.com/apache/pulsar/pull/22479#discussion_r1560433974


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -631,15 +631,20 @@ protected void startStatsUpdater(int 
statsUpdateInitialDelayInSecs, int statsUpd
     }
 
     protected void startDeduplicationSnapshotMonitor() {
+        // We do not know whether users will enable deduplication on namespace 
level/topic level or not, so keep this
+        // scheduled task runs.
         int interval = 
pulsar().getConfiguration().getBrokerDeduplicationSnapshotFrequencyInSeconds();
-        if (interval > 0 && 
pulsar().getConfiguration().isBrokerDeduplicationEnabled()) {
+        if (interval > 0) {
             this.deduplicationSnapshotMonitor = 
OrderedScheduler.newSchedulerBuilder()
                     .name("deduplication-snapshot-monitor")
                     .numThreads(1)
                     .build();
             deduplicationSnapshotMonitor.scheduleAtFixedRate(() -> 
forEachTopic(

Review Comment:
   No, I mean if `() -> forEachTopic()` method  throw the exception will stop 
the scheduler.
   
   ```
   Submits a periodic action that becomes enabled first after the given initial 
delay, and subsequently with the given period; that is, executions will 
commence after initialDelay, then initialDelay + period, then initialDelay + 2 
* period, and so on.
   The sequence of task executions continues indefinitely until one of the 
following exceptional completions occur:
   The task is explicitly cancelled via the returned future.
   The executor terminates, also resulting in task cancellation.
   An execution of the task throws an exception. In this case calling get on 
the returned future will throw ExecutionException, holding the exception as its 
cause.
   Subsequent executions are suppressed. Subsequent calls to isDone() on the 
returned future will return true.
   If any execution of this task takes longer than its period, then subsequent 
executions may start late, but will not concurrently execute.
   ```



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