audit: disable caching for the audit log table

The audit table had caching enabled by default, which provides no
value since audit data is write-heavy and rarely read back through
the cache. This wastes cache space that could be used for more
important user data.

Disable caching by setting keys and rows_per_partition to NONE and
enabled to false, consistent with get_disabled_caching_options()
and other system tables such as system.batchlog,
system.large_partitions, and CDC log tables.

Closes scylladb/scylladb#29506
This commit is contained in:
Piotr Smaron
2026-04-16 10:48:03 +02:00
committed by Marcin Maliszkiewicz
parent 37fc1507f0
commit 686029f52c

View File

@@ -38,7 +38,8 @@ audit_cf_storage_helper::audit_cf_storage_helper(cql3::query_processor& qp, serv
"source inet, "
"username text, "
"error boolean, "
"PRIMARY KEY ((date, node), event_time))",
"PRIMARY KEY ((date, node), event_time))"
" WITH caching = {{'keys': 'NONE', 'rows_per_partition': 'NONE', 'enabled': 'false'}}",
KEYSPACE_NAME, TABLE_NAME),
fmt::format("INSERT INTO {}.{} ("
"date,"