[ 
https://issues.apache.org/jira/browse/FINERACT-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Saghy reassigned FINERACT-2845:
------------------------------------

    Assignee: Adam Saghy

> 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
>    Affects Versions: 1.15.0
>            Reporter: Jose Alberto Hernandez
>            Assignee: Adam Saghy
>            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)

Reply via email to