Page MenuHomePhabricator

incremental-repack: do not repack largest 2 files if nothing else to do

Authored by singhsrb on Dec 5 2017, 4:19 PM.



The incremental repacking currently repacks the 2 biggest files if it
doesn't find anything else to do. This was perhaps done to converge to a single
pack file as soon as possible. However, the 2 biggest files can be huge and
this leads to a large repack. Moreover, the resulting pack file after this
repacking is then considered for a subsequent incremental repacking which is
fairly huge as well. Therefore, with the current setup, we can potentially end
up doing 2 big incremental repacks. After this change, we will have just one
incremental repack which is almost equally costly to get to the same state.

Test Plan

Ran all the tests.

Diff Detail

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

Event Timeline

singhsrb created this revision.Dec 5 2017, 4:19 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 5 2017, 4:19 PM

Note that this will work particularly well with D1588 because we will move towards the max pack file size limit introduced there in bigger steps.

durham accepted this revision.Dec 5 2017, 4:31 PM
This revision is now accepted and ready to land.Dec 5 2017, 4:31 PM
This revision was automatically updated to reflect the committed changes.