v0.4.20: close reindex publish race + harden preload guard
Some checks failed
build / build (push) Has been cancelled

Reviewer-flagged: the existing-cache reindex branch in VideoCache.download
only ran one epoch check before READY.put, so a /videoCache clear landing
between the check and the put could leave a stale entry pointing at a
now-deleted file. Same pattern as the post-move fix in v0.4.19, applied
to the reindex path: pre-check, put, post-check + rollback on mismatch.

Also: preload() previously gated on READY.containsKey(url), which silently
blocks a re-preload if READY holds a stale key whose backing file is gone
(e.g. user deleted the file manually, or the cleanup half of a clear race).
Switched to lookup(url) — same intent, but lookup verifies the file
actually exists on disk, so stale keys self-heal on the next preload.
This commit is contained in:
tkrmagid
2026-05-16 22:54:20 +09:00
parent d11289309b
commit 1913181d02
2 changed files with 20 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.configuration-cache=false
# Mod
mod_id=video_player
mod_version=0.4.19
mod_version=0.4.20
maven_group=com.ejclaw.videoplayer
archives_base_name=video_player