Skip to content

Commit 3ad056e

Browse files
committed
fix acrolinx
1 parent 6614187 commit 3ad056e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/cosmos-db/nosql/how-to-use-change-feed-estimator.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The change feed processor acts as a pointer that moves forward across your [chan
2222

2323
Your change feed processor deployment can process changes at a particular rate based on its available resources like CPU, memory, network, and so on.
2424

25-
If this rate is slower than the rate at which your changes happen in your Azure Cosmos DB container, your processor will start to lag behind.
25+
If this rate is slower than the rate at which your changes happen in your Azure Cosmos DB container, your processor starts to lag behind.
2626

2727
Identifying this scenario helps understand if we need to scale our change feed processor deployment.
2828

@@ -32,7 +32,7 @@ Identifying this scenario helps understand if we need to scale our change feed p
3232

3333
#### As a push model for automatic notifications
3434

35-
Like the [change feed processor](./change-feed-processor.md), the change feed estimator can work as a push model. The estimator will measure the difference between the last processed item (defined by the state of the leases container) and the latest change in the container, and push this value to a delegate. The interval at which the measurement is taken can also be customized with a default value of 5 seconds.
35+
Like the [change feed processor](./change-feed-processor.md), the change feed estimator can work as a push model. The estimator measures the difference between the last processed item (defined by the state of the leases container) and the latest change in the container, and pushes this value to a delegate. The interval at which the measurement is taken can also be customized with a default value of 5 seconds.
3636

3737
As an example, if your change feed processor is using latest version mode and is defined like this:
3838

@@ -44,7 +44,7 @@ The correct way to initialize an estimator to measure that processor would be us
4444

4545
Where both the processor and the estimator share the same `leaseContainer` and the same name.
4646

47-
The other two parameters are the delegate, which will receive a number that represents **how many changes are pending to be read** by the processor, and the time interval at which you want this measurement to be taken.
47+
The other two parameters are the delegate, which receives a number that represents **how many changes are pending to be read** by the processor, and the time interval at which you want this measurement to be taken.
4848

4949
An example of a delegate that receives the estimation is:
5050

@@ -71,24 +71,24 @@ And whenever you want it, with the frequency you require, you can obtain the det
7171

7272
[!code-csharp[Main](~/samples-cosmosdb-dotnet-v3/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/Program.cs?name=GetIteratorEstimatorDetailed)]
7373

74-
Each `ChangeFeedProcessorState` will contain the lease and lag information, and also who is the current instance owning it.
74+
Each `ChangeFeedProcessorState` contains the lease and lag information, and also who is the current instance owning it.
7575

7676
#### Estimator deployment
7777

78-
The change feed estimator does not need to be deployed as part of your change feed processor, nor be part of the same project. We recommend deploying the estimator on an independent and completely different instance from your processors. A single estimator instance can track the progress for the all the leases and instances in your change feed processor deployment.
78+
The change feed estimator doesn't need to be deployed as part of your change feed processor, nor be part of the same project. We recommend deploying the estimator on an independent instance from your processors. A single estimator instance can track the progress for the all the leases and instances in your change feed processor deployment.
7979

80-
Each estimation will consume [request units](../request-units.md) from your [monitored and lease containers](change-feed-processor.md#components-of-the-change-feed-processor). A frequency of 1 minute in-between is a good starting point, the lower the frequency, the higher the request units consumed.
80+
Each estimation consumes [request units](../request-units.md) from your [monitored and lease containers](change-feed-processor.md#components-of-the-change-feed-processor). A frequency of 1 minute in-between is a good starting point, the lower the frequency, the higher the request units consumed.
8181

8282
### [Java](#tab/java)
8383

84-
The provided example represents a sample Java application that demonstrates the implementation of the Change Feed Processor in latest version mode with the estimation of the lag in processing change feed events. In the application - documents are being inserted into one container (the "feed container"), and meanwhile another worker thread or worker application is pulling inserted documents from the feed container's Change Feed and operating on them in some way.
84+
This example uses the change feed processor in latest version mode with the estimation of the lag in processing change feed events. In the application - documents are being inserted into one container (the "feed container"), and meanwhile another worker thread or worker application is pulling inserted documents from the feed container's change feed and operating on them in some way.
8585

8686
The change Feed Processor is built and started like this:
8787
[!code-java[](~/azure-cosmos-java-sql-api-samples/src/main/java/com/azure/cosmos/examples/changefeed/SampleChangeFeedEstimator.java?name=ChangeFeedProcessorBuilder)]
8888

89-
Change Feed Processor lag checking can be performed on a separate application (like a health monitor) as long as the same input containers (feedContainer and leaseContainer) and the exact same lease prefix (```CONTAINER_NAME + "-lease"```) are used. The estimator code requires that the Change Feed Processor had an opportunity to fully initialize the leaseContainer's documents.
89+
Change feed processor lag checking can be performed on a separate application (like a health monitor) as long as the same input containers (feedContainer and leaseContainer) and the exact same lease prefix (```CONTAINER_NAME + "-lease"```) are used. The estimator code requires that the change feed processor had an opportunity to fully initialize the leaseContainer's documents.
9090

91-
The estimator calculates the accumulated lag by retrieving the current state of the Change Feed Processor and summing up the estimated lag values for each event being processed:
91+
The estimator calculates the accumulated lag by retrieving the current state of the change feed processor and summing up the estimated lag values for each event being processed:
9292
[!code-java[](~/azure-cosmos-java-sql-api-samples/src/main/java/com/azure/cosmos/examples/changefeed/SampleChangeFeedEstimator.java?name=EstimatedLag)]
9393

9494
The total lag initially should be zero and finally should be greater or equal to the number of documents created. The total lag value can be logged or used for further analysis, allowing to monitor the performance of the change feed processing and identify any potential bottlenecks or delays in the system:
@@ -101,13 +101,13 @@ An example of a delegate that receives changes and handles them with a lag is:
101101

102102
## Supported change feed modes
103103

104-
The change feed estimator can be used for both [latest version mode](./change-feed-modes.md#latest-version-change-feed-mode) and [all versions and deletes mode](./change-feed-modes.md#all-versions-and-deletes-change-feed-mode-preview). In both modes, the estimate provided is not guaranteed to be an exact count of outstanding changes to process.
104+
The change feed estimator can be used for both [latest version mode](./change-feed-modes.md#latest-version-change-feed-mode) and [all versions and deletes mode](./change-feed-modes.md#all-versions-and-deletes-change-feed-mode-preview). In both modes, the estimate provided isn't guaranteed to be an exact count of outstanding changes to process.
105105

106106
## Additional resources
107107

108108
* [Azure Cosmos DB SDK](sdk-dotnet-v3.md)
109109
* [Usage samples on GitHub (.NET latest version)](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed)
110-
* [Usage samples on Github (.NET all versions and deletes)](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeedAllVersionsAndDeletes)
110+
* [Usage samples on GitHub (.NET all versions and deletes)](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeedAllVersionsAndDeletes)
111111
* [Usage samples on GitHub (Java)](https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples/tree/main/src/main/java/com/azure/cosmos/examples/changefeed)
112112
* [Additional samples on GitHub](https://github.com/Azure-Samples/cosmos-dotnet-change-feed-processor)
113113

0 commit comments

Comments
 (0)