[
https://issues.apache.org/jira/browse/FINERACT-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117588#comment-18117588
]
Jose Alberto Hernandez commented on FINERACT-2845:
--------------------------------------------------
Fineract PR for this https://github.com/apache/fineract/pull/6485
> Auditing handler rebuilds its mapping metadata on every command
> ---------------------------------------------------------------
>
> Key: FINERACT-2845
> URL: https://issues.apache.org/jira/browse/FINERACT-2845
> Project: Apache Fineract
> Issue Type: Improvement
> Components: fineract-backoffice
> Affects Versions: 1.15.0
> Reporter: Jose Alberto Hernandez
> Priority: Major
> Labels: auditing,, bug, performance,, regression,, spring-boot-4,
>
> ```
> h2. Background
> {\{JpaAuditingHandlerRegistrar}} registers the \{{jpaAuditingHandler}} bean
> with \{{setScope("prototype")}}. The
> prototype scope was introduced in 2022 to fix a race condition:
> \{{CustomAuditingHandler.markCreated}} and
> {\{markModified}} call \{{setDateTimeProvider(...)}} on the handler before
> delegating to the parent, so a shared
> instance could have one thread overwrite another thread's provider.
> Since the upgrade to Spring Boot 4.1 (Spring Data Commons 4.1.0) that scope
> has become very expensive. The
> {\{MappingAuditableBeanWrapperFactory(PersistentEntities)}} constructor now
> eagerly iterates every persistent entity
> to build the auditing metadata.
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)