openvibers/openvibe.live Commits

Recorder: drop the Media VOD shell when ingest fails to start

OP OpenVibers committed 29 Aug 2026 · 7f66753a45 · 1 file, +5 −1

_createVod makes the VOD row in Media before ingest begins; when ingest then fails
(e.g. Media answering "Disk critically low — recording refused") the catch only
logged and forgot the row. Each refusal left a file-less ghost VOD behind — 349 of
them on production — which surfaced as 0:00 entries and clogged Media's offload
sweep, the very thing that has to run to free the disk. Route the failure through
_abort(), which already deletes the shell for the cancel path.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017AyeSFu7qdLdR64Zv99QNm

Changes

ddiff --git a/server/streaming/recorder.js b/server/streaming/recorder.js
iindex 2aa5faeb..f7964a3a 100644
---- a/server/streaming/recorder.js
++++ b/server/streaming/recorder.js
@@@ -90,7 +90,11 @@ class StreamRecorder {
run.catch((err) => {
console.error(`[VOD] Recording start failed for stream ${streamId} (${protocol}):`, err.message);
-- this.activeRecordings.delete(streamId);
++ // _createVod may already have made the VOD row in Media before ingest failed
++ // (e.g. "Disk critically low — recording refused"). Leaving it behind creates a
++ // ghost with no file that shows up as a 0:00 VOD and — worse — clogs Media's
++ // offload sweep, which is exactly what needs to run when the disk is full.
++ this._abort(streamId, rec).catch(() => {});
});
}