Closed emmkong closed 7 years ago
Yes, you are right. This was coming from an older version that handled this a bit differently... Do you want to create a PR?
@adrai Thanks for your reply. Yes, I will submit a PR after my local end to end testing. Do you agree with my suggestion or you have any better solution for this problem?
your suggestion is perfect
Hi @adrai
I testing the aggregate lock in our end to end integration tests and found that (maybe I'm using it wrongly) it not able to prevent concurrency happening in a multiple processes environment. (example AWS Lambda) perfectly.
Scenario:
I found the following line of code cause this scenario:
cqrs-domain/lib/defaultCommandHandler.js ln 663
I suggest we could tighten up the condition like following:
and we should also allow a bigger retryOnConcurrencyTimeout value so that the retry not coming back at the same time again. Any thought?