diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimator.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimator.cs index 3c726a163cd..3ca767a0d6e 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimator.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimator.cs @@ -18,7 +18,11 @@ public abstract class ChangeFeedEstimator /// Gets the estimation per lease in the lease container. /// /// (Optional) Customize the estimation iterator. - /// An iterator that yields an estimation of pending work in amount of documents per distributed lease token. + /// An iterator that yields an estimation of pending work in amount of transactions per distributed lease token. + /// + /// The estimation over the Change Feed identifies volumes of transactions. If operations in the container are performed through stored procedures, transactional batch or bulk, a group of operations may share the same transaction scope and represented by a single transaction. + /// In those cases, the estimation might not exactly represent number of items, but it is still valid to understand if the pending volume is increasing, decreasing, or on a steady state. + /// public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions = null); } } diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorState.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorState.cs index 7efd5a9b41b..9c038074aed 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorState.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorState.cs @@ -33,8 +33,12 @@ public sealed class ChangeFeedProcessorState public string LeaseToken { get; } /// - /// Gets an approximation of the difference between the last processed item in the feed container and the latest change recorded. + /// Gets an approximation of the difference between the last processed transaction in the feed container and the latest transaction recorded. /// + /// + /// The estimation over the Change Feed identifies volumes of transactions. If operations in the container are performed through stored procedures, transactional batch or bulk, a group of operations may share the same transaction scope and represented by a single transaction. + /// In those cases, the estimation might not exactly represent number of items, but it is still valid to understand if the pending volume is increasing, decreasing, or on a steady state. + /// public long EstimatedLag { get; } /// diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs index d3f5480b7f9..7c4bd62e0f0 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs @@ -1177,10 +1177,13 @@ public abstract class Container /// /// Delegate to receive the estimation of pending changes to be read by the associated instance. /// - /// An estimation in number of items. + /// An estimation in number of transactions. /// A cancellation token representing the current cancellation status of the instance. /// A representing the asynchronous operation that is going to be done with the estimation. - /// https://aka.ms/cosmosdb-dot-net-exceptions#typed-api + /// + /// The estimation over the Change Feed identifies volumes of transactions. If operations in the container are performed through stored procedures, transactional batch or bulk, a group of operations may share the same transaction scope and represented by a single transaction. + /// In those cases, the estimation might not exactly represent number of items, but it is still valid to understand if the pending volume is increasing, decreasing, or on a steady state. + /// public delegate Task ChangesEstimationHandler( long estimatedPendingChanges, CancellationToken cancellationToken);