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 2018/08/16 08:29:48 UTC

[GitHub] asfgit closed pull request #6563: [FLINK-10151] [State TTL] Fix false recursion call in TransformingStateTableKeyGroupPartitioner.tryAddToSource

asfgit closed pull request #6563: [FLINK-10151] [State TTL] Fix false recursion call in TransformingStateTableKeyGroupPartitioner.tryAddToSource
URL: https://github.com/apache/flink/pull/6563
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteStateTableSnapshot.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteStateTableSnapshot.java
index 11a23bfa398..21abf8dc6ae 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteStateTableSnapshot.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteStateTableSnapshot.java
@@ -268,7 +268,7 @@ int tryAddToSource(int currentIndex, CopyOnWriteStateTable.StateTableEntry<K, N,
 		int tryAddToSource(int currentIndex, CopyOnWriteStateTable.StateTableEntry<K, N, S> entry) {
 			CopyOnWriteStateTable.StateTableEntry<K, N, S> filteredEntry = filterEntry(entry);
 			if (filteredEntry != null) {
-				return tryAddToSource(currentIndex, filteredEntry);
+				return super.tryAddToSource(currentIndex, filteredEntry);
 			}
 			return currentIndex;
 		}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapAsyncSnapshotTtlStateTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapAsyncSnapshotTtlStateTest.java
new file mode 100644
index 00000000000..02e09cfa036
--- /dev/null
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapAsyncSnapshotTtlStateTest.java
@@ -0,0 +1,35 @@
+/*
+ * 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.runtime.state.ttl;
+
+import org.apache.flink.runtime.state.StateBackend;
+import org.apache.flink.runtime.state.memory.MemoryStateBackend;
+
+/** Test suite for heap state TTL with asynchronous snapshotting. */
+public class HeapAsyncSnapshotTtlStateTest extends TtlStateTestBase {
+	@Override
+	protected StateBackendTestContext createStateBackendTestContext(TtlTimeProvider timeProvider) {
+		return new StateBackendTestContext(timeProvider) {
+			@Override
+			protected StateBackend createStateBackend() {
+				return new MemoryStateBackend(true);
+			}
+		};
+	}
+}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapTtlStateTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapSyncSnapshotTtlStateTest.java
similarity index 90%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapTtlStateTest.java
rename to flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapSyncSnapshotTtlStateTest.java
index 06de4be42ce..c2c0cd2f616 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapTtlStateTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/HeapSyncSnapshotTtlStateTest.java
@@ -21,8 +21,8 @@
 import org.apache.flink.runtime.state.StateBackend;
 import org.apache.flink.runtime.state.memory.MemoryStateBackend;
 
-/** Test suite for heap state TTL. */
-public class HeapTtlStateTest extends TtlStateTestBase {
+/** Test suite for heap state TTL with synchronous snapshotting. */
+public class HeapSyncSnapshotTtlStateTest extends TtlStateTestBase {
 	@Override
 	protected StateBackendTestContext createStateBackendTestContext(TtlTimeProvider timeProvider) {
 		return new StateBackendTestContext(timeProvider) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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