66139[BUGFIX] Ensure message send loop breaks in case of success
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Alexander Schnitzler +1
- Markus Gerdes +1
-
Verified V +2 Done
- Christian Kuhn +2
- Alexander Schnitzler +1
- TYPO3com +1 CI
Issues 1
Files 2
Review log 1823
-
Simon Gilli uploaded patch set 1 10/14/20, 09:58
-
Simon Gilli marked it work in progress 10/14/20, 09:59
-
TYPO3com voted on patch set 1 V -1 10/14/20, 10:10 Completed build in 11m 26s on Wed, 14 Oct, 10:10 AM Test Summary: 230 of 69613 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6524
-
TYPO3com commented on patch set 1 10/14/20, 11:10 Completed build in 24m 14s on Wed, 14 Oct, 11:10 AM Test Summary: 12 of 72358 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6525
-
TYPO3com commented on patch set 1 10/14/20, 13:33 Completed build in 16m 06s on Wed, 14 Oct, 01:33 PM Test Summary: 12 of 74207 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6540
-
Simon Gilli uploaded patch set 2 10/14/20, 13:40
-
TYPO3com voted on patch set 2 V +1 10/14/20, 13:57 Completed build in 16m 29s on Wed, 14 Oct, 01:57 PM Test Summary: 73722 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6542
-
Simon Gilli commented on patch set 2 10/14/20, 14:00
PS1 introduces the new tests and the last test of PS1 shows the 12 excepted failures. PS2 fixes the wrong code. -
Markus Gerdes commented on patch set 2 10/15/20, 08:18
FileSpool.php:91We should talk about the comment // We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism Imo this means: let no other process a chance to create the same file during concurrent execution. In the old version the timeslot is minimized because only fopen is called. The new version first evaluates the uniqueness and later creates the file, in between another thread might get the same filename as unique, because it was not created yet. I like the readability of the suggestion but would stick to the old loop adjusted with the break. After max retry with no unique name we could evaluate the reason an throw a better exception.FileSpool.php:94The check for file_exists does not take the filesuffix (.message) into account. -
Simon Gilli commented on patch set 2 CR -1 10/15/20, 08:36
FileSpool.php:91ReplyAckFileSpool.php:94ReplyAck -
Simon Gilli uploaded patch set 3 10/15/20, 08:53
-
Simon Gilli commented on patch set 3 10/15/20, 08:55
Should be working now as before.FileSpool.php:91ReplyDoneFileSpool.php:94ReplyDone -
TYPO3com voted on patch set 3 V +1 10/15/20, 09:05 Completed build in 12m 18s on Thu, 15 Oct, 09:05 AM Test Summary: 73722 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6548
-
Markus Gerdes commented on patch set 3 CR +1 10/15/20, 09:14
Thanks Simon -
Simon Gilli commented on patch set 3 10/15/20, 09:27
> Patch Set 3: Code-Review+1 > > Thanks Simon Thanks for discovering that, hard to find such errors afterwards ;) -
Christian Kuhn voted on patch set 3 V +1 CR +1 10/15/20, 10:43
-
Alexander Schnitzler commented on patch set 3 10/15/20, 12:36
FileSpool.php:96I hoped we could get rid of this silencing @ by first checking we have am existing, writable file. Yep, this approach saves some lines but to me it's again less readable than my initial approach and it mixes calculation of a unique file name and opening the file again. I am not voting it down but I wonder what's the reason for this conceptual change back to more mixed logic in the loop. -
Simon Gilli commented on patch set 3 10/15/20, 13:48
FileSpool.php:96ReplyWith PS2 I added your solution but problem here is it's not an atomic operation anymore which could lead to issues in the worst case. So I changed it again a little bit. See also previous comments. -
Alexander Schnitzler commented on patch set 3 10/15/20, 14:00
FileSpool.php:96ReplyAlright. Super unlikely to have two processes collide here but ok. I understand there is a higher risk having 4 cpu cycles in between the operation instead of just 1. But I wonder, if we have to worry about that in the first place, why not use an actual locking mechanism or decrease the probability of collisions further by choosing a much longer random string. Like 64 chars or 128? -
Alexander Schnitzler voted on patch set 3 V +1 CR +1 10/15/20, 14:00
-
Simon Gilli commented on patch set 3 10/15/20, 14:44
FileSpool.php:96Reply UnresolvedYes agree, it's almost impossible to have a conflict here but theoretically it's possible. I think using a locking mechanism is just a overhead here if we can solve it with directly opening the file instead. I guess this code is comming from the SwiftMailer and Fabien had a reason for sure doing it like this. But anyway lets go ahead for now and if we have still issues here discuss it again... -
Christian Kuhn voted on patch set 3 V +2 CR +2 10/15/20, 16:02
-
Christian Kuhn merged patch set 4 10/15/20, 16:02