]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Add native UUID v7 per task with Lua binding
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 14 Feb 2026 15:35:51 +0000 (15:35 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 14 Feb 2026 15:35:51 +0000 (15:35 +0000)
commit700a21ef7b68066f6d38f36f3ea4226563c3ca1d
tree87ad04875c6fd929c833b0a97b2babed6ff86629
parent3694f9f3f15d18a8abe7fa528ac344d3df5c3453
[Feature] Add native UUID v7 per task with Lua binding

Generate a UUID v7 (time-ordered, RFC 9562) natively in C at task
creation time. The task's log UID is derived from the UUID's random
portion so that UID and UUID are always correlated.

- rspamd_uuid_v7() in util.c: 48-bit ms timestamp + crypto-random bits
- task_uuid[37] field in rspamd_task, populated in rspamd_task_new()
- task:get_uuid() Lua method for plugin access
src/libserver/task.c
src/libserver/task.h
src/libutil/util.c
src/libutil/util.h
src/lua/lua_task.c