blob: cfe320b75dcf67e82a063f01808cd5b1d1209216 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Compaction | Apache Cassandra Documentation</title>
<link rel="stylesheet" href="../../../../../assets/css/site.css">
<link rel="schema.dcterms" href="https://purl.org/dc/terms/">
<meta name="dcterms.subject" content="Cassandra">
<meta name="dcterms.identifier" content="3.11">
<meta name="generator" content="Antora 2.3.4">
<link rel="icon" href="../../../../../assets/img/favicon.ico" type="image/x-icon">
<script>
const script = document.createElement("script");
const domain = window.location.hostname;
script.type = "text/javascript";
script.src = "https://plausible.cassandra.apache.org/js/plausible.js";
script.setAttribute("data-domain",domain);
script.setAttribute("defer",'true');
script.setAttribute("async",'true');
document.getElementsByTagName("head")[0].appendChild(script);
</script> </head>
<body class="docs-wrapper article">
<div class="container mx-auto relative">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<meta property="og:type" content="website" />
<meta property="og:url" content="/" />
<meta property="og:site_name" content="Apache Cassandra" />
<header id="top-nav">
<div class="inner relative">
<div class="header-social-icons text-right">
<a href="https://twitter.com/cassandra?lang=en" target="_blank" styles="margin-left: 20px;"><img src="../../../../../assets/img/twitter-icon-circle-white.svg" alt="twitter icon" width="24"></a>
<a href="https://www.linkedin.com/company/apache-cassandra/" target="_blank" styles="margin-left: 20px;"><img src="../../../../../assets/img/LI-In-Bug.png" alt="linked-in icon" width="24"></a>
<a href="https://www.youtube.com/c/PlanetCassandra" target="_blank" styles="margin-left: 20px;"><img src="../../../../../assets/img/youtube-icon.png" alt="youtube icon" width="24"></a>
</div>
<div class="cf">
<div class="logo left"><a href="/"><img src="../../../../../assets/img/logo-white-r.png" alt="Cassandra Logo"></a></div>
<div class="mobile-nav-icon right">
<img class="toggle-icon" src="../../../../../assets/img/hamburger-nav.svg">
</div>
<ul class="main-nav nav-links right flex flex-vert-center flex-space-between">
<li>
<a class="nav-link hide-mobile">Get Started</a>
<ul class="sub-menu bg-white">
<li class="pa-micro">
<a href="/_/cassandra-basics.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-basics.png" alt="cassandra basics icon">
</div>
<div class="sub-nav-text teal py-small">
Cassandra Basics
</div>
</a>
</li>
<li class="pa-micro">
<a href="/_/quickstart.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-rocket.png" alt="cassandra basics icon">
</div>
<div class="sub-nav-text teal py-small">
Quickstart
</div>
</a>
</li>
<li class="pa-micro">
<a href="/_/ecosystem.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-ecosystem.png" alt="cassandra basics icon">
</div>
<div class="sub-nav-text teal py-small">
Ecosystem
</div>
</a>
</li>
</ul>
</li>
<li><a class="nav-link" href="/doc/latest/">Documentation</a></li>
<li>
<a class="nav-link" href="/_/community.html">Community</a>
<ul class="sub-menu bg-white">
<li class="pa-micro">
<a href="/_/community.html#code-of-conduct">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-welcome.png" alt="welcome icon">
</div>
<div class="sub-nav-text teal py-small">
Welcome
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/community.html#discussions">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-discussions.png" alt="discussions icon">
</div>
<div class="sub-nav-text teal py-small">
Discussions
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/community.html#project-governance">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-governance.png" alt="Governance icon">
</div>
<div class="sub-nav-text teal py-small">
Governance
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/community.html#how-to-contribute">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-contribute.png" alt="Contribute icon">
</div>
<div class="sub-nav-text teal py-small">
Contribute
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/community.html#meet-the-community">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-community.png" alt="Meet the Community icon">
</div>
<div class="sub-nav-text teal py-small">
Meet the Community
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/cassandra-catalyst-program.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-catalyst.png" alt="Catalyst icon">
</div>
<div class="sub-nav-text teal py-small">
Catalyst Program
</div>
</a>
</li>
<li class="pa-micro hide-mobile">
<a href="/_/events.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-events.png" alt="Events icon">
</div>
<div class="sub-nav-text teal py-small">
Events
</div>
</a>
</li>
</ul>
</li>
<li>
<a class="nav-link hide-mobile">Learn</a>
<ul class="sub-menu bg-white">
<li class="pa-micro">
<a href="/_/Apache-Cassandra-5.0-Moving-Toward-an-AI-Driven-Future.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-basics.png" alt="Basics icon">
</div>
<div class="sub-nav-text teal py-small">
Cassandra 5.0
</div>
</a>
</li>
<li class="pa-micro">
<a href="/_/case-studies.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-case-study.png" alt="Case Studies icon">
</div>
<div class="sub-nav-text teal py-small">
Case Studies
</div>
</a>
</li>
<li class="pa-micro">
<a href="/_/resources.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-resources.png" alt="Resources icon">
</div>
<div class="sub-nav-text teal py-small">
Resources
</div>
</a>
</li>
<li class="pa-micro">
<a href="/_/blog.html">
<div class="sub-nav-icon">
<img src="../../../../../assets/img/sub-menu-blog.png" alt="Blog icon">
</div>
<div class="sub-nav-text teal py-small">
Blog
</div>
</a>
</li>
</ul>
</li>
<li><a class="nav-link btn btn--filled" href="/_/download.html">Download Now</a></li>
</ul>
</div>
</div>
</header>
<div class="hero hero--home grad">
<div class="eye"></div>
<div id="docs-content" class="text-center flex flex-center flex-column relative z2 ma-xlarge">
<h2>Cassandra Documentation</h2>
</div>
</div>
<div class="body px-medium py-medium container">
<div class="docs-nav-bar flex flex-space-between mb-medium">
<div id="mobile-docs-nav-burger" class="hidden">
<svg viewBox="0 0 24 24" width="36" height="36" stroke="#1c81a0" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
</div>
<div class="docs-nav-item relative">
<input id="search-input" type="text" placeholder="Search docs">
</div>
<div class="versions-wrapper">
<h4>Version:</h4>
<div class="nav-panel-explore" data-panel="explore">
<div id="version-toggle" class="context">
<span class="version">3.11</span>
</div>
<ul id="versions-list" class="components">
<li class="component">
<ul class="versions">
<li class="version is-latest">
<a href="../../../../../_/index.html">master</a>
</li>
</ul>
</li>
<li class="component is-current">
<ul class="versions">
<li class="version">
<a href="../../../../trunk/index.html">trunk</a>
</li>
<li class="version">
<a href="../../../../5.0/index.html">5.0</a>
</li>
<li class="version is-latest">
<a href="../../../../4.1/index.html">4.1</a>
</li>
<li class="version">
<a href="../../../../4.0/index.html">4.0</a>
</li>
<li class="version is-current">
<a href="../../../index.html">3.11</a>
</li>
</ul>
</li>
</ul>
</div>
</div> </div>
<div class="cf relative">
<nav class="nav docs-nav full-800">
<div class="nav-menu">
<ul class="nav-list">
<li class="nav-item is-active" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../../index.html">Main</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/glossary.html">Glossary</a>
</span>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/bugs.html">How to report bugs</a>
</span>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/contactus.html">Contact us</a>
</span>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item is-active" data-depth="0">
<ul class="nav-list">
<li class="nav-item is-current-path is-active" data-depth="1">
<span class="nav-line">
<button class="nav-toggle"></button>
<span class="nav-text">Cassandra</span>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../getting_started/index.html">Getting Started</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../getting_started/installing.html">Installing Cassandra</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../getting_started/configuring.html">Configuring Cassandra</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../getting_started/querying.html">Inserting and querying</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../getting_started/drivers.html">Client drivers</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../getting_started/production.html">Production recommendations</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../architecture/index.html">Architecture</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../architecture/overview.html">Overview</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../architecture/dynamo.html">Dynamo</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../architecture/storage_engine.html">Storage engine</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../architecture/guarantees.html">Guarantees</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../data_modeling/index.html">Data modeling</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/intro.html">Introduction</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_conceptual.html">Conceptual data modeling</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_rdbms.html">RDBMS design</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_queries.html">Defining application queries</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_logical.html">Logical data modeling</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_physical.html">Physical data modeling</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_refining.html">Evaluating and refining data models</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_schema.html">Defining database schema</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../data_modeling/data_modeling_tools.html">Cassandra data modeling tools</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../cql/index.html">Cassandra Query Language (CQL)</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/definitions.html">Definitions</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/types.html">Data types</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/ddl.html">Data definition (DDL)</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/dml.html">Data manipulation (DML)</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/operators.html">Operators</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/indexes.html">Secondary indexes</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/mvs.html">Materialized views</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/functions.html">Functions</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/json.html">JSON</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/security.html">Security</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/triggers.html">Triggers</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/appendices.html">Appendices</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/changes.html">Changes</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/SASI.html">SASI</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../cql/cql_singlefile.html">Single file of CQL information</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../configuration/index.html">Configuration</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_yaml_file.html">cassandra.yaml</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_rackdc_file.html">cassandra-rackdc.properties</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_env_sh_file.html">cassandra-env.sh</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_topo_file.html">cassandra-topologies.properties</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_cl_archive_file.html">commitlog-archiving.properties</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_logback_xml_file.html">logback.xml</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../configuration/cass_jvm_options_file.html">jvm-* files</a>
</span>
</li>
</ul>
</li>
<li class="nav-item is-current-path is-active" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../index.html">Operating</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="#operating/snitch.adoc">Snitches</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../topo_changes.html">Topology changes</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../repair.html">Repair</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../hints.html">Hints</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../bloom_filters.html">Bloom filters</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../compression.html">Compression</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../cdc.html">Change Data Capture (CDC)</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../backups.html">Backups</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../bulk_loading.html">Bulk loading</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../metrics.html">Metrics</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../security.html">Security</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../hardware.html">Hardware</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../audit_logging.html">Audit logging</a>
</span>
</li>
<li class="nav-item is-current-page is-active" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="index.html">Compaction</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../tools/index.html">Tools</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../tools/cqlsh.html">cqlsh: the CQL shell</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../tools/nodetool/nodetool.html">nodetool</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../tools/sstable/index.html">SSTable tools</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../tools/cassandra_stress.html">cassandra-stress</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../troubleshooting/index.html">Troubleshooting</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../troubleshooting/finding_nodes.html">Finding misbehaving nodes</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../troubleshooting/reading_logs.html">Reading Cassandra logs</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../troubleshooting/use_nodetool.html">Using nodetool</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../troubleshooting/use_tools.html">Using external tools to deep-dive</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<button class="nav-toggle"></button>
<a class="nav-link" href="../../../../../_/development/index.html">Development</a>
</span>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/gettingstarted.html">Getting started</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/ide.html">Building and IDE integration</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/testing.html">Testing</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/patches.html">Contributing code changes</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/code_style.html">Code style</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/how_to_review.html">Review checklist</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/how_to_commit.html">How to commit</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/documentation.html">Working on documentation</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/ci.html">Jenkins CI environment</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/dependencies.html">Dependency management</a>
</span>
</li>
<li class="nav-item" data-depth="3">
<span class="nav-line">
<a class="nav-link" href="../../../../../_/development/release_process.html">Release process</a>
</span>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<a class="nav-link" href="../../faq/index.html">FAQ</a>
</span>
</li>
<li class="nav-item" data-depth="2">
<span class="nav-line">
<a class="nav-link" href="../../plugins/index.html">Plug-ins</a>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<aside class="toc sidebar">
<div class="toc-menu"></div>
</aside>
<main class="article default-main full-800" data-ceiling="topbar">
<div class="article-banner">
<p>A newer version of this documentation is available.</p>
<a class="btn" href="../../../../4.1/cassandra/operating/compaction/index.html">View Latest</a>
</div>
<div class="article-header">
<nav class="crumbs" aria-label="breadcrumbs">
<ul>
<li class="crumb">Cassandra</li>
<li class="crumb"><a href="../index.html">Operating</a></li>
<li class="crumb"><a href="index.html">Compaction</a></li>
</ul>
</nav>
<div class="tools" role="navigation">
<ul>
<li class="tool edit"><a href="file:///home/jenkins/working/cassandra/doc/modules/cassandra/pages/operating/compaction/index.adoc" title="Edit Page" target="_blank" rel="noopener">Edit</a></li>
</ul>
</div>
</div>
<article class="doc">
<h1 class="page">Compaction</h1>
<div class="sect1">
<h2 id="strategies"><a class="anchor" href="#strategies"></a><a class="link" href="#strategies">Strategies</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Picking the right compaction strategy for your workload will ensure the
best performance for both querying and for compaction itself.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><a href="stcs.html" class="page"><code>Size Tiered Compaction Strategy (STCS)</code></a></dt>
<dd>
<p>The default compaction strategy. Useful as a fallback when other
strategies don&#8217;t fit the workload. Most useful for non pure time
series workloads with spinning disks, or when the I/O from <code>LCS</code>
is too high.</p>
</dd>
<dt class="hdlist1"><a href="lcs.html" class="page"><code>Leveled Compaction Strategy (LCS)</code></a></dt>
<dd>
<p>Leveled Compaction Strategy (LCS) is optimized for read heavy
workloads, or workloads with lots of updates and deletes. It is not a
good choice for immutable time series data.</p>
</dd>
<dt class="hdlist1"><a href="twcs.html" class="page"><code>Time Window Compaction Strategy (TWCS)</code></a></dt>
<dd>
<p>Time Window Compaction Strategy is designed for TTL&#8217;ed, mostly
immutable time series data.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="types-of-compaction"><a class="anchor" href="#types-of-compaction"></a><a class="link" href="#types-of-compaction">Types of compaction</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The concept of compaction is used for different kinds of operations in
Cassandra, the common thing about these operations is that it takes one
or more SSTables and output new SSTables. The types of compactions are:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Minor compaction</dt>
<dd>
<p>triggered automatically in Cassandra.</p>
</dd>
<dt class="hdlist1">Major compaction</dt>
<dd>
<p>a user executes a compaction over all SSTables on the node.</p>
</dd>
<dt class="hdlist1">User defined compaction</dt>
<dd>
<p>a user triggers a compaction on a given set of SSTables.</p>
</dd>
<dt class="hdlist1">Scrub</dt>
<dd>
<p>try to fix any broken SSTables. This can actually remove valid data if
that data is corrupted, if that happens you will need to run a full
repair on the node.</p>
</dd>
<dt class="hdlist1">UpgradeSSTables</dt>
<dd>
<p>upgrade SSTables to the latest version. Run this after upgrading to a
new major version.</p>
</dd>
<dt class="hdlist1">Cleanup</dt>
<dd>
<p>remove any ranges this node does not own anymore, typically triggered
on neighbouring nodes after a node has been bootstrapped since that
node will take ownership of some ranges from those nodes.</p>
</dd>
<dt class="hdlist1">Secondary index rebuild</dt>
<dd>
<p>rebuild the secondary indexes on the node.</p>
</dd>
<dt class="hdlist1">Anticompaction</dt>
<dd>
<p>after repair the ranges that were actually repaired are split out of
the SSTables that existed when repair started.</p>
</dd>
<dt class="hdlist1">Sub range compaction</dt>
<dd>
<p>It is possible to only compact a given sub range - this could be
useful if you know a token that has been misbehaving - either
gathering many updates or many deletes.
(<code>nodetool compact -st x -et y</code>) will pick all SSTables containing the
range between x and y and issue a compaction for those SSTables. For
STCS this will most likely include all SSTables but with LCS it can
issue the compaction for a subset of the SSTables. With LCS the
resulting sstable will end up in L0.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="when-is-a-minor-compaction-triggered"><a class="anchor" href="#when-is-a-minor-compaction-triggered"></a><a class="link" href="#when-is-a-minor-compaction-triggered">When is a minor compaction triggered?</a></h2>
<div class="sectionbody">
<div class="ulist">
<ul>
<li>
<p>When an sstable is added to the node through flushing/streaming</p>
</li>
<li>
<p>When autocompaction is enabled after being disabled (<code>nodetool enableautocompaction</code>)</p>
</li>
<li>
<p>When compaction adds new SSTables</p>
</li>
<li>
<p>A check for new minor compactions every 5 minutes</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="merging-sstables"><a class="anchor" href="#merging-sstables"></a><a class="link" href="#merging-sstables">Merging SSTables</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Compaction is about merging SSTables, since partitions in SSTables are
sorted based on the hash of the partition key it is possible to
efficiently merge separate SSTables. Content of each partition is also
sorted so each partition can be merged efficiently.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="tombstones-and-garbage-collection-gc-grace"><a class="anchor" href="#tombstones-and-garbage-collection-gc-grace"></a><a class="link" href="#tombstones-and-garbage-collection-gc-grace">Tombstones and Garbage Collection (GC) Grace</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="why-tombstones"><a class="anchor" href="#why-tombstones"></a><a class="link" href="#why-tombstones">Why Tombstones</a></h3>
<div class="paragraph">
<p>When a delete request is received by Cassandra it does not actually
remove the data from the underlying store. Instead it writes a special
piece of data known as a tombstone. The Tombstone represents the delete
and causes all values which occurred before the tombstone to not appear
in queries to the database. This approach is used instead of removing
values because of the distributed nature of Cassandra.</p>
</div>
</div>
<div class="sect2">
<h3 id="deletes-without-tombstones"><a class="anchor" href="#deletes-without-tombstones"></a><a class="link" href="#deletes-without-tombstones">Deletes without tombstones</a></h3>
<div class="paragraph">
<p>Imagine a three node cluster which has the value [A] replicated to every
node.:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[A], [A], [A]</code></pre>
</div>
</div>
<div class="paragraph">
<p>If one of the nodes fails and and our delete operation only removes
existing values we can end up with a cluster that looks like:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[], [], [A]</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then a repair operation would replace the value of [A] back onto the two
nodes which are missing the value.:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[A], [A], [A]</code></pre>
</div>
</div>
<div class="paragraph">
<p>This would cause our data to be resurrected even though it had been
deleted.</p>
</div>
</div>
<div class="sect2">
<h3 id="deletes-with-tombstones"><a class="anchor" href="#deletes-with-tombstones"></a><a class="link" href="#deletes-with-tombstones">Deletes with Tombstones</a></h3>
<div class="paragraph">
<p>Starting again with a three node cluster which has the value [A]
replicated to every node.:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[A], [A], [A]</code></pre>
</div>
</div>
<div class="paragraph">
<p>If instead of removing data we add a tombstone record, our single node
failure situation will look like this.:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[A, Tombstone[A]], [A, Tombstone[A]], [A]</code></pre>
</div>
</div>
<div class="paragraph">
<p>Now when we issue a repair the Tombstone will be copied to the replica,
rather than the deleted data being resurrected.:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">[A, Tombstone[A]], [A, Tombstone[A]], [A, Tombstone[A]]</code></pre>
</div>
</div>
<div class="paragraph">
<p>Our repair operation will correctly put the state of the system to what
we expect with the record [A] marked as deleted on all nodes. This does
mean we will end up accruing Tombstones which will permanently
accumulate disk space. To avoid keeping tombstones forever we have a
parameter known as <code>gc_grace_seconds</code> for every table in Cassandra.</p>
</div>
</div>
<div class="sect2">
<h3 id="the-gc_grace_seconds-parameter-and-tombstone-removal"><a class="anchor" href="#the-gc_grace_seconds-parameter-and-tombstone-removal"></a><a class="link" href="#the-gc_grace_seconds-parameter-and-tombstone-removal">The gc_grace_seconds parameter and Tombstone Removal</a></h3>
<div class="paragraph">
<p>The table level <code>gc_grace_seconds</code> parameter controls how long Cassandra
will retain tombstones through compaction events before finally removing
them. This duration should directly reflect the amount of time a user
expects to allow before recovering a failed node. After
<code>gc_grace_seconds</code> has expired the tombstone may be removed (meaning
there will no longer be any record that a certain piece of data was
deleted), but as a tombstone can live in one sstable and the data it
covers in another, a compaction must also include both sstable for a
tombstone to be removed. More precisely, to be able to drop an actual
tombstone the following needs to be true;</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The tombstone must be older than <code>gc_grace_seconds</code></p>
</li>
<li>
<p>If partition X contains the tombstone, the sstable containing the
partition plus all SSTables containing data older than the tombstone
containing X must be included in the same compaction. We don&#8217;t need to
care if the partition is in an sstable if we can guarantee that all data
in that sstable is newer than the tombstone. If the tombstone is older
than the data it cannot shadow that data.</p>
</li>
<li>
<p>If the option <code>only_purge_repaired_tombstones</code> is enabled, tombstones
are only removed if the data has also been repaired.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>If a node remains down or disconnected for longer than
<code>gc_grace_seconds</code> it&#8217;s deleted data will be repaired back to the other
nodes and re-appear in the cluster. This is basically the same as in the
"Deletes without Tombstones" section. Note that tombstones will not be
removed until a compaction event even if <code>gc_grace_seconds</code> has elapsed.</p>
</div>
<div class="paragraph">
<p>The default value for <code>gc_grace_seconds</code> is 864000 which is equivalent
to 10 days. This can be set when creating or altering a table using
<code>WITH gc_grace_seconds</code>.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="ttl"><a class="anchor" href="#ttl"></a><a class="link" href="#ttl">TTL</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Data in Cassandra can have an additional property called time to live -
this is used to automatically drop data that has expired once the time
is reached. Once the TTL has expired the data is converted to a
tombstone which stays around for at least <code>gc_grace_seconds</code>. Note that
if you mix data with TTL and data without TTL (or just different length
of the TTL) Cassandra will have a hard time dropping the tombstones
created since the partition might span many SSTables and not all are
compacted at once.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="fully-expired-sstables"><a class="anchor" href="#fully-expired-sstables"></a><a class="link" href="#fully-expired-sstables">Fully expired SSTables</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>If an sstable contains only tombstones and it is guaranteed that that
sstable is not shadowing data in any other sstable compaction can drop
that sstable. If you see SSTables with only tombstones (note that TTL:ed
data is considered tombstones once the time to live has expired) but it
is not being dropped by compaction, it is likely that other SSTables
contain older data. There is a tool called <code>sstableexpiredblockers</code> that
will list which SSTables are droppable and which are blocking them from
being dropped. This is especially useful for time series compaction with
<code>TimeWindowCompactionStrategy</code> (and the deprecated
<code>DateTieredCompactionStrategy</code>). With <code>TimeWindowCompactionStrategy</code> it
is possible to remove the guarantee (not check for shadowing data) by
enabling <code>unsafe_aggressive_sstable_expiration</code>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="repairedunrepaired-data"><a class="anchor" href="#repairedunrepaired-data"></a><a class="link" href="#repairedunrepaired-data">Repaired/unrepaired data</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>With incremental repairs Cassandra must keep track of what data is
repaired and what data is unrepaired. With anticompaction repaired data
is split out into repaired and unrepaired SSTables. To avoid mixing up
the data again separate compaction strategy instances are run on the two
sets of data, each instance only knowing about either the repaired or
the unrepaired SSTables. This means that if you only run incremental
repair once and then never again, you might have very old data in the
repaired SSTables that block compaction from dropping tombstones in the
unrepaired (probably newer) SSTables.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="data-directories"><a class="anchor" href="#data-directories"></a><a class="link" href="#data-directories">Data directories</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Since tombstones and data can live in different SSTables it is important
to realize that losing an sstable might lead to data becoming live again
- the most common way of losing SSTables is to have a hard drive break
down. To avoid making data live tombstones and actual data are always in
the same data directory. This way, if a disk is lost, all versions of a
partition are lost and no data can get undeleted. To achieve this a
compaction strategy instance per data directory is run in addition to
the compaction strategy instances containing repaired/unrepaired data,
this means that if you have 4 data directories there will be 8
compaction strategy instances running. This has a few more benefits than
just avoiding data getting undeleted:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>It is possible to run more compactions in parallel - leveled
compaction will have several totally separate levelings and each one can
run compactions independently from the others.</p>
</li>
<li>
<p>Users can backup and restore a single data directory.</p>
</li>
<li>
<p>Note though that currently all data directories are considered equal,
so if you have a tiny disk and a big disk backing two data directories,
the big one will be limited the by the small one. One work around to
this is to create more data directories backed by the big disk.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="single-sstable-tombstone-compaction"><a class="anchor" href="#single-sstable-tombstone-compaction"></a><a class="link" href="#single-sstable-tombstone-compaction">Single sstable tombstone compaction</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>When an sstable is written a histogram with the tombstone expiry times
is created and this is used to try to find SSTables with very many
tombstones and run single sstable compaction on that sstable in hope of
being able to drop tombstones in that sstable. Before starting this it
is also checked how likely it is that any tombstones will actually will
be able to be dropped how much this sstable overlaps with other
SSTables. To avoid most of these checks the compaction option
<code>unchecked_tombstone_compaction</code> can be enabled.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="compaction-options"><a class="anchor" href="#compaction-options"></a><a class="link" href="#compaction-options">Common options</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>There is a number of common options for all the compaction strategies;</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>enabled</code> (default: true)</dt>
<dd>
<p>Whether minor compactions should run. Note that you can have
'enabled': true as a compaction option and then do 'nodetool
enableautocompaction' to start running compactions.</p>
</dd>
<dt class="hdlist1"><code>tombstone_threshold</code> (default: 0.2)</dt>
<dd>
<p>How much of the sstable should be tombstones for us to consider doing
a single sstable compaction of that sstable.</p>
</dd>
<dt class="hdlist1"><code>tombstone_compaction_interval</code> (default: 86400s (1 day))</dt>
<dd>
<p>Since it might not be possible to drop any tombstones when doing a
single sstable compaction we need to make sure that one sstable is not
constantly getting recompacted - this option states how often we
should try for a given sstable.</p>
</dd>
<dt class="hdlist1"><code>log_all</code> (default: false)</dt>
<dd>
<p>New detailed compaction logging, see
<code>below &lt;detailed-compaction-logging&gt;</code>.</p>
</dd>
<dt class="hdlist1"><code>unchecked_tombstone_compaction</code> (default: false)</dt>
<dd>
<p>The single sstable compaction has quite strict checks for whether it
should be started, this option disables those checks and for some
usecases this might be needed. Note that this does not change anything
for the actual compaction, tombstones are only dropped if it is safe
to do so - it might just rewrite an sstable without being able to drop
any tombstones.</p>
</dd>
<dt class="hdlist1"><code>only_purge_repaired_tombstone</code> (default: false)</dt>
<dd>
<p>Option to enable the extra safety of making sure that tombstones are
only dropped if the data has been repaired.</p>
</dd>
<dt class="hdlist1"><code>min_threshold</code> (default: 4)</dt>
<dd>
<p>Lower limit of number of SSTables before a compaction is triggered.
Not used for <code>LeveledCompactionStrategy</code>.</p>
</dd>
<dt class="hdlist1"><code>max_threshold</code> (default: 32)</dt>
<dd>
<p>Upper limit of number of SSTables before a compaction is triggered.
Not used for <code>LeveledCompactionStrategy</code>.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>Further, see the section on each strategy for specific additional
options.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="compaction-nodetool-commands"><a class="anchor" href="#compaction-nodetool-commands"></a><a class="link" href="#compaction-nodetool-commands">Compaction nodetool commands</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The <code>nodetool &lt;nodetool&gt;</code> utility provides a number of commands related
to compaction:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>enableautocompaction</code></dt>
<dd>
<p>Enable compaction.</p>
</dd>
<dt class="hdlist1"><code>disableautocompaction</code></dt>
<dd>
<p>Disable compaction.</p>
</dd>
<dt class="hdlist1"><code>setcompactionthroughput</code></dt>
<dd>
<p>How fast compaction should run at most - defaults to 16MB/s, but note
that it is likely not possible to reach this throughput.</p>
</dd>
<dt class="hdlist1"><code>compactionstats</code></dt>
<dd>
<p>Statistics about current and pending compactions.</p>
</dd>
<dt class="hdlist1"><code>compactionhistory</code></dt>
<dd>
<p>List details about the last compactions.</p>
</dd>
<dt class="hdlist1"><code>setcompactionthreshold</code></dt>
<dd>
<p>Set the min/max sstable count for when to trigger compaction, defaults
to 4/32.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="switching-the-compaction-strategy-and-options-using-jmx"><a class="anchor" href="#switching-the-compaction-strategy-and-options-using-jmx"></a><a class="link" href="#switching-the-compaction-strategy-and-options-using-jmx">Switching the compaction strategy and options using JMX</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>It is possible to switch compaction strategies and its options on just a
single node using JMX, this is a great way to experiment with settings
without affecting the whole cluster. The mbean is:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">org.apache.cassandra.db:type=ColumnFamilies,keyspace=&lt;keyspace_name&gt;,columnfamily=&lt;table_name&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>and the attribute to change is <code>CompactionParameters</code> or
<code>CompactionParametersJson</code> if you use jconsole or jmc. The syntax for
the json version is the same as you would use in an
<code>ALTER TABLE &lt;alter-table-statement&gt;</code> statement -for example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs" data-lang="none">{ 'class': 'LeveledCompactionStrategy', 'sstable_size_in_mb': 123, 'fanout_size': 10}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The setting is kept until someone executes an
<code>ALTER TABLE &lt;alter-table-statement&gt;</code> that touches the compaction
settings or restarts the node.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="detailed-compaction-logging"><a class="anchor" href="#detailed-compaction-logging"></a><a class="link" href="#detailed-compaction-logging">More detailed compaction logging</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Enable with the compaction option <code>log_all</code> and a more detailed
compaction log file will be produced in your log directory.</p>
</div>
</div>
</div>
</article>
</main>
</div>
</div>
<footer class="grad grad--two flex-center pb-xlarge">
<div class="inner text-center z2 relative">
<h2 class="white py-small">Get started with Cassandra, fast.</h2>
<a id="footer-cta" href="/_/quickstart.html" class="btn btn--filled ma-medium">Quickstart Guide</a>
</div>
<div class="inner flex flex-distribute-items mt-xlarge z2 relative">
<div class="col-2">
<div id="footer-logo" class="logo logo--footer mb-medium"><img src="../../../../../assets/img/logo-white-r.png" alt="Cassandra Logo"></div>
<p>Apache Cassandra<img src="../../../../../assets/img/registered.svg" alt="®" style="width:18px;"> powers mission-critical deployments with improved performance and unparalleled levels of scale in the cloud.</p>
<div class="footer-social-icons">
<a href="https://twitter.com/cassandra?lang=en" target="_blank"><img src="../../../../../assets/img/twitter-icon-circle-white.svg" alt="twitter icon" width="24"></a>
<a href="https://www.linkedin.com/company/apache-cassandra/" target="_blank"><img src="../../../../../assets/img/LI-In-Bug.png" alt="linked-in icon" width="24"></a>
<a href="https://www.youtube.com/c/PlanetCassandra" target="_blank"><img src="../../../../../assets/img/youtube-icon.png" alt="youtube icon" width="24"></a>
</div>
</div>
<div class="col-2 flex flex-center">
<ul class="columns-2">
<li class="mb-small"><a href="/">Home</a></li>
<li class="mb-small"><a href="/_/cassandra-basics.html">Cassandra Basics</a></li>
<li class="mb-small"><a href="/_/quickstart.html">Quickstart</a></li>
<li class="mb-small"><a href="/_/ecosystem.html">Ecosystem</a></li>
<li class="mb-small"><a href="/doc/latest/">Documentation</a></li>
<li class="mb-small"><a href="/_/community.html">Community</a></li>
<li class="mb-small"><a href="/_/case-studies.html">Case Studies</a></li>
<li class="mb-small"><a href="/_/resources.html">Resources</a></li>
<li class="mb-small"><a href="/_/blog.html">Blog</a></li>
</ul>
</div>
</div>
</footer>
<div class="lower-footer bg-white pa-medium">
<div class="flex flex-row flex-vert-center">
<div class="pr-medium"><img src="../../../../../assets/img//feather-small.png" alt="ASF" width="20"></div>
<div class="pr-medium"><a href="http://www.apache.org/" target="_blank">Foundation</a></div>
<div class="pr-medium"><a href="https://www.apache.org/events/current-event.html" target="_blank">Events</a></div>
<div class="pr-medium"><a href="https://www.apache.org/licenses/" target="_blank">License</a></div>
<div class="pr-medium"><a href="https://www.apache.org/foundation/thanks" target="_blank">Thanks</a></div>
<div class="pr-medium"><a href="https://www.apache.org/security" target="_blank">Security</a></div>
<div class="pr-medium"><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy</a></div>
<div class="pr-medium"><a href="https://www.apache.org/foundation/sponsorship" target="_blank">Sponsorship</a></div>
</div>
<p class="my-medium">© 2009-<script>document.write(new Date().getFullYear())</script> <a href="https://apache.org" target="_blank">The Apache Software Foundation</a> under the terms of the Apache License 2.0. Apache, the Apache feather logo, Apache Cassandra, Cassandra, and the Cassandra logo, are either registered trademarks or trademarks of The Apache Software Foundation.</p>
</div>
<div id="fade" class="hidden"></div>
<div id="modal" class="hidden">
<div id="close-modal" class="cursor-pointer"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></div>
<div id="mod-content" class="vid-mod-content resp-container"></div>
</div>
<script src="../../../../../assets/js/site.js"></script>
<script async src="../../../../../assets/js/vendor/highlight.js"></script>
<script src="../../../../../assets/js/vendor/lunr.js"></script>
<script src="../../../../../assets/js/vendor/search.js" id="search-script" data-base-path="../../../../.." data-page-path="/Cassandra/3.11/cassandra/operating/compaction/index.html"></script>
<script async src="../../../../../assets/../search-index.js"></script>
<script>
jQuery(function(){
var windowW = $(window).width();
$(document)
.on('click','.mobile-nav-icon',function(){
$('.main-nav').fadeIn();
})
.on('click','.main-nav',function(){
if(windowW <= 1000){
$(this).fadeOut();
}
})
.on('click','#version-toggle',function(){
$(this).toggleClass('active');
$(this).next().fadeToggle();
})
.on('click','#mobile-docs-nav-burger', function(){
$(this).toggleClass('active');
$('.docs-nav').toggleClass('active');
});
var url = window.location.pathname;
var isQuickstart = url.includes('quickstart.html');
if(isQuickstart){
var footerCTA = document.getElementById('footer-cta');
footerCTA.innerHTML = 'Get latest updates';
footerCTA.setAttribute('href', '/_/blog.html');
}
});
</script>
</div>
</body>
</html>