Botond Dénes c776550b58 Merge 'Add basic support for snapshot ttl to auto_snapshot and api' from Benny Halevy
The snapshot TTL is applied to the snapshot manifest.json as the `expires_at` attribute.
It will be used in the future by an external service like scylla-manager or siren to manage the snapshot life cycle.

In Scylla, it is used just to garbage collect orphaned snapshots that were not backed up and cleaned up in time.
A garbage collector thread was added to snapshot_ctl that cleans up the snapshot when it expires.

The series adds 2 paths setting the snapshot ttl:
- db/config: add auto_snapshot_ttl
- api, nodetool: add snapshot ttl option

The new functionality in Scylla is comparable to the corresponding features in Cassandra (comparison based on https://github.com/scylladb/scylladb/issues/13409):

1) Cassandra added in release 4.1 the auto_snapshot_ttl option which is described in [cassandra.apache.org/doc/latest/cassandra/configuration/cass_yaml_file.html#auto_snapshot_ttl](https://cassandra.apache.org/doc/latest/cassandra/configuration/cass_yaml_file.html#auto_snapshot_ttl)  as:
> Adds a time-to-live (TTL) to auto snapshots generated by table truncation or drop (when enabled). After the TTL is elapsed, the snapshot is automatically cleared.

The behavior is now the same in Scylla

> By default, auto snapshots do not have TTL

In scylla, existing clusters will have no auto_snapshot_ttl, however new clusters installed with the updated scylla.conf will have a default auto_snapshot_ttl of 10 days (864000 seconds)

> Accepted units: d (days), h (hours) or m (minutes)

The configuration option is always in seconds, no support for unit suffix.
TTL values passed to the api directly or via and nodetool can be optionally followed by 's' for seconds (the default), 'm' for minutes, 'h' for hours, or 'd' for days.

> [issues.apache.org/jira/browse/CASSANDRA-16789](https://issues.apache.org/jira/browse/CASSANDRA-16789), commit ad24942481 - add a thread that every minute checks to see if there are TTLed snapshots to be deleted, and also add support in nodetool.

In scylla, the background thread wakes up if there are scheduled expirations.
Clearing of expired snapshots on restart is not implemented yet.

> This is for automatically-created snapshots. Additionally, Cassandra added the ability to set a ttl on manually created snapshots by the nodetool snapshot command - by adding a --ttl ...option to that command.

The equivalent functionality is to pass a --ttl option when taking a snapshot.
There is no support to set a TTL on an existing snapshot (nor there is a plan to do so).

> `nodetool listsnapshots` was also updated to list the snapshots' TTLs. See [issues.apache.org/jira/browse/CASSANDRA-16789](https://issues.apache.org/jira/browse/CASSANDRA-16789), commit ad24942481.

TODO, see https://scylladb.atlassian.net/browse/SCYLLADB-1078

Fixes SCYLLADB-190
Fixes SCYLLADB-191
Fixes SCYLLADB-787
Fixes SCYLLADB-789

* New feature, no backport required

Closes scylladb/scylladb#28759

* github.com:scylladb/scylladb:
  db: snapshot-ctl: add cancel_expiration
  api, nodetool: add snapshot ttl option
  test/cqlpy/test_virtual_tables: add verfication of snapshot directory
  test/cqlpy/test_virtual_tables: consistenly pass a set of expected tables to verify_snapshots
  db: snapshot_ctl: add deletion of expired snapshots
  database: apply auto_snapshot_ttl
  db/config: add auto_snapshot_ttl
  db/config: make auto_snapshot live-updateable
2026-06-03 17:04:12 +03:00
2026-04-08 12:19:54 +03:00
2026-04-12 19:46:33 +03:00
2026-06-02 12:46:07 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-05-20 13:47:12 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2025-09-30 13:16:49 +02:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00

Scylla

Slack Twitter

What is Scylla?

Scylla is the real-time big data database that is API-compatible with Apache Cassandra and Amazon DynamoDB. Scylla embraces a shared-nothing approach that increases throughput and storage capacity to realize order-of-magnitude performance improvements and reduce hardware costs.

For more information, please see the ScyllaDB web site.

Build Prerequisites

Scylla is fairly fussy about its build environment, requiring very recent versions of the C++23 compiler and of many libraries to build. The document HACKING.md includes detailed information on building and developing Scylla, but to get Scylla building quickly on (almost) any build machine, Scylla offers a frozen toolchain. This is a pre-configured Docker image which includes recent versions of all the required compilers, libraries and build tools. Using the frozen toolchain allows you to avoid changing anything in your build machine to meet Scylla's requirements - you just need to meet the frozen toolchain's prerequisites (mostly, Docker or Podman being available).

Building Scylla

Building Scylla with the frozen toolchain dbuild is as easy as:

$ git submodule update --init --force --recursive
$ ./tools/toolchain/dbuild ./configure.py
$ ./tools/toolchain/dbuild ninja build/release/scylla

For further information, please see:

Running Scylla

To start Scylla server, run:

$ ./tools/toolchain/dbuild ./build/release/scylla --workdir tmp --smp 1 --developer-mode 1

This will start a Scylla node with one CPU core allocated to it and data files stored in the tmp directory. The --developer-mode is needed to disable the various checks Scylla performs at startup to ensure the machine is configured for maximum performance (not relevant on development workstations). Please note that you need to run Scylla with dbuild if you built it with the frozen toolchain.

For more run options, run:

$ ./tools/toolchain/dbuild ./build/release/scylla --help

Testing

Build with the latest Seastar Check Reproducible Build clang-nightly

See test.py manual.

Scylla APIs and compatibility

By default, Scylla is compatible with Apache Cassandra and its API - CQL. There is also support for the API of Amazon DynamoDB™, which needs to be enabled and configured in order to be used. For more information on how to enable the DynamoDB™ API in Scylla, and the current compatibility of this feature as well as Scylla-specific extensions, see Alternator and Getting started with Alternator.

Documentation

Documentation can be found here. Seastar documentation can be found here. User documentation can be found here.

Training

Training material and online courses can be found at Scylla University. The courses are free, self-paced and include hands-on examples. They cover a variety of topics including Scylla data modeling, administration, architecture, basic NoSQL concepts, using drivers for application development, Scylla setup, failover, compactions, multi-datacenters and how Scylla integrates with third-party applications.

Contributing to Scylla

If you want to report a bug or submit a pull request or a patch, please read the contribution guidelines.

If you are a developer working on Scylla, please read the developer guidelines.

Contact

  • The community forum and Slack channel are for users to discuss configuration, management, and operations of ScyllaDB.
  • The developers mailing list is for developers and people interested in following the development of ScyllaDB to discuss technical topics.
Description
No description provided
Readme 502 MiB
Languages
C++ 72.1%
Python 26.7%
CMake 0.3%
GAP 0.3%
Shell 0.3%