Jiayi-Liao commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r602882247



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlListState.java
##########
@@ -103,6 +103,11 @@ public void add(T value) throws Exception {
     @Nullable
     @Override
     public List<TtlValue<T>> getUnexpiredOrNull(@Nonnull List<TtlValue<T>> 
ttlValues) {
+        // the update operation will clear the whole state if the list becomes 
empty after init
+        if (ttlValues.isEmpty()) {
+            return ttlValues;

Review comment:
       This could happen before this change(after the elements are all 
expired). So... if a job restores from a previous Flink version without this 
change, it may still happen.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to