Adam Saghy created FINERACT-2396:
------------------------------------

             Summary: CommandSource save fails and retry attemptNumber not reset
                 Key: FINERACT-2396
                 URL: https://issues.apache.org/jira/browse/FINERACT-2396
             Project: Apache Fineract
          Issue Type: Bug
    Affects Versions: 1.13.0
            Reporter: Adam Saghy
            Assignee: Adam Saghy
             Fix For: 1.13.1


Following the recent update to persist commands only upon successful execution 
and not save them in the m_portfolio_command_source table (FINERACT-2304: Avoid 
retrying after the command succeeds), a bug was introduced where attemptNumber 
is stored in memory. This causes subsequent attempts on the same instance to 
fail, requiring a restart of the instances.

long 
attemptNumber=persistenceRetry.getMetrics().getNumberOfFailedCallsWithRetryAttempt()
 + 1;
 
{code:java}
2025-10-20 
05:30:36,787|ERROR|http-nio-8080-exec-10|e72343905beab|o.a.f.c.s.SynchronousCommandProcessingService|Failed
 to persist command result after multiple retries for command ID null 
org.springframework.dao.InvalidDataAccessApiUsageException: The given id must 
not be null at 
org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:371)
 at 
org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:126)
 at 
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:560)
 Show all 267 lines 2025-10-20 
05:30:36,786|INFO|http-nio-8080-exec-10|e72343905beab|o.a.f.c.s.SynchronousCommandProcessingService|Retrying
 command result save - attempt 19540 for command ID null 2025-10-20 
05:30:34,785|INFO|http-nio-8080-exec-10|e72343905beab|o.a.f.c.s.SynchronousCommandProcessingService|Retrying
 command result save - attempt 19540 for command ID null 2025-10-20 
05:30:33,785|INFO|http-nio-8080-exec-10|e72343905beab|o.a.f.c.s.SynchronousCommandProcessingService|Retrying
 command result save - attempt 19540 for command ID null{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to