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

Batch API: Add support of request options for transactional batch #1569

Merged
merged 10 commits into from
Jul 14, 2020

Conversation

rakkuma
Copy link
Contributor

@rakkuma rakkuma commented May 27, 2020

Description

This PR adds support for user to pass request options for a transactional batch request.

This will enable request level features and restricts specific set of valid option for batch request.

Session token is not added in the option because batch won't honor it. It is only applicable for read requests and since batch can have write request, it is not sent to backend.

Also in TransactionalBatchResponse we were keeping separate fields for ActivityId, RequestCharge and RetryAfter. Now we will keep the whole Header like in ItemResponse.cs. This will enable user to get SessionToken out of batch response options. This won't effect user as external callable function will be same. It's just internally how we are keeping values.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Signed-off-by: Rakesh Kumar <rakkuma@microsoft.com>
Signed-off-by: Rakesh Kumar <rakkuma@microsoft.com>
Copy link
Member

@kirankumarkolli kirankumarkolli left a comment

Choose a reason for hiding this comment

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

Breaking change.

Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs Outdated Show resolved Hide resolved
Signed-off-by: Rakesh Kumar <rakkuma@microsoft.com>
ealsur
ealsur previously approved these changes Jun 22, 2020
kirankumarkolli
kirankumarkolli previously approved these changes Jul 2, 2020
@kirankumarkolli
Copy link
Member

@j82w can you please take a look?

Signed-off-by: Rakesh Kumar <rakkuma@microsoft.com>
@rakkuma rakkuma dismissed stale reviews from kirankumarkolli and ealsur via ebc75f5 July 7, 2020 18:19
Signed-off-by: Rakesh Kumar <rakkuma@microsoft.com>
@kirankumarkolli
Copy link
Member

Its looking great thanks @rakkuma

@j82w j82w merged commit 9378a32 into master Jul 14, 2020
@j82w j82w deleted the users/rakkuma/transactional-batch-option branch July 14, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants