( )⚙ D1227 repack: always use all history packs for ancestry data

This is an archive of the discontinued Mercurial Phabricator instance.

repack: always use all history packs for ancestry data
ClosedPublic

Authored by phillco on Oct 25 2017, 4:49 PM.
Tags
None
Subscribers
None

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGX57e3e76b273a: repack: always use all history packs for ancestry data
Summary

When repacking data, we sort data nodes topologically by ancestry in order to
ensure the best (smallest) delta chain. Unfortunately the history we use to do
this will be whatever history packs the samre repack job chose for its history
repacking portion, which might be comically small and/or irrelevant.

To fix this, select all history packfiles, and pass them to the data packer as
fullhistory. Print a debug warning whenever any nodes are missing ancestry.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

phillco created this revision.Oct 25 2017, 4:49 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 25 2017, 4:49 PM
phillco planned changes to this revision.Oct 25 2017, 4:54 PM

Forgot to patch the full-repack entry point. Everything else can be reviewed, though.

phillco requested review of this revision.Oct 25 2017, 5:00 PM

Oh wait, I forgot we only need to do this in the case of an incremental repack.

phillco edited the summary of this revision. (Show Details)EditedOct 25 2017, 5:01 PM
This comment has been deleted.
tests/test-treemanifest-repack.t
209–222

Sigh, these break check-code. Any suggestions?

phillco edited the summary of this revision. (Show Details)Oct 25 2017, 5:15 PM
phillco updated this revision to Diff 3086.
phillco updated this revision to Diff 3087.Oct 25 2017, 5:19 PM
phillco updated this revision to Diff 3088.
phillco added inline comments.
tests/test-treemanifest-repack.t
195–208

Sigh, these break check-code. Any suggestions?

durham edited the summary of this revision. (Show Details)Oct 26 2017, 3:54 PM
durham accepted this revision.Oct 26 2017, 4:04 PM

Some comments might warrant a change, but looks good enough to accept.

remotefilelog/repack.py
148

Might be worthy of just being a top level function.

155

Maybe add a comment explaining the difference between historypacks and allhistorypacks, just for easy scanning of what this code does.

230

The first parameter of the tuple could be just prefix right?

tests/test-treemanifest-repack.t
173

s/except/expect/

175

Does this xargs work on both osx and linux? I'm always wary of bashisms in the tests

195–208

Why is there so much white space in the output?

This revision is now accepted and ready to land.Oct 26 2017, 4:04 PM
phillco added inline comments.Oct 26 2017, 4:29 PM
tests/test-treemanifest-repack.t
195–208

I think debugdatapack prints extra lines in some cases.

durham added inline comments.Nov 6 2017, 2:21 PM
tests/test-treemanifest-repack.t
195–208

Really? I don't think check code would complain if these were part of test output. If they were test output I'd expect them to have 2 spaces at the front, which they don't appear to (at least from what highlighting with my mouse says).

phillco added inline comments.Nov 6 2017, 9:35 PM
tests/test-treemanifest-repack.t
195–208

ah, turns out my editor was also stripping them. In any case I made hgdebugdatapack take multiple files, which I'll send as a followup.

phillco edited the summary of this revision. (Show Details)Nov 6 2017, 9:44 PM
phillco updated this revision to Diff 3303.
phillco updated this revision to Diff 3305.Nov 6 2017, 9:47 PM
phillco marked 3 inline comments as done.Nov 6 2017, 10:16 PM
phillco updated this revision to Diff 3306.
phillco closed this revision.Nov 6 2017, 10:18 PM

Landed