Github user gyfora commented on a diff in the pull request:

    https://github.com/apache/flink/pull/951#discussion_r35778711
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
 ---
    @@ -269,10 +270,19 @@ private void setVertexConfig(Integer vertexID, 
StreamConfig config,
                config.setNumberOfOutputs(nonChainableOutputs.size());
                config.setNonChainedOutputs(nonChainableOutputs);
                config.setChainedOutputs(chainableOutputs);
    -           config.setStateMonitoring(streamGraph.isCheckpointingEnabled());
    -           
config.setStateHandleProvider(streamGraph.getStateHandleProvider());
    +
    +           
config.setCheckpointingEnabled(streamGraph.isCheckpointingEnabled());
    +           if (streamGraph.isCheckpointingEnabled()) {
    +                   
config.setCheckpointMode(streamGraph.getCheckpointingMode());
    +                   
config.setStateHandleProvider(streamGraph.getStateHandleProvider());
    +           } else {
    +                   // the at least once input handler is slightly cheaper 
(in the absence of checkpoints),
    +                   // so we use that one if checkpointing is not enabled
    +                   
config.setCheckpointMode(CheckpointingMode.AT_LEAST_ONCE);
    --- End diff --
    
    So we set an at_least_once handler even though we won't receive any 
barriers? Why not add an OFF mode which will use a "no-op barrier handler" or 
skip the barrier handler  altogether? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to