BUGFIX: Adjust DoctrineEventStorage commit retry attempts#289
BUGFIX: Adjust DoctrineEventStorage commit retry attempts#289kdambekalns wants to merge 2 commits into
Conversation
|
Background: With #288 and #287, the eventstore table will be write-locked for other processes during commit. To reduce the amount of failed write attempts due to DeadlockExceptions from other processes, the retry attempts are increased. The backoff is reduced to 1.2 so that the maximum interval is only about twice as long as before. |
|
@kdambekalns probably, yes. #288 should not be merged without #287, so those should definitely be in a single PR. #289 is technically not necessary for those changes, but makes more sense when combined with those. I guess a single PR makes sense. 👍 |
|
The initial numbers were more or less random. And I'm wondering now: Is there any specific reason for the new numbers? Having written that.. I really don't know. And I assume the former backoff was too short for you and that's why you changed it!? |
|
@bwaidelich yeah, the former backoff was too short. However, the new numbers are also pretty random. We just put those in and they seemed to work so we stuck with them. I'm actually not even sure if we need that many retries anymore. I guess I'll have to take another look at this. After all, the commit is from early 2020 :) |
Huh? Did we miss it that long or was that in a private fork? |
|
@bwaidelich nah, we were stuck on an older release of the eventsourcing package for quite a while so never got around to update those patches. They were in a public fork: https://github.com/netlogix/Neos.EventSourcing/commits/release/sport/Classes |
|
I agree that 25 reattempts seems a bit much. Not sure that's really a necessity in the given case, never came across a scenario where a commit would fail so often and then succeed.
Sounds a bit counter-intuitive to me. I would expect more attempts in a tighter loop (together with the table locking) to increase the amount of failed write attempts? |
|
I adjusted the PR description to sound less counter-intuitive. Now I wonder, how should we proceed with this one? Before checking the code, does any of you know the current state of affairs? Do we still need this? |
With #288 the eventstore table will be write-locked for other processes during commit.
To reduce the amount of write failing due to DeadlockExceptions from other processes, the number of retry attempts is increased. The backoff is reduced to 1.2 so that the maximum interval is only about twice as long as before.