You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/05 10:13:00 UTC

[jira] [Commented] (FLINK-9328) RocksDBStateBackend might use PlaceholderStreamStateHandle to restor due to StateBackendTestBase class not register snapshots in some UTs

    [ https://issues.apache.org/jira/browse/FLINK-9328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639603#comment-16639603 ] 

ASF GitHub Bot commented on FLINK-9328:
---------------------------------------

StefanRRichter closed pull request #5984: [FLINK-9328][state] Fix RocksDBStateBackend restore problem due to StateBackendTestBase not registering snapshots
URL: https://github.com/apache/flink/pull/5984
 
 
   

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/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java
index 2634268c947..5b7421217a1 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java
@@ -1248,6 +1248,7 @@ public void testValueState() throws Exception {
 		CheckpointStreamFactory streamFactory = createStreamFactory();
 		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 		AbstractKeyedStateBackend<Integer> backend = createKeyedBackend(IntSerializer.INSTANCE);
+		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 
 		ValueStateDescriptor<String> kvId = new ValueStateDescriptor<>("id", String.class);
 
@@ -1586,6 +1587,7 @@ public void testListState() throws Exception {
 		CheckpointStreamFactory streamFactory = createStreamFactory();
 		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 		AbstractKeyedStateBackend<Integer> backend = createKeyedBackend(IntSerializer.INSTANCE);
+		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 
 		ListStateDescriptor<String> kvId = new ListStateDescriptor<>("id", String.class);
 
@@ -2035,6 +2037,7 @@ public void testReducingState() throws Exception {
 		CheckpointStreamFactory streamFactory = createStreamFactory();
 		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 		AbstractKeyedStateBackend<Integer> backend = createKeyedBackend(IntSerializer.INSTANCE);
+		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 
 		ReducingStateDescriptor<String> kvId = new ReducingStateDescriptor<>("id", new AppendingReduce(), String.class);
 
@@ -2653,6 +2656,7 @@ public void testFoldingState() throws Exception {
 		CheckpointStreamFactory streamFactory = createStreamFactory();
 		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 		AbstractKeyedStateBackend<Integer> backend = createKeyedBackend(IntSerializer.INSTANCE);
+		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 
 		FoldingStateDescriptor<Integer, String> kvId = new FoldingStateDescriptor<>("id",
 				"Fold-Initial:",
@@ -2757,6 +2761,7 @@ public void testMapState() throws Exception {
 		CheckpointStreamFactory streamFactory = createStreamFactory();
 		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 		AbstractKeyedStateBackend<String> backend = createKeyedBackend(StringSerializer.INSTANCE);
+		SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
 
 		MapStateDescriptor<Integer, String> kvId = new MapStateDescriptor<>("id", Integer.class, String.class);
 


 

----------------------------------------------------------------
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


> RocksDBStateBackend might use PlaceholderStreamStateHandle to restor due to StateBackendTestBase class not register snapshots in some UTs
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-9328
>                 URL: https://issues.apache.org/jira/browse/FLINK-9328
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.4.2
>            Reporter: Yun Tang
>            Assignee: Yun Tang
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.5.5
>
>
> Currently, StateBackendTestBase class does not register snapshots to SharedStateRegistry in testValueState, testListState, testReducingState, testFoldingState and testMapState UTs, which may cause RocksDBStateBackend to restore from PlaceholderStreamStateHandle during the 2nd restore procedure if one specific sst file both existed in the 1st snapshot and the 2nd snapshot handle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)