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



##########
File path: 
flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java
##########
@@ -258,7 +258,7 @@ public boolean isQueryable() {
      * Configures optional activation of state time-to-live (TTL).
      *
      * <p>State user value will expire, become unavailable and be cleaned up 
in storage depending on
-     * configured {@link StateTtlConfig}.
+     * configured {@link StateTtlConfig}, and the field defaultValue will be 
invalid.

Review comment:
       I think the explanation of the change of `defaultValue` could be placed 
in another statement starts with `<p>`.

##########
File path: docs/content/docs/dev/datastream/fault-tolerance/state.md
##########
@@ -432,6 +432,8 @@ will lead to compatibility failure and 
`StateMigrationException`.
 - 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.
 
+- If enable state TTL configuration, the default value configuration in 
`StateDescriptor` will no longer take an effect.

Review comment:
       I think it's better to explain why this operation is reasonable.

##########
File path: 
flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java
##########
@@ -104,7 +104,7 @@
     @Nonnull private StateTtlConfig ttlConfig = StateTtlConfig.DISABLED;
 
     /** The default value returned by the state when no other value is bound 
to a key. */

Review comment:
       I think we'd better to describe why this value is deprecated.




-- 
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-unsubscr...@flink.apache.org

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


Reply via email to