/// <summary> /// Updates the checkpoint for the partition /// </summary> /// <param name="eventData">The event data to checkpoint to</param> /// <param name="cancellationToken">A token to monitor for abort requests.</param> /// <returns>True if the checkpointing was successful.</returns> public async Task <bool> CheckpointAsync(EventData eventData, CancellationToken cancellationToken) { var success = false; try { _logger.LogInformation("Checkpointing for partition {partitionId}", PartitionId); _checkpointCounter.Increment(); using (_checkpointTiming.Time()) { await _checkpointManager.UpdateCheckpointAsync(eventData, this, cancellationToken).ConfigureAwait(false); } success = true; _logger.LogDebug("Finished checkpointing for partition {partitionId}", PartitionId); } catch (Exception e) { _logger.LogError(e, "Error checkpointing for partition {partitionId}", PartitionId); } return(success); }