This is an automated email from the ASF dual-hosted git repository.
hangxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 9a891f117c3 [FLINK-32953][docs]Add notes about changing state ttl value
9a891f117c3 is described below
commit 9a891f117c3a44a633316b84f9cbf2a541b80d11
Author: Jinzhong Li <[email protected]>
AuthorDate: Wed Sep 13 14:56:39 2023 +0800
[FLINK-32953][docs]Add notes about changing state ttl value
---
docs/content.zh/docs/dev/datastream/fault-tolerance/state.md | 2 ++
docs/content/docs/dev/datastream/fault-tolerance/state.md | 3 +++
2 files changed, 5 insertions(+)
diff --git a/docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
b/docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
index 81aa4a774cd..c7aaaf0c27f 100644
--- a/docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
+++ b/docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
@@ -381,6 +381,8 @@ Heap state backend 会额外存储一个包括用户状态以及时间戳的 Jav
- TTL 的配置并不会保存在 checkpoint/savepoint 中,仅对当前 Job 有效。
+- 不建议checkpoint恢复前后将state TTL从短调长,这可能会产生潜在的数据错误。
+
- 当前开启 TTL 的 map state 仅在用户值序列化器支持 null 的情况下,才支持用户值为 null。如果用户值序列化器不支持 null,
可以用 `NullableSerializer` 包装一层。
diff --git a/docs/content/docs/dev/datastream/fault-tolerance/state.md
b/docs/content/docs/dev/datastream/fault-tolerance/state.md
index f67986377e2..24f14953b1c 100644
--- a/docs/content/docs/dev/datastream/fault-tolerance/state.md
+++ b/docs/content/docs/dev/datastream/fault-tolerance/state.md
@@ -429,6 +429,9 @@ will lead to compatibility failure and
`StateMigrationException`.
- The TTL configuration is not part of check- or savepoints but rather a way
of how Flink treats it in the currently running job.
+- It is not recommended to restore checkpoint state with adjusting the ttl
from a short value to a long value,
+which may cause potential data errors.
+
- The map state with TTL currently supports null user values only if the user
value serializer can handle null values.
If the serializer does not support null values, it can be wrapped with
`NullableSerializer` at the cost of an extra byte in the serialized form.