question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we remove ConsistencyLevel in write operation options?

See original GitHub issue

I understand ConsistencyLevel in read operations, but I don’t understand what does it do in write operations like this

var options = new ItemRequestOptions
{
     ConsistencyLevel = ConsistencyLevel.Eventual
};

await _container.CreateItemAsync<T>(item, partitionKey, options);

If it has no effect, maybe it should be removed from write operations options, otherwise the documentations need updates as we can only read about consistency level from the read point of view.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ealsurcommented, Sep 30, 2020

I understand that there are other consistency level between Strong and Eventual and that how Consistency Levels work on write operations (outside of these two already documented ones) might be unknown. You can file an issue in any of the documentation pages (including the one I linked) and ask for clarification, which will be taken care of by the owners of the service documentation.

From the SDK perspective though, it does make sense to be able to change the Consistency for an item operation (read and write) as it does have effects on both (on writes at least it is documented for Strong and Eventual), so as long as there is one scenario where changing it is valid, then it should be possible.

0reactions
msftbot[bot]commented, Dec 15, 2021

Closing due to in-activity, pease feel free to re-open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consistency level choices - Azure Cosmos DB
Azure Cosmos DB has five consistency levels to help balance eventual consistency, availability, and latency trade-offs.
Read more >
DowngradingConsistencyRetryP...
If less replicas responded than required by the consistency level (but at least one replica did respond), the operation is retried at a...
Read more >
How is the consistency level configured?
Configure consistency for a session or per individual read or write operation. Within cqlsh , use CONSISTENCY , to set the consistency level...
Read more >
About Cassandra Replication Factor and Consistency Level
The Cassandra consistency level is defined as the minimum number of Cassandra nodes that must acknowledge a read or write operation before ...
Read more >
FAQ - Where can the consistencyLevel Java client property ...
FAQ - Where can the consistencyLevel Java client property be found for write operations? Knowledge Base Client APIs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found