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

Warn user to run full repair when increasing replication factor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 4.0-alpha1, 4.0
    • Legacy/Core
    • None
    • Debian

    Description

      Scenario:
      Start two nodes cluster.

      Create keyspace with rep.factor one:
      CREATE KEYSPACE rep WITH replication =

      {'class': 'SimpleStrategy', 'replication_factor': 1}

      ;
      CREATE TABLE rep.data (str text PRIMARY KEY );
      INSERT INTO rep.data (str) VALUES ( 'qwerty');

      Run nodetool flush on all nodes. On one of them table files are created.

      Change replication factor to two:
      ALTER KEYSPACE rep WITH replication =

      {'class': 'SimpleStrategy', 'replication_factor': 2}

      ;

      Run repair, then nodetool flush on all nodes. On all nodes table files are created.

      Change replication factor to one:
      ALTER KEYSPACE rep WITH replication =

      {'class': 'SimpleStrategy', 'replication_factor': 1}

      ;

      Then nodetool cleanup, only on initial node remained data files.

      Change replication factor to two again:
      ALTER KEYSPACE rep WITH replication =

      {'class': 'SimpleStrategy', 'replication_factor': 2}

      ;

      Run repair, then nodetool flush on all nodes. No data files on second node (though expected, as after first repair/flush).

      Attachments

        Activity

          People

            marcuse Marcus Eriksson
            vovodroid Vovodroid
            Marcus Eriksson
            Paulo Motta
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: