dawidwys edited a comment on pull request #17440:
URL: https://github.com/apache/flink/pull/17440#issuecomment-941031617


   I found the reason why the exception was swallowed. Please see: 
https://issues.apache.org/jira/browse/FLINK-24515.
   
   I think we should not swallow exceptions if debloating fails. Therefore I'd 
remove the `try/catch` block and replace the `submit` with `execute` in 
`org.apache.flink.streaming.runtime.tasks.StreamTask#scheduleBufferDebloater`:
   
   ```
       private void scheduleBufferDebloater() {
           // See https://issues.apache.org/jira/browse/FLINK-23560
           // If there are no input gates, there is no point of calculating the 
throughput and running
           // the debloater. At the same time, for SourceStreamTask using 
legacy sources and checkpoint
           // lock, enqueuing even a single mailbox action can cause 
performance regression. This is
           // especially visible in batch, with disabled checkpointing and no 
processing time timers.
           if (getEnvironment().getAllInputGates().length == 0) {
               return;
           }
           systemTimerService.registerTimer(
                   systemTimerService.getCurrentProcessingTime() + 
bufferDebloatPeriod,
                   timestamp ->
                           mainMailboxExecutor.execute(
                                   () -> {
                                       debloat();
                                       scheduleBufferDebloater();
                                   },
                                   "Buffer size recalculation"));
       }
   ```
   
   As for the `waitForActivation`, I need to think about it for a bit more.


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to