This is an archive of the discontinued Mercurial Phabricator instance.

repack: fix incremental repack for large quantities of packs
ClosedPublic

Authored by durham on Aug 23 2017, 6:19 PM.
Tags
None
Subscribers

Details

Summary

Previously incremental repack would only take the top 3 packs in a generation of
packs. For instance, if there were 100 packs between 1KB and 1MB, it would only
repack the first 3, instead of repacking a whole bunch because it's cheap. This
patch fixes it to grab as many packs in a generation as it can fit under the
limit (default of 100MB of pack data).

This will fix an issue where we're seeing users with 100's of tiny pack files
that aren't getting repacked fast enough.

Test Plan

Added a test

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

durham created this revision.Aug 23 2017, 6:19 PM
quark accepted this revision.Aug 24 2017, 12:27 AM
quark added a subscriber: quark.

Great feature!

remotefilelog/repack.py
183

Maybe we can codemod all config to use the new configitem framework someday.

This revision is now accepted and ready to land.Aug 24 2017, 12:27 AM
This revision was automatically updated to reflect the committed changes.