2020-11-09

2020-11-09  本文已影响0人  淡水河谷123
    private void dropSubsumedCheckpoints(long checkpointId) {
        Iterator<Map.Entry<Long, PendingCheckpoint>> entries = pendingCheckpoints.entrySet().iterator();

        while (entries.hasNext()) {
            PendingCheckpoint p = entries.next().getValue();
            // remove all pending checkpoints that are lesser than the current completed checkpoint
            if (p.getCheckpointId() < checkpointId && p.canBeSubsumed()) {
                rememberRecentCheckpointId(p.getCheckpointId());
                failPendingCheckpoint(p, CheckpointFailureReason.CHECKPOINT_SUBSUMED);
                entries.remove();
            }
        }
    }
上一篇下一篇

猜你喜欢

热点阅读