[
https://issues.apache.org/jira/browse/FLINK-10325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16615147#comment-16615147
]
ASF GitHub Bot commented on FLINK-10325:
----------------------------------------
tillrohrmann commented on a change in pull request #6683: [FLINK-10325] [State
TTL] Refactor TtlListState to use only loops, no java stream API for performance
URL: https://github.com/apache/flink/pull/6683#discussion_r217784563
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlUtils.java
##########
@@ -21,11 +21,19 @@
/** Common functions related to State TTL. */
class TtlUtils {
static <V> boolean expired(TtlValue<V> ttlValue, long ttl,
TtlTimeProvider timeProvider) {
- return ttlValue != null &&
expired(ttlValue.getLastAccessTimestamp(), ttl, timeProvider);
+ return expired(ttlValue, ttl, timeProvider.currentTimestamp());
+ }
+
+ static <V> boolean expired(TtlValue<V> ttlValue, long ttl, long
currentTimestamp) {
+ return ttlValue != null &&
expired(ttlValue.getLastAccessTimestamp(), ttl, currentTimestamp);
Review comment:
If `ttlValue` can be `null`, then we should annotate it with `@Nullable`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [State TTL] Refactor TtlListState to use only loops, no java stream API for
> performance
> ---------------------------------------------------------------------------------------
>
> Key: FLINK-10325
> URL: https://issues.apache.org/jira/browse/FLINK-10325
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing
> Affects Versions: 1.6.0
> Reporter: Andrey Zagrebin
> Assignee: Andrey Zagrebin
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.1, 1.7.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)