Review main Merged

60531[BUGFIX] Close file resource in FileLockStrategy if acquire failed

Markus Klein CR +2 V +2 Easy +4 −0 updated 04/26/19, 08:15

Commit message

When acquiring a lock via the FileLockStrategy it is very important
to close the underlying file handle again, if the acquire action failed.

The same instance of the FileLockStrategy might be reused later
(e.g. in TSFE) again, whereas the (still open) file could have been
deleted meanwhile. The file handle would be invalid and another try
to open the same file again - with fopen() - may fail.
The behaviour of PHP's fopen() is different depending on the actual
file storage. Currently things fail on host-mounted drives in
containers in Docker for Windows.

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
    • Georg Ringer +1
    • Oliver Klee +1
    • Johannes Kasberger +1
  • Verified V +2 Done
    • Susi Moog +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1114

  1. Markus Klein uploaded patch set 1 04/24/19, 16:49

  2. Markus Klein updated the commit message in patch set 2 04/24/19, 16:58

  3. TYPO3com voted on patch set 1 V -1 04/24/19, 17:01 Completed build in 11m 29s on Wed, 24 Apr, 07:01 PM Test Summary: 2 of 47877 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33383

  4. TYPO3com voted on patch set 2 V +1 04/24/19, 17:11 Completed build in 13m 15s on Wed, 24 Apr, 07:11 PM Test Summary: 47484 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33384

  5. Daniel Goerz voted on patch set 2 CR +1 04/24/19, 17:14

  6. Johannes Kasberger voted on patch set 2 CR +1 04/24/19, 18:08

  7. Markus Klein updated the commit message in patch set 3 04/24/19, 19:03

  8. TYPO3com voted on patch set 3 V +1 04/24/19, 19:17 Completed build in 13m 58s on Wed, 24 Apr, 09:17 PM Test Summary: 47484 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33390

  9. Georg Ringer voted on patch set 3 V +1 CR +1 04/25/19, 03:45

  10. Oliver Klee voted on patch set 3 CR +1 04/25/19, 08:54

  11. Daniel Goerz voted on patch set 3 CR +1 04/25/19, 08:58

  12. Johannes Kasberger voted on patch set 3 CR +1 04/25/19, 11:54

  13. Susi Moog voted on patch set 3 V +2 CR +2 04/26/19, 08:14

  14. Susi Moog merged patch set 4 04/26/19, 08:15