Skip to content

Cassandra write consistency level #2513

Closed

Description

@datlechin

Problem

The Cassandra plugin never sets a consistency level, so every statement runs at the DataStax C driver's default of LOCAL_ONE (databases/cassandra.mdx, Connection settings). There is no way to set it per connection or per statement, so a write cannot be made stronger for a critical table or weaker for a bulk load, and the level in effect is not shown anywhere. No call to cass_statement_set_consistency or cass_cluster_set_consistency exists outside the bundled header (apple/Plugins/CassandraDriverPlugin/CCassandra/include/cassandra.h). Typing CONSISTENCY QUORUM in the CQL editor does not help either: it is a cqlsh command, not CQL, so the server rejects it.

Proposed solution

  • A default read and write consistency level on the connection form: ANY, ONE, TWO, THREE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, LOCAL_ONE. Unset keeps today's LOCAL_ONE.
  • Serial consistency for lightweight transactions as its own setting: SERIAL or LOCAL_SERIAL.
  • Honour CONSISTENCY and SERIAL CONSISTENCY in the editor for the statements that follow it in that tab, the way cqlsh does, without sending the line to the server.
  • Show the level in effect in the result footer, so a surprising read has a visible cause.
  • The same for ScyllaDB and Amazon Keyspaces, which use the same driver. Keyspaces accepts only some levels, so the form says which.

Done means a connection set to QUORUM writes at QUORUM, a CONSISTENCY ONE line switches the next statement in that tab to ONE, and the footer names the level each time.

Alternatives considered

cqlsh with CONSISTENCY set.

Platform

macOS

Related database type

Cassandra

Activity

  1. added
    enhancement
    on Aug 26, 2026
  2. added
    platform-macos
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions