]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
Patch FIXME: Fix concurrency in local cache
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Tue, 14 Nov 2023 00:17:38 +0000 (18:17 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Tue, 14 Nov 2023 21:40:59 +0000 (15:40 -0600)
commit374c9c9f9476f163abdb86e9c588e71c4d8fb49c
tree2db23642d92ce4adccb609fc7b0db3ee8fe1eb26
parent9048c96f67b993867e7624c2be46883f4eab4d4e
Patch FIXME: Fix concurrency in local cache

Tried to protect access via mutex, but oh boy. That escalated quickly.

Instead, restore tree workspace isolation. Since the 1-thread-per-TAL
architecture has survived, this allows the validation to merrily read
and write the local cache without any locking.

Each thread now builds its own resource table. The main thread joins
them.

This basically zeroizes resource sharing between validation threads.
Great from an engineering perspective, maybe not so much from the
performance angle.
28 files changed:
src/alloc.c
src/alloc.h
src/cache/local_cache.c
src/cache/local_cache.h
src/cache/tmp.c
src/cache/tmp.h
src/data_structure/path_builder.c
src/data_structure/path_builder.h
src/main.c
src/object/certificate.c
src/object/manifest.c
src/object/tal.c
src/object/tal.h
src/rrdp.c
src/rtr/db/db_table.c
src/rtr/db/db_table.h
src/rtr/db/vrps.c
src/state.c
src/state.h
src/thread_var.c
src/types/uri.c
src/types/uri.h
test/cache/local_cache_test.c
test/rtr/db/rtr_db_mock.c
test/rtr/db/vrps_test.c
test/rtr/pdu_handler_test.c
test/tal_test.c
test/types/uri_test.c