Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13550

Partition-level isolation of batch writes almost impossible to use

    XMLWordPrintableJSON

Details

    • Normal

    Description

      The documentation for the BATCH statement states:

      All updates in a @BATCH@ belonging to a given partition key are performed in isolation.

      However, it is almost impossible to make use of this guarantee while reading:

      • if paging is enabled, then the server may insert a page boundary at any point; and there is no isolation among different pages of a single query
      • repairs can cause individual rows within a partition to be repaired, even if they belonged to a larger isolated update
      • in Cassandra 3 and above, reconciliation is incremental, again breaking isolation
      • if rows are overwritten, then even row-level isolation is not guaranteed (the old timestamp collision problem)

      While it's possible to write an application that makes use of the existing isolation guarantees, it is very hard, and will likely impose constraints on the application (paging must be disabled and overwrites and row-level deletes never used).

      The rules should be clarified here and relaxed; relaxation could allow a more efficient implementation (in Scylla we went full MVCC) and prevent users from relying on a guarantee that is not in fact provided.

      Attachments

        Activity

          People

            Unassigned Unassigned
            avi.kivity Avi Kivity
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: