You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/15 11:14:19 UTC

[GitHub] [flink] rkhachatryan opened a new pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

rkhachatryan opened a new pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754
 
 
   Note: this PR depends on #11507 and shouldn't be merged before it.
   
   ## What is the purpose of the change
   
   Add support cancellation of unaligned checkpoints so that:
   1. active checkpoint is cancelled
   1. any new checkpoint barriers with id <= cancelled are ignored
   
   The behavior should mimic the one of aligned checkpoints.
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - *Added `CheckpointBarrierUnalignerCancellationTest` (unit test)*
   
   ## 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)`: no
     - 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: yes
     - 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r408798980
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
+	private final boolean shouldAbortCheckpoint;
+
+	public CheckpointBarrierUnalignerCancellationTest(boolean shouldTriggerCheckpoint, boolean shouldAbortCheckpoint, List<RuntimeEvent> events) {
+		this.events = events;
+		this.shouldTriggerCheckpoint = shouldTriggerCheckpoint;
+		this.shouldAbortCheckpoint = shouldAbortCheckpoint;
+	}
+
+	@Parameterized.Parameters(name = "should trigger: {0}, should abort {1}, events: {2}")
+	public static Object[][] parameters() {
+		return new Object[][]{
+				new Object[]{false, true, Arrays.asList(cancel(20), checkpoint(10))},
+				new Object[]{false, true, Arrays.asList(cancel(10), checkpoint(10))},
+				new Object[]{true, true, Arrays.asList(cancel(10), checkpoint(20))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(10))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(20))},
+		};
+	}
+
+	@Test
+	public void test() throws Exception {
+		TestInvokable invokable = new TestInvokable();
+		CheckpointBarrierUnaligner unaligner = new CheckpointBarrierUnaligner(new int[]{1}, ChannelStateWriter.NO_OP, "test", invokable);
+
+		for (RuntimeEvent e : events) {
+			if (e instanceof CancelCheckpointMarker) {
+				unaligner.processCancellationBarrier((CancelCheckpointMarker) e);
+			} else if (e instanceof CheckpointBarrier) {
+				unaligner.processBarrier((CheckpointBarrier) e, 0, 0);
+			} else {
+				throw new IllegalArgumentException("unexpected event type: " + e);
+			}
+		}
+
+		assertEquals(shouldAbortCheckpoint, invokable.checkpointAborted);
+		assertEquals(shouldTriggerCheckpoint, invokable.checkpointTriggered);
+	}
+
+	private static CheckpointBarrier checkpoint(int checkpointId) {
+		return new CheckpointBarrier(checkpointId, 1, CheckpointOptions.forCheckpointWithDefaultLocation());
+	}
+
+	private static CancelCheckpointMarker cancel(int checkpointId) {
+		return new CancelCheckpointMarker(checkpointId);
+	}
+
+	private static class TestInvokable extends AbstractInvokable {
+		TestInvokable() {
+			super(new DummyEnvironment());
+		}
+
+		private boolean checkpointAborted;
+		private boolean checkpointTriggered;
+
+		@Override
+		public void invoke() {
+		}
+
+		@Override
+		public Future<Boolean> triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) {
 
 Review comment:
   This one is not used anymore (going over #runInTaskThread).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   * 48744e0183743b29c2c64395f732f74cc3bb71f7 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160711648) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160718585",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 48744e0183743b29c2c64395f732f74cc3bb71f7 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/160711648) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653) 
   * aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160718585) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] rkhachatryan commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-615115983
 
 
   @flinkbot run azure

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] rkhachatryan commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r409071342
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
+	private final boolean shouldAbortCheckpoint;
+
+	public CheckpointBarrierUnalignerCancellationTest(boolean shouldTriggerCheckpoint, boolean shouldAbortCheckpoint, List<RuntimeEvent> events) {
+		this.events = events;
+		this.shouldTriggerCheckpoint = shouldTriggerCheckpoint;
+		this.shouldAbortCheckpoint = shouldAbortCheckpoint;
+	}
+
+	@Parameterized.Parameters(name = "should trigger: {0}, should abort {1}, events: {2}")
+	public static Object[][] parameters() {
+		return new Object[][]{
+				new Object[]{false, true, Arrays.asList(cancel(20), checkpoint(10))},
+				new Object[]{false, true, Arrays.asList(cancel(10), checkpoint(10))},
+				new Object[]{true, true, Arrays.asList(cancel(10), checkpoint(20))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(10))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(20))},
 
 Review comment:
   Added these cases plus some for two channels.
   I think that a sequence of two events should cover all cases.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160369899) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r408790387
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
 
 Review comment:
   rename to `expectTriggerCheckpoint`? I first thought `should` is describing test behavior. Same for `shouldAbortCheckpoint`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   * 48744e0183743b29c2c64395f732f74cc3bb71f7 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160369899) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160718585",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 48744e0183743b29c2c64395f732f74cc3bb71f7 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/160711648) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653) 
   * aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160718585) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   * 48744e0183743b29c2c64395f732f74cc3bb71f7 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160711648) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653) 
   * aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160369899) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160369899) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519) 
   * 0c90426b2fedab82f9fb669478f815db21deec32 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160369899) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519) 
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160718585",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160718585) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] rkhachatryan commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-615402883
 
 
   Thanks @AHeise , @pnowojski .
   
   The last two pushes were to rebase to the current master.
   
   `StreamingKafkaITCase` succeeded after it, but travis failed because of https://issues.apache.org/jira/browse/FLINK-15680
   
   Both failures seem to be unrelated.
   In fact, this PR introduces a change to a code that is not covered by existing IT tests.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r408798153
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
+	private final boolean shouldAbortCheckpoint;
+
+	public CheckpointBarrierUnalignerCancellationTest(boolean shouldTriggerCheckpoint, boolean shouldAbortCheckpoint, List<RuntimeEvent> events) {
+		this.events = events;
+		this.shouldTriggerCheckpoint = shouldTriggerCheckpoint;
+		this.shouldAbortCheckpoint = shouldAbortCheckpoint;
+	}
+
+	@Parameterized.Parameters(name = "should trigger: {0}, should abort {1}, events: {2}")
+	public static Object[][] parameters() {
+		return new Object[][]{
+				new Object[]{false, true, Arrays.asList(cancel(20), checkpoint(10))},
+				new Object[]{false, true, Arrays.asList(cancel(10), checkpoint(10))},
+				new Object[]{true, true, Arrays.asList(cancel(10), checkpoint(20))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(10))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(20))},
 
 Review comment:
   I guess we could easily add some more cases, such as 
   ```
   checkpoint(20), cancel(10)
   cancel(10), cancel(20)
   cancel(20), cancel(10)
   ```
   Or even some carefully chosen combination of 3 events.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7653",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160711648",
       "triggerID" : "48744e0183743b29c2c64395f732f74cc3bb71f7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160718585",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656",
       "triggerID" : "aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aebef0a50172e17d7cd02b4cd44c15f03b4b2d2e Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160718585) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7656) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] rkhachatryan commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r409064601
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
+	private final boolean shouldAbortCheckpoint;
+
+	public CheckpointBarrierUnalignerCancellationTest(boolean shouldTriggerCheckpoint, boolean shouldAbortCheckpoint, List<RuntimeEvent> events) {
+		this.events = events;
+		this.shouldTriggerCheckpoint = shouldTriggerCheckpoint;
+		this.shouldAbortCheckpoint = shouldAbortCheckpoint;
+	}
+
+	@Parameterized.Parameters(name = "should trigger: {0}, should abort {1}, events: {2}")
+	public static Object[][] parameters() {
+		return new Object[][]{
+				new Object[]{false, true, Arrays.asList(cancel(20), checkpoint(10))},
+				new Object[]{false, true, Arrays.asList(cancel(10), checkpoint(10))},
+				new Object[]{true, true, Arrays.asList(cancel(10), checkpoint(20))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(10))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(20))},
+		};
+	}
+
+	@Test
+	public void test() throws Exception {
+		TestInvokable invokable = new TestInvokable();
+		CheckpointBarrierUnaligner unaligner = new CheckpointBarrierUnaligner(new int[]{1}, ChannelStateWriter.NO_OP, "test", invokable);
+
+		for (RuntimeEvent e : events) {
+			if (e instanceof CancelCheckpointMarker) {
+				unaligner.processCancellationBarrier((CancelCheckpointMarker) e);
+			} else if (e instanceof CheckpointBarrier) {
+				unaligner.processBarrier((CheckpointBarrier) e, 0, 0);
 
 Review comment:
   I don't think so because it is called from `processBarrier` (which is called here) and effects of it are essentially checked.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] pnowojski commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
pnowojski commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-615107726
 
 
   There is a test failure: https://dev.azure.com/rmetzger/Flink/_build/results?buildId=7544&view=logs&j=c88eea3b-64a0-564d-0031-9fdcd7b8abee&t=1e2bbe5b-4657-50be-1f07-d84bfce5b1f5
   
   ```
   [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 135.621 s <<< FAILURE! - in org.apache.flink.tests.util.kafka.StreamingKafkaITCase
   [ERROR] testKafka[0: kafka-version:0.10.2.0](org.apache.flink.tests.util.kafka.StreamingKafkaITCase)  Time elapsed: 46.222 s  <<< FAILURE!
   java.lang.AssertionError: expected:<[elephant,27,64213]> but was:<[]>
   ```
   it has never been reported (so far), and looks like a data loss. For one thing, Kafka tests are known for issues like that, but if the test is doing things like failing over a job, it might indeed indicate a problem with this PR or the unaligned checkpoints code that it's basing upon. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6950a256fee785d5b95ea7bd8f21a8f85d31843b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613990642
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7519",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160369899",
       "triggerID" : "6950a256fee785d5b95ea7bd8f21a8f85d31843b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160443951",
       "triggerID" : "0c90426b2fedab82f9fb669478f815db21deec32",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0c90426b2fedab82f9fb669478f815db21deec32 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160443951) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7544) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#discussion_r408801204
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/CheckpointBarrierUnalignerCancellationTest.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.io;
+
+import org.apache.flink.runtime.checkpoint.CheckpointMetaData;
+import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.event.RuntimeEvent;
+import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
+import org.apache.flink.runtime.io.network.api.CheckpointBarrier;
+import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
+import org.apache.flink.runtime.operators.testutils.DummyEnvironment;
+import org.apache.flink.util.function.RunnableWithException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * {@link CheckpointBarrierUnaligner} cancellation test.
+ */
+@RunWith(Parameterized.class)
+public class CheckpointBarrierUnalignerCancellationTest {
+	private final List<RuntimeEvent> events;
+	private final boolean shouldTriggerCheckpoint;
+	private final boolean shouldAbortCheckpoint;
+
+	public CheckpointBarrierUnalignerCancellationTest(boolean shouldTriggerCheckpoint, boolean shouldAbortCheckpoint, List<RuntimeEvent> events) {
+		this.events = events;
+		this.shouldTriggerCheckpoint = shouldTriggerCheckpoint;
+		this.shouldAbortCheckpoint = shouldAbortCheckpoint;
+	}
+
+	@Parameterized.Parameters(name = "should trigger: {0}, should abort {1}, events: {2}")
+	public static Object[][] parameters() {
+		return new Object[][]{
+				new Object[]{false, true, Arrays.asList(cancel(20), checkpoint(10))},
+				new Object[]{false, true, Arrays.asList(cancel(10), checkpoint(10))},
+				new Object[]{true, true, Arrays.asList(cancel(10), checkpoint(20))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(10))},
+				new Object[]{true, true, Arrays.asList(checkpoint(10), cancel(20))},
+		};
+	}
+
+	@Test
+	public void test() throws Exception {
+		TestInvokable invokable = new TestInvokable();
+		CheckpointBarrierUnaligner unaligner = new CheckpointBarrierUnaligner(new int[]{1}, ChannelStateWriter.NO_OP, "test", invokable);
+
+		for (RuntimeEvent e : events) {
+			if (e instanceof CancelCheckpointMarker) {
+				unaligner.processCancellationBarrier((CancelCheckpointMarker) e);
+			} else if (e instanceof CheckpointBarrier) {
+				unaligner.processBarrier((CheckpointBarrier) e, 0, 0);
 
 Review comment:
   Should we also test `notifyBarrierReceived`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11754: [FLINK-17156][checkpointing] support cancellation of unaligned checkpoints
URL: https://github.com/apache/flink/pull/11754#issuecomment-613982894
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 6950a256fee785d5b95ea7bd8f21a8f85d31843b (Wed Apr 15 11:30:22 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services