Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting Schedulers used in BulkWriter between requests and responses #39260

Conversation

FabianMeiswinkel
Copy link
Member

Description

BulkWriter has capped number of operations in flight already (enforced through a Semaphore) - currently for responses it is possible that the Scheduler rejected operations when the queue size of the bulkwriter bounded elastic reached its limit. Instead we should use onBackpressureBuffer there as well - we have capped the number of in-flight operations anyway - and rejection just requires retries.

This PR splits the schedulers for incoming requests and responses and ensures responses (like requests) are buffered unlimited via onBackpressureBuffer()

Sanity testing will happen via integration test in Databricks environment with account with high number of partitions.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @FabianMeiswinkel

Copy link
Member

@xinlian12 xinlian12 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@FabianMeiswinkel FabianMeiswinkel changed the title Splitting Schedulers used in BulkWriter between requests and responses Release azure-cosmos-spark 4.28.4 - Splitting Schedulers used in BulkWriter between requests and responses Mar 17, 2024
@FabianMeiswinkel
Copy link
Member Author

/azp run java - cosmos - spark

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@FabianMeiswinkel FabianMeiswinkel merged commit b3322e3 into Azure:main Mar 18, 2024
34 checks passed
@FabianMeiswinkel FabianMeiswinkel changed the title Release azure-cosmos-spark 4.28.4 - Splitting Schedulers used in BulkWriter between requests and responses Splitting Schedulers used in BulkWriter between requests and responses Mar 18, 2024
drielenr pushed a commit that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants