Commit Graph

13 Commits

Author SHA1 Message Date
Stanislau Hlebik
4c84f339fa infinitepush: add debugcheckbackup
Summary:
Command that checks that every head and bookmark node is present in the
bundlestore

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4658436

Tasks: 15389402
2017-03-07 01:21:44 -08:00
Stanislau Hlebik
fcf0eb5724 infinitepush: move common restore functionality from pullbackup
Summary: This functionality will be used in command to check backup consistency

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4658433

Tasks: 15389402

Signature: t1:4658433:1488828061:49aa5bfeba922d617cf1aab393f5e9f598aa33a4
2017-03-07 01:21:44 -08:00
Stanislau Hlebik
e3fa685103 infinitepush: rename node* to hexnode*
Summary: These are actually hexnodes, not nodes

Test Plan: arc unit

Reviewers: #mercurial, durham, mjpieters

Reviewed By: durham, mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4658432

Tasks: 15389402

Signature: t1:4658432:1488828083:957018757fbe7031183bd54734702d4b67465fd8
2017-03-07 01:21:44 -08:00
Stanislau Hlebik
71158d5a7f infinitepush: first ask for hostname, then for reporoot
Summary:
This small change makes a way better user experience. Users usually have one
big repo per host, but they may have many hosts (for example, laptop and
devserver). If we ask for reporoot first then it's very likely that next
`pullbackup` invocation will fail because there will be ambigious hosts.
Let's switch the order.

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4649946

Tasks: 15389402

Signature: t1:4649946:1488561645:330590fcf1dcd4af7fb572c5d4ccfd8a5ab78c60
2017-03-06 00:56:18 -08:00
Stanislau Hlebik
1aa37581ea infinitepush: pass dest to pull function
Summary: Previously dest wasn't passed to pull command. This diff fixes it.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4643461

Tasks: 15389402

Signature: t1:4643461:1488501956:4684805c618d55edcf4ee1ae13d34a87e92150e6
2017-03-06 00:50:30 -08:00
Stanislau Hlebik
9a343a289b infinitepush: add user cmd-line option
Summary: Option to specify whose backup to restore

Test Plan: arc unit

Reviewers: #mercurial

Subscribers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4650320

Tasks: 15389402
2017-03-06 00:44:18 -08:00
Stanislau Hlebik
6218797f5c infinitepush: pass username instead of ui
Summary:
Next diff will add special option to specify whose backup to restore.
This diff does a necessary refactoring

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4650282

Tasks: 15389402

Signature: t1:4650282:1488562203:632a8c84d6d537663bd7d94ce9dfd18a4498ccfb
2017-03-06 00:44:18 -08:00
Stanislau Hlebik
7dbfae7df1 infinitepush: skip secret commits during backup
Summary:
discovery.findcommonoutgoing() explicitly skips secret commits. Because of it
we also need to skip bookmarks that point to secret commits, otherwise they
will point to non-existent nodes.

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4611393

Tasks: 15389402

Signature: t1:4611393:1487933210:72e79923c944b13204f4cde64d415076703bbe47
2017-02-24 05:33:15 -08:00
Stanislau Hlebik
f5752faf6f infinitepush: renaming
Test Plan: arc unit

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4564630
2017-02-15 09:34:08 -08:00
Stanislau Hlebik
0e50fa2aa0 infinitepush: wrap deltaparent function
Summary:
On a big repo with many old heads bundle that is sent to the server can become
big (in some cases even 500 Mb). That looks like a waste of bundlestore space
and will probably make backup and restore slower. Most of the space is taken
by manifest deltas because it prefers to diff manifest against previous commit
in the bundle. There are two possible approaches to reduce the size:
1) Send many small bundles (for example, one bundle per head)
2) Wrap deltaparent function and diff against actual parent previous commit in the bundle.

I chose the second approach for the following reasons:
1) It's easier to implement (main reason)
2) Many bundles probably means slower restore because there will be many requests to the bundlestore instead of just one

With this diff bundle size was reduced from 500 Mb to 8 Mb.

It can potentially increase CPU usage. I'm not sure how bad is it and will investigate it more.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: simpkins, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4384053

Tasks: 12479677

Signature: t1:4384053:1483664446:62ec30fad433e8d279758926199a8330cb73ed2b
2017-01-09 01:42:02 -08:00
Stanislau Hlebik
486dcee7f9 infinitepush: do not backup nodes if there are no filelogs client and server
Summary:
If client pulled a commit without filelogs (because of remotefilelog) and
this commit was later stripped on the server, then attempt to backup this
commit fails because of missing filelogs. It's a rare issue but unfortunately
it happens sometimes. To fix it let's exclude from the backup all the
commits and their descendants that doesn't have all necessary filelogs.

Test Plan: Run infinitepush tests

Reviewers: mitrandir, rmcelroy, durham

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4365747

Signature: t1:4365747:1483466164:560cdf5cd2369cd2603dfd0fe6b30d7a70951f00
2017-01-09 01:40:02 -08:00
Stanislau Hlebik
d79a6edd00 infinitepush: backupcommands refactoring
Summary:
`pushbackup` command became huge. This diff splits it into a few
smaller functions

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4384008

Tasks: 12479677

Signature: t1:4384008:1483659549:a97b63a38b702a55d19cf6b47a6fd6b2547b9168
2017-01-06 04:21:23 -08:00
Stanislau Hlebik
2ac4b441e0 infinitepush: refactoring
Summary: __init__.py became huge and I suggest to split it

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4383661

Tasks: 12479677

Signature: t1:4383661:1483659134:eaf3d7e217633895a65ad568831d9c21ea0f18d8
2017-01-06 04:15:16 -08:00