Azure / azure-documentdb-changefeedprocessor-dotnet

This library provides a host for distributing change feed events in partitioned collection across multiple observers. Instances of the host can scale up (by adding) or down (by removing) dynamically, and the load will be automatically distributed among active instances in about-equal way.
Other
51 stars 22 forks source link

Propagate DocumentClientException from ProcessChangesAsync #127

Closed ealsur closed 5 years ago

ealsur commented 5 years ago

Currently, if the ProcessChangesAsync in the Observer throws a DCE (because the user is using a DocumentClient for example) with RetryAfter specified, the PartitionProcessor will treat it as an exception happening on the FeedResponse and assume the continuation token was not updated, wait the assignated time, and do another Feed read.

The problem is that this behavior will inherently lose the batch of documents, since it will not close the Observer (as any other exception happening in ProcessChangesAsync would), and do another Feed Read with the next continuation token.

ealsur commented 5 years ago

@mkolt Last update pushed addressing all comments 😄

mkolt commented 5 years ago

Also can we make sure that skype signs-off?

ealsur commented 5 years ago

Addressed comments, @kadukf could you review this fix?