Skip to content

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Aug 27, 2019

Description

This PR exposes the Bulk Streaming feature under the PREVIEW flag. Working as an opt-in feature through CosmosClientOptions.AllowBulkExecution (for a lack of a better name), or CosmosClientBuilder.WithBulkExecution, the SDK will send all point operations (Create, Read, Replace, Upsert, Delete) operations to the BulkAsyncContainerExecutor to be packed and sent as a single request for throughput optimized scenarios.

Batch requests can return a MultiStatus Status Code, which might mean that some operations succeeded, but others failed (like in the case of throttling), so the BatchExecutorRetryHandler is in place to retry individual operations that might have faced Throttles by evaluating through ResourceThrottleRetryPolicy and honoring the CosmosClientOptions.ConnectionPolicy.RetryOptions configuration.

This mode will squeeze the RU/s on the container, meaning that due to the increase of volume of data flow (versus doing these operations individually, which would take more time), it could incur into more 429s than sending them invididually, but if the RU budget is enough, the throughput (operations/sec) is much higher.

Type of change

  • New feature (non-breaking change which adds functionality)

Closing issues

Closes #584

@ealsur ealsur added feature-request New feature or request Batch Batch related issue labels Aug 27, 2019
@ealsur ealsur requested a review from kirillg as a code owner August 27, 2019 18:25
@ealsur ealsur self-assigned this Aug 27, 2019
kirillg
kirillg previously approved these changes Sep 4, 2019
Copy link

@kirillg kirillg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AllowBatchingRequests --> AllowBatchRequests
WithBatchingRequests --> WithBatchRequests

@ealsur
Copy link
Member Author

ealsur commented Sep 5, 2019

/azp run

@ealsur ealsur closed this Sep 5, 2019
@ealsur ealsur reopened this Sep 5, 2019
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Batch Batch related issue feature-request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk stream support
4 participants