StephanEwen commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r598899522



##########
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:
       Can this ever happen here? Are we wrapping the `UserFacingListState` 
which maps `null` to an empty list, or are empty lists never possible?




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