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

    https://github.com/apache/flink/pull/5239#discussion_r168472392
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java
 ---
    @@ -507,17 +509,78 @@ public boolean supportsAsynchronousSnapshots() {
                return localRecoveryConfig;
        }
     
    +   private interface SnapshotStrategySynchronicityBehavior<K> {
    +
    +           default void finalizeSnapshotBeforeReturnHook(Runnable 
runnable) {
    +
    +           }
    +
    +           default void logOperationCompleted(CheckpointStreamFactory 
streamFactory, long startTime) {
    +
    +           }
    +
    +           boolean isAsynchronous();
    +
    +           <N, V> StateTable<K, N, V> 
newStateTable(RegisteredKeyedBackendStateMetaInfo<N, V> newMetaInfo);
    --- End diff --
    
    I think this method should be part of the `SnapshotStrategy` interface. 
That way we would make the `SnapshotStrategySynchronicityBehavior` sub classes 
independent of the `HeapKeyedStateBackend`.


---

Reply via email to