From 686029f52c028d4bb6426cf87a1024108ed784c2 Mon Sep 17 00:00:00 2001 From: Piotr Smaron Date: Thu, 16 Apr 2026 10:48:03 +0200 Subject: [PATCH] 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 --- audit/audit_cf_storage_helper.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audit/audit_cf_storage_helper.cc b/audit/audit_cf_storage_helper.cc index 1b3e0f7718..835e2d2c1a 100644 --- a/audit/audit_cf_storage_helper.cc +++ b/audit/audit_cf_storage_helper.cc @@ -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,"