You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't allow you to specify a more sensible default. Since we're wrapping this library, we could very easily support setting a consistency level on a Cluster or Session level, and propagating that change down into the execution handler.
This has been a footgun for us, where we forget to set consistency level on a query to have it be doing ONE reads/writes instead of QUORUM read/writes. By providing an API that lets us set the default consistency level, this will let users of the library opt out of this nonsense default from the C++ driver, and not have to worry about setting the consistency level with each statement they execute. Perhaps even we should be opinionated here and say that the default consistency level should be LOCAL_QUORUM, because honestly, ONE is an insane default that can lead to data loss/inconsistency.
Our code right now has a LOT of x.set_consistency(cassandra::Consistency::LOCAL_QUORUM)?; and it's pretty dangerous if forgotten.
The text was updated successfully, but these errors were encountered:
Currently, the underlying C++ library defaults everything to a consistency level of ONE. (https://docs.datastax.com/en/developer/cpp-driver/2.15/api/struct.CassStatement/#function-cass_statement_set_consistency)
It doesn't allow you to specify a more sensible default. Since we're wrapping this library, we could very easily support setting a consistency level on a Cluster or Session level, and propagating that change down into the execution handler.
This has been a footgun for us, where we forget to set consistency level on a query to have it be doing ONE reads/writes instead of QUORUM read/writes. By providing an API that lets us set the default consistency level, this will let users of the library opt out of this nonsense default from the C++ driver, and not have to worry about setting the consistency level with each statement they execute. Perhaps even we should be opinionated here and say that the default consistency level should be
LOCAL_QUORUM
, because honestly,ONE
is an insane default that can lead to data loss/inconsistency.Our code right now has a LOT of
x.set_consistency(cassandra::Consistency::LOCAL_QUORUM)?;
and it's pretty dangerous if forgotten.The text was updated successfully, but these errors were encountered: