diff options
Diffstat (limited to 'objectstore/packed')
| -rw-r--r-- | objectstore/packed/idx_lookup_candidates.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/objectstore/packed/idx_lookup_candidates.go b/objectstore/packed/idx_lookup_candidates.go index 23ac9a61..83055aac 100644 --- a/objectstore/packed/idx_lookup_candidates.go +++ b/objectstore/packed/idx_lookup_candidates.go @@ -124,8 +124,11 @@ func (store *Store) discoverCandidates() ([]packCandidate, error) { } // touchCandidate moves one candidate to the front of the lookup order. +// This is done on a best-effort basis. func (store *Store) touchCandidate(packName string) { - store.candidatesMu.Lock() + if !store.candidatesMu.TryLock() { + return + } defer store.candidatesMu.Unlock() node := store.candidateNodeByPack[packName] |
