sidshas03 opened a new pull request, #5357:
URL: https://github.com/apache/fineract/pull/5357

   ## Description
   
   This PR fixes the duplicate interest posting issue reported in 
**FINERACT-1659**, where the **Post Interest** job could post interest multiple 
times for the same savings account within the same posting period.
   
   ### What changed
   - Added a safeguard in `SavingsSchedularInterestPoster` to **skip accounts 
where interest has already been posted for the current period**, by comparing 
`interestPostedTillDate` with the current business date.
   - Updated the transaction isolation level to **`SERIALIZABLE`** to prevent 
duplicate postings caused by race conditions during parallel scheduler runs.
   
   ### Tests
   Added two integration tests to validate the behavior:
   - `testPostInterestPreventsDuplicateOnSameDay`  
     Ensures running the job twice on the same day results in **only one** 
interest posting.
   - `testPostInterestSkipsCurrentPeriodButAllowsNewPeriod`  
     Ensures the job **skips** reposting within the current period, while still 
allowing postings in a new period.
   
   ### Expected outcome
   - Running the Post Interest job multiple times within the same posting 
period **will not create duplicate transactions**, and the savings account 
balance remains unchanged after subsequent runs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to