Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2707#discussion_r86109229
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java
---
@@ -142,46 +184,62 @@ private void cleanState() throws Exception {
public void notifyOfCompletedCheckpoint(long checkpointId) throws
Exception {
super.notifyOfCompletedCheckpoint(checkpointId);
- synchronized (state.pendingHandles) {
- Set<Long> pastCheckpointIds =
state.pendingHandles.keySet();
- Set<Long> checkpointsToRemove = new HashSet<>();
- for (Long pastCheckpointId : pastCheckpointIds) {
+ synchronized (pendingHandles) {
+ Set<PendingCheckpointId> checkpointsToRemove = new
HashSet<>();
+
+ for (Map.Entry<PendingCheckpointId, PendingHandle>
pendingHandle : pendingHandles.entrySet()) {
+
+ PendingCheckpointId pendingId =
pendingHandle.getKey();
+ long pastCheckpointId = pendingId.checkpointId;
+ int subtaskId = pendingId.subtaskId;
+
if (pastCheckpointId <= checkpointId) {
+
--- End diff --
remove empty line
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---