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

-dc option for repair, prevents incremental repairs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 4.0.x, 5.x
    • Consistency/Repair
    • None
    • Correctness
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      By default running `nodetool repair` should trigger incremental repairs, but this does not happen if you use the `-dc` flag, even though the repair summary says `incremental: true`.

      You can replicate the issue with the following commands:

      ccm create test-incremental-repairs -v 4.0.1 -n 3 -s
      ccm node1 cqlsh -e "CREATE KEYSPACE keyspace1 WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 2 };"
      ccm stress write
      ccm node1 nodetool "repair keyspace1 standard1 -dc datacenter1"
      find ~/.ccm/test-incremental-repairs/*/data0/keyspace1/standard1* -name *Data.db -exec <PATH_TO_TOOLS>/bin/sstablemetadata {} \; | grep Repaired
      ccm node1 nodetool "repair keyspace1 standard1"
      find ~/.ccm/test-incremental-repairs/*/data0/keyspace1/standard1* -name *Data.db -exec <PATH_TO_TOOLS>/bin/sstablemetadata {} \; | grep Repaired
      

      You'll notice that the output for the first `find` command will all be `Repaired at: 0`, but the second `find` command will give you results like `Repaired at: 1648044754464 (03/23/2022 14:12:34)`.
      At the same time, both `nodetool repair` commands will output like the following:

      [2022-03-23 15:15:52,500] Starting repair command #2 (20f12190-aabc-11ec-a3d4-e9e5a941ef6c), repairing keyspace keyspace1 with repair options (parallelism: parallel, primary range: false, incremental: true, job threads: 1, ColumnFamilies: [standard1], dataCenters: [datacenter1], hosts: [], previewKind: NONE, # of ranges: 2, pull repair: false, force repair: false, optimise streams: false, ignore unreplicated keyspaces: false)
      

      Indicating `incremental: true` for both of them.

      Attachments

        Activity

          People

            n.v.harikrishna n.v.harikrishna
            pedro_gordo Pedro Gordo
            n.v.harikrishna
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: