Files
scylladb/audit/CMakeLists.txt
Andrzej Jackowski 97fb2f01ff audit: add preprocessed rule matching cache
Running fnmatch on every audit event would hurt hot-path
latency.

Precompute per-role and per-table bitsets and intersect
them at query time. Rebuild from snapshots with a
generation counter to avoid partial state after yielding.
Unknown roles/tables fall back to linear fnmatch until
metadata notifications populate the cache.

Refs SCYLLADB-1430
2026-05-20 06:55:15 +02:00

26 lines
610 B
CMake

include(add_whole_archive)
add_library(scylla_audit STATIC)
target_sources(scylla_audit
PRIVATE
audit.cc
audit_cf_storage_helper.cc
audit_composite_storage_helper.cc
audit_rule.cc
audit_syslog_storage_helper.cc
preprocessed_audit_rules.cc)
target_include_directories(scylla_audit
PUBLIC
${CMAKE_SOURCE_DIR})
target_link_libraries(scylla_audit
PUBLIC
Seastar::seastar
xxHash::xxhash
PRIVATE
cql3)
if (Scylla_USE_PRECOMPILED_HEADER_USE)
target_precompile_headers(scylla_audit REUSE_FROM scylla-precompiled-header)
endif()
add_whole_archive(audit scylla_audit)