StephanEwen opened a new pull request #12767:
URL: https://github.com/apache/flink/pull/12767


   ## Purpose / Brief change log
   
   This PR prevents breaking existing user programs by making the newly added 
method `CheckpointListener.notifyCheckpointAborted(checkpointId)` a default 
method.
   
   In addition, this PR upgrades the stability of `CheckpointListener` and 
`CheckpointedFunction` to `@Public` to reflect that we should not break them 
and make sure this is caught by our tooling.
   
   ## Original Confusion about (Not) Having a Default Method
   
   *(Copying the description from the JIRA issue here)*
   
   There was confusion about this originally, going back to a comment by myself 
suggesting this should not be a default method, incorrectly thinking of it as 
an internal interface: 
https://github.com/apache/flink/pull/8693#issuecomment-542834147
   
   See clarification email on the mailing list:
   
   ```
   About the "notifyCheckpointAborted()":
   
   When I wrote that comment, I was (apparently wrongly) assuming we were 
talking about
   an internal interface here, because the "abort" signal was originally only 
intended to cancel
   the async part of state backend checkpoints.
   
   I just realized that this is exposed to users - and I am actually with 
Thomas on this one. 
   he "CheckpointListener" is a very public interface that many users 
implement. The fact that
   it is tagged "@PublicEvolving" is somehow not aligned with reality. So 
adding the method
   here will in reality break lots and lots of user programs.
   
   I think also in practice it is much less relevant for user applications to 
react to aborted checkpoints.
   Since the notifications there can not be relied upon (if there is a task 
failure concurrently) users
    always have to follow the "newer checkpoint subsumes older checkpoint" 
contract, so the abort
   method is probably rarely relevant.
   ```
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **no**
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **yes**
     - The serializers: **no**
     - The runtime per-record code paths (performance sensitive): **no**
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: **no**
     - The S3 file system connector: **no**
   
   ## Documentation
   
     - Does this pull request introduce a new feature? **no**
     - If yes, how is the feature documented? **not applicable**
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to