flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #3548: [FLINK-5962] [checkpoints] Remove scheduled cancel...
Date Wed, 15 Mar 2017 16:19:43 GMT
Github user tillrohrmann commented on a diff in the pull request:

    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java
    @@ -191,6 +194,22 @@ void setStatsCallback(@Nullable PendingCheckpointStats trackerCallback)
     		this.statsCallback = checkNotNull(trackerCallback);
    +	/**
    +	 * Sets the handle for the canceller to this pending checkoint.
    +	 * 
    +	 * @return true, if the handle was set, false, if the checkpoint is already disposed;
    +	 */
    +	public boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle) {
    +		synchronized (lock) {
    +			if (!discarded) {
    +				this.cancellerHandle = cancellerHandle;
    --- End diff --
    I know this method will only be called once in `CheckpointCoordinator`. However, in order
to make this class self contained I think it would either be good to fail if we have already
set an `cancellerHandle` or cancel the old
    canceller to avoid an outdated discard call.

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message