Problem:
Clients observed repeated write failures: “Timeout during SIMPLE write query at LOCAL_QUORUM (2 required, 1 acknowledged)” while a recent maintenance window had run repairs and triggered large compactions. The cluster runs Apache Cassandra 2.2.5 with a Lucene indexing plugin. Operational context: two datacenters, five nodes each, ~1–2 TB load per node, replication factor recalled as 3, and ongoing anticompaction/compaction activity involving an application keyspace (jesi.service_monitoring_payload) with a ~674 GB anticompaction target (≈275 GB completed, ~41% progress reported). Symptoms included heavy disk writes/IO waits, compaction backlog, nodes in UJ/DN states during rebuilds, and application-level timeouts for LOCAL_QUORUM writes.
Process:
Step 1: Revisit recent maintenance and observable symptoms
Observed that repair operations had been run recently and that compaction backlog was present on multiple nodes. Reviewed the client’s report of write timeouts (LOCAL_QUORUM: 2 required, 1 acknowledged) and correlated that with the maintenance timeline — the repair and subsequent anticompaction/compaction had been active while some nodes were rebuilding. This established a likely temporal link between repair-driven compaction activity and the write timeouts.
Step 2: Differentiate timeout semantics and enumerate probable causes
Interpreted the error as a WriteTimeoutException (replicas contacted but one did not acknowledge within write_request_timeout_in_ms), not an UnavailableException. From that distinction, compiled focused hypotheses: a replica in UJ (bootstrapping/replace_address) not counting toward LOCAL_QUORUM; disk IO contention from compaction/anticompaction/streaming; GC pauses caused by very large trace partitions; node failure mid-compaction due to corrupt SSTables; and extra cost from the Lucene index plugin. This narrowed investigation to replica state, IO metrics, compaction backlog, and traces.
Step 3: Collect runtime metrics and compaction metadata
Requested and reviewed the following operational data: nodetool compactionstats (human-readable) showing multiple large tasks including a ~674 GB anticompaction target for jesi.service_monitoring_payload with ~41% complete; nodetool tpstats to check MutationStage pending and dropped MUTATION counters; and iostat to inspect disk %util and await. Discovery: high disk utilization during the reported windows and evidence of a compaction/anticompaction backlog that matched the application outage timing — confirming disk IO saturation as a prime contributor.
Step 4: Check for tracing and known local corruption sources
Reviewed prior case findings that identified oversized system_traces partitions (hundreds of MB to multi-GB) and at least one CorruptSSTableException in system_traces. Confirmed tracing had been previously flagged but not yet confirmed disabled. Because system_traces can produce very large partitions that generate heavy compaction and GC pressure, this discovery established an actionable source of compaction amplification and heap pressure.
Step 5: Assess cluster membership and repair timing impact
Examined cluster membership state reported by the client: nodes removed or rebuilding left the writable DC with less margin (RF=3 but one node in UJ or removed), making every write dependent on the remaining replicas. This meant that any additional replication latency (from IO or GC) would surface as LOCAL_QUORUM timeouts. The finding changed the operational priority: avoid further cluster-wide repair activity until rebuilds completed and all nodes report UN.
Step 6: Implement targeted mitigation and test effects (transition to solution)
Based on the collected evidence — high disk %util, compaction backlog for a very large application keyspace, active/large trace partitions, and replica-count pressure from rebuilding nodes — mitigation actions were applied to reduce IO contention and stop compaction-driven write drops while preserving data integrity. These interventions were tested live to confirm reduced mutation drops and restored acknowledgement rates before planning node rebuilds and full repairs.
Solution:
Applied a short-term, low-risk remediation on the Apache Cassandra cluster: disabled tracing (nodetool settraceprobability 0) and removed the system_traces SSTables, throttled compaction and streaming throughput (reduced setcompactionthroughput and setstreamthroughput to conservative MB/s values), and deferred any further cluster-wide repair until all affected nodes reached UN. Concurrent_compactors was reviewed and adjusted per-node to reduce parallel disk pressure. Where nodes showed persistent corruption or refused to remain UP, the planned remove-and-rejoin (or replace_address) sequence was scheduled and executed one node at a time.
Architecturally this works because Cassandra write acknowledgements depend on timely disk and CPU service on the contacted replicas; reducing compaction/streaming IO and eliminating large trace-driven compaction work lowered disk latency and GC pressure so replicas could acknowledge within write_request_timeout_in_ms, while postponing repair avoided adding further disk contention during rebuild.
Conclusion:
After throttling compaction/streaming and disabling tracing, write timeouts at LOCAL_QUORUM decreased and mutation drops subsided. The cluster stabilized under load while node rebuilds and controlled repairs proceeded one-by-one. The incident highlighted the operational risk of large trace partitions, repair-driven anticompaction on multi-terabyte nodes, and the need for graceful shutdown and an upgrade path off Cassandra 2.2.x to reduce similar risks long term.