This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: warn if we are writing to cache without a lock
ClosedPublic

Authored by pulkit on Sep 8 2020, 10:12 AM.

Details

Summary

From quite sometime we have two types of cache, cache and wcache. The later
one is a working copy cache and the first one is a store cache.

Let's add a check for warning if we are missing store lock while writing to
these caches.

This is inspired from some tag cache breakage which is observed when multiple
shares are in play.

The interesting part is that although we are still taking wlock to write store
caches at many places, but still the test pases.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 8 2020, 10:12 AM
pulkit planned changes to this revision.Sep 10 2020, 7:09 AM
This revision was not accepted when it landed; it landed in state Changes Planned.
This revision was automatically updated to reflect the committed changes.

The interesting part is that although we are still taking wlock to write store
caches at many places, but still the test pases.

Why is that?