Github user shixiaogang commented on the issue:
https://github.com/apache/flink/pull/3524
Hi @StephanEwen The main reason is that we must have methods to delete
those unshared objects in failed `PendingCheckpoint`s. The `discardState()`
method is called when either the `PendingCheckpoint` fails or the
`CompletedCheckpoint` is subsumed. Under current settings, the `discardState()`
is supposed to delete only those unshared objects, and the shared objects are
deleted by the `StateRegistry`. Hence, we must register those state handles
once they are received so that their shared objects can be correctly deleted.
---
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.
---