commit | e52f1c1f6cec09cec7650057e66c976462ce364c | [log] [tgz] |
---|---|---|
author | Tzu-Li (Gordon) Tai <tzulitai@apache.org> | Tue May 25 15:41:57 2021 +0800 |
committer | Tzu-Li (Gordon) Tai <tzulitai@apache.org> | Fri May 28 15:36:36 2021 +0800 |
tree | 4b67894e0e7e00ee1219f8e6c8b3d31ef4ab4769 | |
parent | a6f2e9fc799edd9a52c8c684df41b7e371d546d0 [diff] |
[FLINK-20336] [core] Do not silently pass UNRECOGNIZED state mutations This closes #235.
diff --git a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/PersistedRemoteFunctionValues.java b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/PersistedRemoteFunctionValues.java index 150949a..e5c4b76 100644 --- a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/PersistedRemoteFunctionValues.java +++ b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/reqreply/PersistedRemoteFunctionValues.java
@@ -83,9 +83,8 @@ break; } case UNRECOGNIZED: - { - break; - } + throw new IllegalStateException( + "Received an UNRECOGNIZED PersistedValueMutation type. This may be caused by a mismatch or incompatibility with the remote function SDK version and the Stateful Functions version."); default: throw new IllegalStateException("Unexpected value: " + mutate.getMutationType()); }