Problem:
The client had a Cassandra cluster spanning two data centers. They ran nodetool repair on one keyspace, but after several hours, it was stuck at 99% completion. They requested guidance on how to proceed with the issue, noting that their product version was ‘ReleaseVersion: 2.2.5.’
Process:
Step 1 – Initial investigation and troubleshooting
After the investigation, the expert team provided troubleshooting measures to fix the issue. The following steps were performed:
- Increased the heap memory from 8 GB to 32 GB. The parameter was increased on all the nodes one by one.
- After applying the change on the first node, the nodetool compaction stats were checked; compaction ran automatically and finished.
- Ran nodetool cleanup to delete unused replicas.
- Ran nodetool compact at the table level on the first node.
- Ran nodetool scrub at the table level on the first node.
- Ran nodetool repair at the table level on the first node.
- Repeated the same steps on the next node, and so on, one node at a time.
Step 2 – Further investigation
The next steps included:
1. Running Clean-up and Compaction on Machines:
Clean-up and compaction were run to ensure the validation step completed successfully. The same steps were also planned for the second data center, even if they failed, to determine whether Cassandra’s native tables could be repaired.
2. Monitoring the Progress of the Repair Process:
The progress of the repair process was monitored by checking compaction stats.
Solution:
The experts advised increasing memory for all the Cassandra nodes. This fixed the issue.
Conclusion:
The client faced an issue with a Cassandra cluster spanning two data centers, where a nodetool repair on one keyspace stalled at 99% completion. During the initial investigation, the experts suggested increasing Cassandra’s heap memory to 32 GB and running per-table maintenance jobs. Further steps included running clean-up and compaction and monitoring repair progress through compaction stats. Ultimately, increasing the memory for all Cassandra nodes resolved the problem.