adamsaghy commented on code in PR #3200:
URL: https://github.com/apache/fineract/pull/3200#discussion_r1204026361
##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java:
##########
@@ -69,18 +66,11 @@ public RepeatStatus execute(@NotNull StepContribution
contribution, @NotNull Chu
List<LoanAccountLock> accountLocks = new ArrayList<>();
loanIdPartitions.forEach(loanIdPartition ->
accountLocks.addAll(loanLockingService.findAllByLoanIdIn(loanIdPartition)));
- Map<Long, LoanAccountLock> alreadySoftLockedAccountsMap =
accountLocks.stream()
- .filter(e ->
LockOwner.LOAN_COB_PARTITIONING.equals(e.getLockOwner()))
- .collect(Collectors.toMap(LoanAccountLock::getLoanId,
Function.identity()));
-
List<Long> alreadyLockedByChunkProcessingAccountIds =
accountLocks.stream()
.filter(e ->
LockOwner.LOAN_COB_CHUNK_PROCESSING.equals(e.getLockOwner())).map(LoanAccountLock::getLoanId).toList();
- List<Long> toBeProcessedLoanIds = new
ArrayList<>(alreadySoftLockedAccountsMap.keySet());
-
- loanLockingService.upgradeLock(toBeProcessedLoanIds,
LockOwner.LOAN_COB_CHUNK_PROCESSING);
Review Comment:
we should not remove applying hard lock on the loans!
--
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]