[BugFix] Explicitly release file locks during stage worker init (#703)

Signed-off-by: yuanheng <jonathan.zhaoyh@gmail.com>
This commit is contained in:
Yuanheng Zhao authored and GitHub committed 2026-01-08 20:35:00 +08:00
1 parent bb13467adc
commit 4c72b67444
1 file changed
+2
+2
View File
@@ -601,6 +601,7 @@ def _stage_worker(
# or when process dies
for lock_fd in lock_files:
try:
fcntl.flock(lock_fd, fcntl.LOCK_UN)
_os.close(lock_fd)
logger.debug("Released initialization lock (fd=%s)", lock_fd)
except (OSError, ValueError):
@@ -1104,6 +1105,7 @@ async def _stage_worker_async(
# or when process dies
for lock_fd in lock_files:
try:
fcntl.flock(lock_fd, fcntl.LOCK_UN)
_os.close(lock_fd)
logger.debug("Released initialization lock (fd=%s)", lock_fd)
except (OSError, ValueError):