Files
Piwigo/include
Pierrick Le GallandClaude Opus 5.5 1004fcb109 issue #2600 pwg.images.uploadAsync: merge under a pwg_unique_exec token
The flock() was taken on the merged file itself. Its lock was released
before the chunks were deleted and before add_uploaded_file() renamed the
file: a request which got the lock just after could truncate the merged
file while it was being moved, or delete it.

The merge now runs under a pwg_unique_exec token per series, kept until
the end of the request (released by a shutdown function, which also runs
after a fatal error such as max_execution_time exceeded). The series is
checked again once the token is obtained, so a request arriving after a
completed merge gives up without touching anything. The token lives in the
database: it also works with several web servers sharing the buffer
directory. Tokens left by a killed request are removed by the housekeeping.

Related to #2583

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vty6FTwtZ3ezEncagFo2FQ
2026-11-03 14:56:17 +01:00
..
2025-02-18 10:24:33 +01:00
2025-12-01 14:35:43 +01:00
2024-03-27 15:00:21 +01:00
2026-11-02 17:25:02 +01:00
2026-11-02 17:25:02 +01:00
…
2026-05-14 14:50:38 +02:00