79377056

Date: 2025-01-22 09:02:58
Score: 1.5
Natty:
Report link

I have separated the subUser process into two parts:

  1. Fetching and processing the subUser data.
  2. Saving the subUser data.

For the first part, I am using a multi-threaded environment with a new transaction. This transaction is only used for fetching the data, so a rollback is not required.

In the second part, the process is completed within the original user process method. This ensures that if any error occurs, the transaction for both the subUser and the parent user is rolled back entirely.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Anant Doshi