marta-jankovics commented on code in PR #3589:
URL: https://github.com/apache/fineract/pull/3589#discussion_r1398823591


##########
fineract-core/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java:
##########
@@ -103,32 +102,30 @@ public CommandProcessingResult executeCommand(final 
CommandWrapper wrapper, fina
         }
         exceptionWhenTheRequestAlreadyProcessed(wrapper, idempotencyKey, 
isRetry);
 
-        boolean sameTransaction = 
BatchRequestContextHolder.getEnclosingTransaction().isPresent();
         if (commandSource == null) {
             AppUser user = context.authenticatedUser(wrapper);
-            commandSource = sameTransaction ? 
commandSourceService.saveInitialSameTransaction(wrapper, command, user, 
idempotencyKey)
-                    : commandSourceService.saveInitialNewTransaction(wrapper, 
command, user, idempotencyKey);
-            storeCommandIdInContext(commandSource); // Store command id as a 
request attribute
+            commandSource = 
commandSourceService.getInitialCommandSource(wrapper, command, user, 
idempotencyKey);

Review Comment:
   action_name, entity_name, idempotency_key is a compound unique key, cannot 
be saved twice. That is true that the idempotency_key is not unique, as I 
thought, it is.



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