-
Notifications
You must be signed in to change notification settings - Fork 494
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
No content on Response: Add the ability to have operation return no content from Cosmos DB #1439
Conversation
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMinimalResponseTests.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMinimalResponseTests.cs
Outdated
Show resolved
Hide resolved
…ub.com/Azure/azure-cosmos-dotnet-v3 into users/jawilley/feature/minimalResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool feature, hoping to see some perf results for Bulk with this on/off
This looks great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it even makes sense for Feed/Query/Sproc?
If not can it be rooted to ItemReqeustOptions instead?
Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs
Outdated
Show resolved
Hide resolved
@pentp Yes, etags are still available. I added tests for it. |
Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchItemRequestOptions.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchItemRequestOptions.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchItemRequestOptions.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs
Outdated
Show resolved
Hide resolved
Eureka! It works. Just set the flag and am using it. This is a HUGE perf win. Next up, data compression!?!??! |
Pull Request Template
Description
This adds a flag to get a no content response from Cosmos DB service. This means that create, replace, and upsert operations will have a null response content. This can be lead to a huge improvement in performance by reducing networking traffic and overhead of serializing an object that will never be used.
This is only being exposed on item operations. Two flags are added to make it clear to users that Read can also return with no content. This is great to check if a document exists or not. This also makes it easier in the future to make no content on writes as a default while leaving reads on by default.
Type of change
Please delete options that are not relevant.
Closing issues
closes #1203