FINERACT-2684: Transaction-bound cache clearing and load global configs once per transaction - #6493
Open
alberto-art3ch wants to merge 1 commit into
Open
alberto-art3ch wants to merge 1 commit into
alberto-art3ch wants to merge 1 commit into
Conversation
alberto-art3ch
marked this pull request as ready for review
September 23, 2026 03:07
…gs once per transaction
alberto-art3ch
force-pushed
the
FINERACT-2684/config-cache-round-trips
branch
from
September 23, 2026 04:32
609f50d to
dfcb6ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Global configuration lookups (
c_configurationby name) run on almost every request: ~17 single-row queries perwrite request under load, the most executed statement of the platform. The
@Cacheable("configByName")neverhits because the default
TransactionBoundCacheManagerclears a shared Ehcache instance on every transaction ofevery thread, and it keeps doing so even after switching to SINGLE_NODE via
PUT /caches.Changes, keeping the guarantee that every transaction starts from the database:
ThreadLocalCacheStore) and cleared only by thatthread's transaction boundaries and at request start; no cross-thread clearing or locking.
RuntimeDelegatingCacheManagerforwards transaction hooks only to the active manager, so SINGLE_NODE is nolonger wiped by the transaction-bound one.
GlobalConfigurationRepositoryWrapperloads the whole table (76 rows) once per transaction with a read-onlyquery and evicts it on writes; the single mutating caller uses a dedicated for-update lookup.
Measured (k6, PostgreSQL 18, 36k loans): configuration statements per write request 16.7 -> 5.8 (one 76-row round
trip per transaction instead of one per property), write p95 27 -> 28 ms, read mix p95 86-105 -> 90 ms. No
client-visible behaviour change. New unit tests cover hook forwarding and once-per-transaction loading.
FINERACT-2684
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.