This is an automated email from the ASF dual-hosted git repository.

xtsong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 19eb5f3e5d05745fe4423c165224fb35365f8172
Author: Xintong Song <tonysong...@gmail.com>
AuthorDate: Tue Jan 25 10:40:55 2022 +0800

    [hotfix][fs][gs] Update serializer version.
    
    The purpose of this change is to prevent serialization/deserialization 
problems
    between the PR and the final merged versions, as the PR has been opened for 
a
    long time and we noticed it already have many users before being merged.
    
    This commit should change nothing for new users of the officially merged 
version.
    
    See the following discussion for more details:
    https://github.com/apache/flink/pull/15599#issuecomment-1017633539
    
    This closes #18409
---
 .../org/apache/flink/fs/gs/writer/GSCommitRecoverableSerializer.java  | 4 ++--
 .../org/apache/flink/fs/gs/writer/GSResumeRecoverableSerializer.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSCommitRecoverableSerializer.java
 
b/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSCommitRecoverableSerializer.java
index b92c49fd..58f1120 100644
--- 
a/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSCommitRecoverableSerializer.java
+++ 
b/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSCommitRecoverableSerializer.java
@@ -40,7 +40,7 @@ class GSCommitRecoverableSerializer implements 
SimpleVersionedSerializer<GSCommi
             LoggerFactory.getLogger(GSCommitRecoverableSerializer.class);
 
     /** Current version of serializer. */
-    private static final int SERIALIZER_VERSION = 0;
+    private static final int SERIALIZER_VERSION = 1;
 
     /** The one and only instance of the serializer. */
     public static final GSCommitRecoverableSerializer INSTANCE =
@@ -133,7 +133,7 @@ class GSCommitRecoverableSerializer implements 
SimpleVersionedSerializer<GSCommi
 
     @Override
     public GSCommitRecoverable deserialize(int version, byte[] serialized) 
throws IOException {
-        Preconditions.checkArgument(version >= 0);
+        Preconditions.checkArgument(version > 0);
         Preconditions.checkNotNull(serialized);
 
         // ensure this serializer can deserialize data with this version
diff --git 
a/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSResumeRecoverableSerializer.java
 
b/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSResumeRecoverableSerializer.java
index d3120c4..3341aa4 100644
--- 
a/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSResumeRecoverableSerializer.java
+++ 
b/flink-filesystems/flink-gs-fs-hadoop/src/main/java/org/apache/flink/fs/gs/writer/GSResumeRecoverableSerializer.java
@@ -37,7 +37,7 @@ class GSResumeRecoverableSerializer implements 
SimpleVersionedSerializer<GSResum
             LoggerFactory.getLogger(GSResumeRecoverableSerializer.class);
 
     /** Current version of serializer. */
-    private static final int SERIALIZER_VERSION = 0;
+    private static final int SERIALIZER_VERSION = 1;
 
     /** The one and only instance of the serializer. */
     public static final GSResumeRecoverableSerializer INSTANCE =
@@ -83,7 +83,7 @@ class GSResumeRecoverableSerializer implements 
SimpleVersionedSerializer<GSResum
 
     @Override
     public GSResumeRecoverable deserialize(int version, byte[] serialized) 
throws IOException {
-        Preconditions.checkArgument(version >= 0);
+        Preconditions.checkArgument(version > 0);
         Preconditions.checkNotNull(serialized);
 
         // ensure this serializer can deserialize data with this version

Reply via email to