Github user shixiaogang commented on the issue:

    https://github.com/apache/flink/pull/3524
  
    @StephanEwen Thanks a lot for your valuable comments. I will update the PR 
as suggested.
    * I think it's a good idea that we make the `StateRegistry` into 
`SharedStateRegistry`.  That will need (1) the state handle must not discard 
registered objects in the `discardState` method and (2) the state handle has to 
register shared object once it is received by the coordinator (now the state 
handle does not register their objects before its checkpoint completes).
    * Now that state handles have to register their objects once they are 
received by the coordinator, we should move `SharedStateRegister` from 
`CompletedCheckpointStore` to `CheckpointCoordinator`.
    * It's better for `StateRegistry` directly discard an object once its 
reference count is 0. I used a list to collect discarded objects because I want 
to make the changes in the discarding of completed checkpoint as few as 
possible. 


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