From 3c3f216bcb4e95588c4c9c487ded31a8798b04d9 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Tue, 10 Mar 2026 17:54:49 -0700 Subject: [PATCH] fix: log when background snapshot cache upload is skipped due to lock contention Amp-Thread-ID: https://ampcode.com/threads/T-019cda52-ee36-738c-86cd-1fd410c47d7f Co-authored-by: Amp --- internal/strategy/git/snapshot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/strategy/git/snapshot.go b/internal/strategy/git/snapshot.go index eb687f7..76ff559 100644 --- a/internal/strategy/git/snapshot.go +++ b/internal/strategy/git/snapshot.go @@ -343,6 +343,8 @@ func (s *Strategy) writeSnapshotSpool(w http.ResponseWriter, r *http.Request, re go func() { mu := s.snapshotMutexFor(upstreamURL) if !mu.TryLock() { + logger.InfoContext(ctx, "Skipping background cache upload, snapshot generation already in progress", + slog.String("upstream", upstreamURL)) return } mu.Unlock()