Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool stop

Stops compaction operations.


Terminal window
nodetool [connection_options] stop [options] <compaction_type>

See connection options for connection options.

nodetool stop interrupts running compaction operations. This is useful when compaction is impacting cluster performance or when emergency intervention is needed.


ArgumentDescription
compaction_typeType of compaction to stop

OptionDescription
-id, --compaction-id <id>Stop a specific compaction by its ID (from compactionstats)
TypeDescription
COMPACTIONRegular compaction
VALIDATIONRepair validation (Merkle tree)
CLEANUPCleanup after topology change
SCRUBScrub operation
UPGRADE_SSTABLESSSTable upgrade
INDEX_BUILDSecondary index builds
VIEW_BUILDMaterialized view builds
INDEX_SUMMARYIndex summary redistribution
TOMBSTONE_COMPACTIONTombstone-only compaction
ANTICOMPACTIONPost-repair anticompaction
VERIFYVerification operations
RELOCATESSTable relocation
GARBAGE_COLLECTGarbage collection compaction

Terminal window
nodetool stop COMPACTION
Terminal window
nodetool stop VALIDATION
Terminal window
nodetool stop CLEANUP
Terminal window
nodetool stop INDEX_BUILD
Terminal window
nodetool stop VIEW_BUILD
Terminal window
# First, get the compaction ID from compactionstats
nodetool compactionstats
# Stop specific compaction by ID
nodetool stop -id 12345678-1234-1234-1234-123456789abc COMPACTION
Terminal window
nodetool stop COMPACTION
nodetool stop VALIDATION
nodetool stop CLEANUP

When compaction is causing unacceptable latency:

Terminal window
# Check if compaction is the cause
nodetool compactionstats
# Stop compaction
nodetool stop COMPACTION

When disk is critically low:

Terminal window
# Stop compaction immediately
nodetool stop COMPACTION
# Free space
nodetool clearsnapshot
# Consider reducing compaction throughput before resuming
nodetool setcompactionthroughput 32

When repair validation is taking too long:

Terminal window
# Check repair status
nodetool repair_admin list
# Stop the validation
nodetool stop VALIDATION
# Cancel the repair
nodetool repair_admin cancel <id>

Stop Behavior

When stopped:

  • Current compaction is interrupted
  • Partial work is discarded
  • Compaction will restart automatically
  • Manual compaction needs to be re-run

Automatic compactions resume based on the compaction strategy. To prevent immediate restart:

Terminal window
# Stop compaction
nodetool stop COMPACTION
# Disable auto-compaction for specific table
nodetool disableautocompaction my_keyspace my_table

Terminal window
# See what's running
nodetool compactionstats
Terminal window
# Verify stopped
nodetool compactionstats
# Should show fewer or no active compactions

Stop TypeImpact
COMPACTIONSSTable count may grow
VALIDATIONRepair incomplete
CLEANUPExtra data remains temporarily
INDEX_BUILDIndex incomplete
VIEW_BUILDMaterialized view incomplete
GARBAGE_COLLECTGarbage not collected

Terminal window
# 1. Identify compaction causing issues
nodetool compactionstats
# 2. Stop the compaction type
nodetool stop COMPACTION
# 3. Reduce throughput
nodetool setcompactionthroughput 32
# 4. Allow compaction to resume at lower rate
# (auto-compaction restarts automatically)
# 5. Monitor
watch nodetool compactionstats

Scenario: Large Compaction Blocking Operations

Section titled “Scenario: Large Compaction Blocking Operations”
Terminal window
# Stop the compaction
nodetool stop COMPACTION
# Reduce compaction impact
nodetool setcompactionthroughput 32
nodetool setconcurrentcompactors 1
Terminal window
# Stop validation
nodetool stop VALIDATION
# Wait for current segment to finish
sleep 30
# Restart with smaller scope
nodetool repair -pr my_keyspace

Stopping Compaction

  • Does not prevent future compactions
  • SSTable count will grow
  • Read performance may degrade
  • Disk usage may increase
  • Should be temporary
  • Routine operations (use throughput tuning instead)
  • Long-term compaction control (use strategy tuning)
  • Disk space issues (will make worse long-term)

CommandRelationship
compactionstatsView running compactions
setcompactionthroughputControl compaction speed
compactForce compaction
repair_adminManage repair sessions