flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9808) Implement state conversion procedure in state backends
Date Wed, 24 Oct 2018 09:26:00 GMT

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

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

StefanRRichter commented on a change in pull request #6875: [FLINK-9808] [state backends]
Migrate state when necessary in state backends
URL: https://github.com/apache/flink/pull/6875#discussion_r227709342
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/RegisteredKeyValueStateBackendMetaInfo.java
 ##########
 @@ -151,79 +149,52 @@ public int hashCode() {
 		return result;
 	}
 
-	/**
-	 * Checks compatibility of a restored k/v state, with the new {@link StateDescriptor} provided
to it.
-	 * This checks that the descriptor specifies identical names and state types, as well as
-	 * serializers that are compatible for the restored k/v state bytes.
-	 */
 	@Nonnull
-	public static <N, S> RegisteredKeyValueStateBackendMetaInfo<N, S> resolveKvStateCompatibility(
-		StateMetaInfoSnapshot restoredStateMetaInfoSnapshot,
-		TypeSerializer<N> newNamespaceSerializer,
-		StateDescriptor<?, S> newStateDescriptor,
-		@Nullable StateSnapshotTransformer<S> snapshotTransformer) throws StateMigrationException
{
+	@Override
+	public StateMetaInfoSnapshot snapshot() {
+		return computeSnapshot();
+	}
 
-		Preconditions.checkState(restoredStateMetaInfoSnapshot.getBackendStateType()
+	public static <T> CompatibilityResult<T> resolveStateCompatibiliity(
 
 Review comment:
   Typo: `resolveStateCompatibiliity` -> `resolveStateCompatibility`

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


> Implement state conversion procedure in state backends
> ------------------------------------------------------
>
>                 Key: FLINK-9808
>                 URL: https://issues.apache.org/jira/browse/FLINK-9808
>             Project: Flink
>          Issue Type: Sub-task
>          Components: State Backends, Checkpointing
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Aljoscha Krettek
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> With FLINK-9377 in place and that config snapshots serve as the single source of truth
for recreating restore serializers, the next step would be to utilize this when performing
a full-pass state conversion (i.e., read with old / restore serializer, write with new serializer).
> For Flink's heap-based backends, it can be seen that state conversion inherently happens,
since all state is always deserialized after restore with the restore serializer, and written
with the new serializer on snapshots.
> For the RocksDB state backend, since state is lazily deserialized, state conversion needs
to happen for per-registered state on their first access if the registered new serializer
has a different serialization schema than the previous serializer.
> This task should consist of three parts:
> 1. Allow {{CompatibilityResult}} to correctly distinguish between whether the new serializer's
schema is a) compatible with the serializer as it is, b) compatible after the serializer has
been reconfigured, or c) incompatible.
> 2. Introduce state conversion procedures in the RocksDB state backend. This should occur
on the first state access.
> 3. Make sure that all other backends no longer do redundant serializer compatibility
checks. That is not required because those backends always perform full-pass state conversions.



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

Mime
View raw message