adamsaghy commented on code in PR #5120:
URL: https://github.com/apache/fineract/pull/5120#discussion_r2480647759


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java:
##########
@@ -166,22 +166,6 @@ private void postInterest(List<SavingsAccountData> 
savingsAccounts, int threadPo
 
         List<Future<Void>> responses = new ArrayList<>();
         posters.forEach(poster -> responses.add(taskExecutor.submit(poster)));
-        Long maxId = maxSavingsIdInList;
-        if (!queue.isEmpty()) {
-            maxId = Math.max(maxSavingsIdInList, 
queue.element().get(queue.element().size() - 1).getId());
-        }
-
-        while (queue.size() <= QUEUE_SIZE) {
-            log.debug("Fetching while threads are running!..:: this is not 
supposed to run........");
-            savingsAccounts = 
Collections.synchronizedList(this.savingAccountReadPlatformService
-                    
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, 
ACTIVE.getValue(), maxId));
-            if (savingsAccounts.isEmpty()) {
-                break;
-            }
-            maxId = savingsAccounts.get(savingsAccounts.size() - 1).getId();
-            log.debug("Add to the Queue");
-            queue.add(savingsAccounts);
-        }

Review Comment:
   I wonder if removing this piece of code cause no issues, why it was there in 
the first place? How confident we are to not cause any issues by removing it? 
Have you had the chance to do thorough testing of multiple situations, even 
under high load?



-- 
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