Snacks v2.2.1
Automated Video Library Encoder
Patch release fixing cluster job lifecycle issues around master restarts, job cancellation, and orphaned work items.
Bug Fixes
Queue Resume on Master Restart
- Immediate local queue restore -- pending and in-progress local items are now restored to the in-memory queue immediately on startup, without waiting for cluster recovery to finish probing remote nodes. Previously the entire queue was invisible for up to 5 minutes while recovery ran.
- Remote orphan safety net -- after cluster recovery completes, any remote-assigned items that recovery missed are cleaned up and re-queued automatically.
Job Cancellation in Cluster Mode
- DB assignment cleanup on cancel/stop -- cancelling or stopping a remote job now clears the
AssignedNodeIdin the database (viaClearRemoteAssignmentAsync). Previously only the in-memory state was cleared, leaving a stale assignment in the DB that caused the heartbeat reconciliation to protect cancelled jobs instead of cleaning them up. - Orphaned Processing item catch-all -- cancel and stop now handle Processing items that have no remote node assignment and are not actively encoding locally. These "orphan" items could occur after a dual-master conflict or interrupted dispatch and were previously impossible to cancel from the UI.
- Cancel during upload/download no longer retries -- the chunked file transfer retry loops treated
OperationCanceledExceptionas a transient network error, retrying up to 60 times before giving up. Cancellations now propagate immediately and the upload or download stops without re-queuing the job.
Dispatch During Recovery
- Dispatch no longer blocked by recovery -- the master dispatch loop previously waited for cluster recovery to fully complete before assigning any new work to nodes. New dispatches now run independently, relying on heartbeat status and existing availability checks to avoid conflicts with recovering jobs.
Files Changed
Modified Files
Snacks/Services/AutoScanService.cs-- splitResumeQueueFromDatabaseAsyncintoResumeLocalQueueItemsAsync(immediate) andResumeRemoteQueueItemsAsync(post-recovery)Snacks/Services/TranscodingService.cs-- cancel/stop useClearRemoteAssignmentAsyncfor remote jobs; added orphan catch-all branches inCancelWorkItemAsyncandStopWorkItemAsyncSnacks/Services/ClusterService.cs-- removed_recoveryCompletegate fromRunDispatchAsync; addedOperationCanceledExceptionhandler inDispatchToNodeAsyncto distinguish user cancellation from upload failureSnacks/Services/ClusterFileTransferService.cs-- upload and download retry loops now rethrowOperationCanceledExceptioninstead of retrying
Full documentation: README.md