- I use ValueState for my custom trigger and set TTL for these ValueState in RocksDB backend environment.
- I found an error when I used this code. I know that ValueState.update(null) works equally to ValueState.clear() in general. Unfortunately, this error occurs after using TTL
- I tested this in Flink 1.11.2, but I think it would be a problem in upper versions.
- Plus, I'm a beginner. So, if there is any problem in this discussion issue, please give me advice about that. And I'll fix it!
- It relates to RocksDBValueState with TTLValueState
- In RocksDBValueState(as well as other types of ValueState), .update(null) has to be caught in if-clauses(null checking). However, it skips the null checking and then tries to serialize the null value.
- It is because that TtlValueState wraps the value(null) with the LastAccessTime and makes the new TtlValue Object with the null value.
- In conclusion, I think that null checking logic has to be changed for checking whether userValue variable in TtlValue is null or not
I hope that it would be helpful to improve Flink and if I have a chance, I want to fix it!
Thank you and have a happy Christmas all!