]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Route all hyperscan cache operations through Lua backend
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 14 Jan 2026 14:29:32 +0000 (14:29 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 14 Jan 2026 14:29:32 +0000 (14:29 +0000)
commitc8e7b9ca07b598c1928e688ae5901f4d52370583
treecbcccf469c5dd72accdd83cb24eb9f5e19a519de
parent73a37be6398fd1a898273332cc3f5f3012506bc3
[Feature] Route all hyperscan cache operations through Lua backend

- Route file backend through Lua for consistency with redis/http
- Add zstd compression support with magic byte detection for backward
  compatibility (reads both .hs and .hs.zst files)
- Fix rspamd_util.stat() return value handling (returns err, stat tuple)
- Fix timer management for synchronous Lua callbacks to prevent early
  termination of re_cache compilation
- Fix use-after-free in load path by pre-counting pending items
- Add priority queue for re_cache compilation (short lists first)
- Add ev_run() flush before blocking hyperscan compilations to ensure
  busy notifications are sent
- Add hyperscan_notice_known() and hyperscan_get_platform_id() Lua APIs
lualib/lua_hs_cache.lua
src/hs_helper.c
src/libserver/hs_cache_backend.c
src/libserver/maps/map_helpers.c
src/libserver/re_cache.c
src/libserver/worker_util.c
src/libutil/multipattern.c
src/lua/lua_util.c