temporalio / temporalio/temporal

Replace LeveledCompactionStrategy (LCS) with Cassandra 5.x default UnifiedCompactionStrategy (UCS) in schema.cql

Open Beginner friendly
#11,314 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Description

The Cassandra schema file /cassandra/temporal/schema.cql currently configures nearly all tables with LeveledCompactionStrategy (LCS). LCS is not a good general-purpose default — it's optimized for read-heavy workloads with low write amplification tolerance, and imposes unnecessary compaction overhead for tables that don't need it.

Cassandra 5.0 introduces UnifiedCompactionStrategy (UCS) as the new default, which is designed to work well as a general-purpose strategy across a broader range of workloads.

Describe the solution you'd like

Remove the explicit WITH COMPACTION = {...} clause from each table definition in schema.cql. Dropping the clause lets each table fall back to the engine's default compaction strategy:

On Cassandra 5.x, this will default to UnifiedCompactionStrategy (UCS).
On earlier Cassandra versions, this will default to SizeTieredCompactionStrategy (STCS), so backward compatibility is preserved.

This avoids hardcoding a compaction strategy choice in the schema and lets each Cassandra version apply its own sensible default.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read /cassandra/temporal/schema.cql and locate the table definitions containing WITH COMPACTION clauses. Remove those explicit clauses from each table, then verify that schema.cql no longer hardcodes LCS while preserving the existing table definitions and version-compatible defaults.

Written by the indexing model from the issue text.

Assessment

Domain
databases, distributed-systems
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
87/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.