private void tryRemoveCompletedCheckpoint(CompletedCheckpoint completedCheckpoint, ThrowingConsumer<CompletedCheckpoint, Exception> discardCallback) { try { if (tryRemove(completedCheckpoint.getCheckpointID())) { executor.execute(() -> { try { discardCallback.accept(completedCheckpoint); } catch (Exception e) { LOG.warn("Could not discard completed checkpoint {}.", completedCheckpoint.getCheckpointID(), e); } }); } } catch (Exception e) { LOG.warn("Failed to subsume the old checkpoint", e); } }
private void tryRemoveCompletedCheckpoint(CompletedCheckpoint completedCheckpoint, ThrowingConsumer<CompletedCheckpoint, Exception> discardCallback) { try { if (tryRemove(completedCheckpoint.getCheckpointID())) { executor.execute(() -> { try { discardCallback.accept(completedCheckpoint); } catch (Exception e) { LOG.warn("Could not discard completed checkpoint {}.", completedCheckpoint.getCheckpointID(), e); } }); } } catch (Exception e) { LOG.warn("Failed to subsume the old checkpoint", e); } }