You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/29 06:39:27 UTC

[GitHub] [flink] Mulavar commented on a change in pull request #19229: [FLINK-26738]Mark StateDescriptor#defaultValue as deprecated and add doc

Mulavar commented on a change in pull request #19229:
URL: https://github.com/apache/flink/pull/19229#discussion_r837104729



##########
File path: docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
##########
@@ -383,6 +383,8 @@ Heap state backend 会额外存储一个包括用户状态以及时间戳的 Jav
 
 - 当前开启 TTL 的 map state 仅在用户值序列化器支持 null 的情况下,才支持用户值为 null。如果用户值序列化器不支持 null,
 可以用 `NullableSerializer` 包装一层。
+  
+- 如果启用 TTL 配置,则之前创建 `StateDescriptor` 设置的 `defaultValue` 将会失效,因为如果从 TTL 的状态中拿到了默认值,用户无法判断这个值是尚未过期的状态值还是状态过期后拿到的默认值,从而也无法判断状态是否过期,这将导致语义混乱。

Review comment:
       thanks! done!




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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org