ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB CPP RS Driver Using the Driver Consistency
For AI agents: a documentation index is available at https://cpp-rs-driver.docs.scylladb.com/master/llms.txt. A Markdown version of this page is at https://cpp-rs-driver.docs.scylladb.com/master/topics/using/consistency.md.

Caution

You're viewing documentation for an unstable version of ScyllaDB CPP RS Driver. Switch to the latest stable version.

Consistency¶

A setting that defines a successful write or read by the number of cluster replicas that acknowledge the write or respond to the read request, respectively.

Default consistency¶

The default read and write consistency is CASS_CONSISTENCY_LOCAL_QUORUM. The default serial consistency for Lightweight Transactions (LWTs) is CASS_CONSISTENCY_LOCAL_SERIAL.

These defaults apply to simple statements, bound prepared statements, and batches. Explicit cluster, execution profile, statement, or batch settings take precedence at their respective scopes. An execution profile whose regular consistency is unset uses CASS_CONSISTENCY_LOCAL_QUORUM, even when the cluster default has been overridden. Its unset serial consistency inherits the cluster setting.

Applications that need the previous read and write default can set CASS_CONSISTENCY_LOCAL_ONE explicitly. A local quorum requires responses from a majority of replicas in the local datacenter, which can affect latency and availability compared with CASS_CONSISTENCY_LOCAL_ONE.

Consistency Levels¶

Read and Write Consistency Levels¶

The consistency level determines the number of replicas on which the read/write must respond/succeed before returning an acknowledgment to the client application. Descriptions for each read/write consistency level can be found here.

Level Driver
All CASS_CONSISTENCY_ALL
Each Quorum CASS_CONSISTENCY_EACH_QUORUM
Quorum CASS_CONSISTENCY_QUORUM
Local Quorum CASS_CONSISTENCY_LOCAL_QUORUM
One CASS_CONSISTENCY_ONE
Two CASS_CONSISTENCY_TWO
Three CASS_CONSISTENCY_THREE
Local One CASS_CONSISTENCY_LOCAL_ONE
Any CASS_CONSISTENCY_ANY
Serial CASS_CONSISTENCY_SERIAL
Local Serial CASS_CONSISTENCY_LOCAL_SERIAL

NOTE: Consistency level CASS_CONSISTENCY_ANY is only valid for write operation statements.

Setting Consistency Level¶

A ‘CassStatement’ object can have its consistency level altered at anytime before the statement is executed by the session.

CassStatement* statement = NULL;

/* Create a simple or prepared statment */

/* Ensure the session executed statement has strong consistency */
cass_statement_set_consistency(statement, CASS_CONSISTENCY_QUORUM);

cass_statement_free(statement);

NOTE: Consistency level is ignored for USE, TRUNCATE, CREATE and ALTER statements, and some, like CASS_CONSISTENCY_ANY, aren’t allowed in all situations.

Was this page helpful?

PREVIOUS
Client-side timestamps
NEXT
Data Types
  • Create an issue
  • Edit this page

On this page

  • Consistency
    • Default consistency
    • Consistency Levels
      • Read and Write Consistency Levels
    • Setting Consistency Level
ScyllaDB CPP RS Driver
Search Ask AI
  • master
    • master
    • v1.1.3
    • v1.1.2
    • v1.1.1
    • v1.1.0
    • v1.0.1
    • v1.0.0
  • ScyllaDB CPP RS Driver
  • API Documentation
    • BasicTypes
    • CassConsistency
    • CassError
    • CassValueType
    • CustomAllocator
    • Logging
    • Miscellaneous
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVector
    • CassVersion
  • Getting Started
  • Architecture Overview
  • Installation
  • Building
  • Testing
  • Using the Driver
    • Batches
    • Binding Parameters
    • Client-side timestamps
    • Consistency
    • Data Types
      • The date and time Types
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
      • Vectors
    • Futures
    • Handling Results
    • Keyspaces
    • Prepared Statements
    • Schema Metadata
  • Configuration
    • Load balancing
    • Retry policies
    • Speculative Execution
    • Connection
    • Execution Profiles
    • Performance Tips
    • Client Configuration
  • Security
    • Authentication
    • TLS
  • Observability
    • Logging
    • Tracing
    • Metrics
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 16 Nov 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.3