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

    https://github.com/apache/flink/pull/4413#discussion_r130073387
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalKeyedStateHandle.java
 ---
    @@ -202,10 +208,21 @@ public long getStateSize() {
        @Override
        public void registerSharedStates(SharedStateRegistry stateRegistry) {
     
    -           Preconditions.checkState(sharedStateRegistry == null, "The 
state handle has already registered its shared states.");
    +           // This is a quick check to avoid that we register twice with 
the same registry. However, the code allows to
    +           // register again with a different registry. The implication is 
that ownership is transferred to this new
    +           // registry. This should only happen in case of a restart, when 
the CheckpointCoordinator creates a new
    +           // SharedStateRegistry for the current attempt and the old 
registry becomes meaningless. We also assume that
    +           // an old registry object from a previous run is due to GC and 
will never be used for registration again.
    --- End diff --
    
    "is due to be GCed"?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to