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

Don't fail on client for Batch API for large requests #936

Merged
merged 3 commits into from
Oct 31, 2019

Conversation

abhijitpai
Copy link
Contributor

Description

We had an optimization to not make Batch requests to the server if we think they are too large - removing this since making server requests allows for the natural error handling flow (similar to regular point operations where we don't check the max size of input on the client) among other benefits.

Type of change

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

ealsur
ealsur previously approved these changes Oct 25, 2019
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

Just one question. In the case of Bulk, if the operation is too big, would then the Batch partially fail with a failure for that operation? If so, that means that operation can never go through Bulk/Batch due to its size, correct? Which is the expected server status response?

@abhijitpai
Copy link
Contributor Author

abhijitpai commented Oct 27, 2019

@ealsur
Since we will no longer restrict the resource size within the batch operation on the client, if we have a resource with size beyond resource size limit but the batch request itself is within the max batch size limit, then we will go to the server and the batch request can fail partially, with the particular operation result's status code being HTTP 413 - I am adding an emulator test in bulk to demonstrate this behavior.

In the earlier iteration, I had tried to keep rest of the bulk flow as it was before this change since bulk needs to know about batch request size limit on the client in order to be able to dispatch correctly unlike atomic batch so we could take any needed fixes in a separate PR; I will instead fix them in this PR in the next iteration so there is less confusion and we will never block on the client for large operations within bulk as well - the client size limits we have still apply in bulk except that we will ensure the server batch request has at least 1 operation irrespective of size configuration.

ealsur
ealsur previously approved these changes Oct 28, 2019
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

Thanks!

@kirankumarkolli kirankumarkolli merged commit 034fc58 into master Oct 31, 2019
@kirankumarkolli kirankumarkolli deleted the users/abpai/blarge branch October 31, 2019 18:33
ealsur pushed a commit that referenced this pull request Nov 19, 2019
* Don't fail on client for batch for large requests

* Ensure bulk also doesn't fail on client irrespective of resource size

* Add to change log; fix error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants