Page MenuHomePhabricator

remotefilelog: keep metacache per thread
ClosedPublic

Authored by wlis on Nov 25 2017, 11:44 AM.

Details

Reviewers
ikostia
Group Reviewers
Restricted Project
Commits
rFBHGXbcd530ca9c22: remotefilelog: keep metacache per thread
Summary

This fixes the race condition in remotefilelog surfaced by
https://phab.mercurial-scm.org/D1458. The issue was that the remotefilelog
contentstore had 1 object for caching metadata of a file which could be
ovewriten by other threads, resulting in trying to
deserialize a textfile as lfs.

This adds per thread cachefor metadata

Test Plan

on CentOS ran rt in fb-hgext and all were sucessful

on Windows ran 500 iterations of sparse --enable-profile / --disable-profile with 43k files
profile without hitting any issues. This was >30 hours of continuous excercise
for this code.

Diff Detail

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

Event Timeline

wlis created this revision.Nov 25 2017, 11:44 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 25 2017, 11:44 AM
ikostia accepted this revision.Nov 26 2017, 3:02 AM
This revision is now accepted and ready to land.Nov 26 2017, 3:02 AM
This revision was automatically updated to reflect the committed changes.