curcur commented on a change in pull request #17462:
URL: https://github.com/apache/flink/pull/17462#discussion_r749046291
##########
File path:
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
##########
@@ -600,8 +600,14 @@ private ChangelogSnapshotState completeRestore(
System.currentTimeMillis(),
streamFactory,
CHECKPOINT_OPTIONS),
- // TODO: add metadata to log FLINK-23170.
- upTo));
+ upTo);
+
+ // log metadata after materialization is triggered
+ keyValueStatesByName
+ .values()
+ .forEach(t -> ((AbstractChangelogState)
t).resetMetaDataWritten());
Review comment:
1. Is it for sure that `forEach` is slower than `for` loop in java? I've
searched a bit and found contradict conclusions:
https://answers-short.com/en/Q%26A/page=48105dc27b0dd6653125b9bc3aa0257a
2. Even it is true, given there are very limited number of states, an't the
differences really negligible?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]