lab5: исправления по ревью
Concurrent complete no longer deletes the shared verified source; admission is atomic and covers pending presign rows; relay reconciles queued jobs lost to dead-lettering; failed staging is protected until failed_retention; timestamps normalized to UTC; reprocess prefers the durable original and keeps job->attachment lock order; heartbeat errors no longer burn attempts; confirm timeout enforced; pinned images and sanitized health responses.
This commit is contained in:
@@ -225,7 +225,14 @@ func (w *Worker) process(
|
||||
return
|
||||
case <-ticker.C:
|
||||
ok, err := w.repo.Heartbeat(jobCtx, job.ID, job.Attempt, w.config.Owner, w.config.LeaseTTL)
|
||||
if err != nil || !ok {
|
||||
if err != nil {
|
||||
// A DB blip is not proof that the lease is gone. Keep trying;
|
||||
// the fencing CAS still prevents a stale commit.
|
||||
w.log.WarnContext(jobCtx, "heartbeat failed", slog.Any("error", err))
|
||||
|
||||
continue
|
||||
}
|
||||
if !ok {
|
||||
leaseLost = true
|
||||
cancel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user