Github user shixiaogang commented on the issue:

    https://github.com/apache/flink/pull/3524
  
    @StephanEwen I have updated the PR as suggested. Changes include
    1. Make `StateRegistry` to be `SharedStateRegistry` where only shared 
states are registered. Now the `discardState()` method is supposed to delete 
those private states in the checkpoint.
    2. `SharedStateRegistry` now is deployed by the `CheckpointCoordinator`. 
The state handle will register its shared states once it is received by the 
coordinator. In another words, all shared states in a completed checkpoint are 
registered when the checkpoint is added into the `CompletedCheckpointStore`.  
All checkpoints (including savepoints) will unregister shared states when they 
are removed from the store. Savepoints should not contain any shared state. 
Therefore the unregistration will not discard any state in the savepoints.
    3. When recovering from failures or restarting from a savepoint, the 
`CheckpointCoordinator` will rebuild the registry with the checkpoints 
recovered in the `CompletedCheckpointStore`.
    4. Related tests are added to ensure correctness.
    5. The conflicts with the master branch are resolved.
    



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