Search code examples
cassandradatastax-astra

Provided value LOCAL_ONE is not allowed for Write Consistency Level


I'm trying to connect my java spring boot application to cassandra astra db with the cql proxy running with docker-compose. I got this error :

com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Provided value LOCAL_ONE is not allowed for Write Consistency Level (disallowed values are: [ANY, ONE, LOCAL_ONE])

How to resolve this error please


Solution

  • As per the Astra DB Guardrails the supported consistency levels are:

    Supported consistency levels: Reads: Any supported consistency level is permitted. Single-region writes: LOCAL_QUORUM and LOCAL_SERIAL

    Multi-region writes: EACH_QUORUM and SERIAL

    You need to use local_quorum for the writes as a minimum, one / local_one is not supported.