Commit Graph

24 Commits

Author SHA1 Message Date
Jun Wu
1c79ff38ba dag: tweak tracing logs
Summary: Tweak the tracing logs so it does not print duplicated hashes.

Reviewed By: andll

Differential Revision: D29980948

fbshipit-source-id: 2244830f85b3f3beacb9a1264b84da7182ddae1b
2021-08-02 14:30:55 -07:00
Jun Wu
e0b3d491b7 test-eager-exchange: skip part that is incompatible on Windows
Summary:
On Windows the path separator (slash) is different. Let's skip part of the test
for now.

Reviewed By: andll

Differential Revision: D29980940

fbshipit-source-id: c45fe9f5f3b3ffe6d4d8eb209fa5572149db8d0e
2021-07-29 10:42:32 -07:00
Jun Wu
0ef56b6554 dag: respect missing cache on vertex_id_batch
Summary:
Previously the missing vertex cache was ignored by vertex_id_batch.
Respecting it can help reduce remote lookups.

Reviewed By: andll

Differential Revision: D29889457

fbshipit-source-id: 0469b1e61c42ad31e0dd486ab7c752bf4aeeba5c
2021-07-26 15:23:40 -07:00
Jun Wu
606e07e9f7 dag: reuse caches if dag does not change on disk
Summary:
This will help remove some unnecessary cache invalidations, and help avoid
remote lookups.

Reviewed By: andll

Differential Revision: D29889458

fbshipit-source-id: e9a36b227c3b2c7f6b9830a8b27f5a16e363c94e
2021-07-26 15:23:40 -07:00
Jun Wu
e0d9c0e457 dag: add some tracing logs
Summary: Added some dag::cache tracing logs to check cache status.

Reviewed By: andll

Differential Revision: D29889459

fbshipit-source-id: 41a4af1ad5d187164d954f1602b8c7a2d3bacaf8
2021-07-26 15:23:39 -07:00
Jun Wu
1dc90d221e changelog2: do not check tip remotely on add
Summary:
Previously it checks whether the new hash exists remotely, which makes offline
commit impossible.

`tip` is not that important. Just do a local check instead.

Reviewed By: andll

Differential Revision: D29834904

fbshipit-source-id: 94924591a5827942f428b74231b4494999856361
2021-07-26 15:23:39 -07:00
Jun Wu
6eb00586c8 test-eager-exchange: show remote lookups for commit or amend
Summary: Show that lazy changelog makes it impossible to commit or amend offline.

Reviewed By: andll

Differential Revision: D29834907

fbshipit-source-id: a268be05947cbf215cff1471a25dba72447bafec
2021-07-26 15:23:39 -07:00
Durham Goode
93844abc0f treemanifest: remove flatcompat feature
Summary: The tests no longer require it, so let's remove all the logic for it.

Reviewed By: quark-zju

Differential Revision: D29643267

fbshipit-source-id: 86b44e3b7b4a4eb19d7f89b54b40957a7648573a
2021-07-13 15:04:57 -07:00
Jun Wu
b3419f8dba pull: filter out existing heads to pull
Summary:
If heads exist in the repo, there is no need to pull them.

Practically we configured selectivepull to include master and stable.
While the master head is excluded by the pull fast path, the stable bookmark
previously triggers the heavyweight pull. This diff makes it that we can
skip the heavyweight pull and avoid other issues like devel-warn importing
empty changegroup.

Reviewed By: DurhamG

Differential Revision: D29525476

fbshipit-source-id: 9d1ff28d1194cac22ae66e669a5bd9dbe3f750c4
2021-07-06 14:01:55 -07:00
Carolyn Busch
8e6b4b6678 eagerpeer: fix push_key bookmark update
Summary: Fix two bugs in the eagerpeer pushkey implemention for the case where the bookmark has an existing value. The existing bookmark is already in hex form and errors on conversion. The new bookmark should be set when the new bookmark doesn't match the existing bookmark.

Reviewed By: quark-zju

Differential Revision: D29305606

fbshipit-source-id: 79ec6432d2fe7709f51f5cc508a39238ce446e23
2021-07-01 14:10:34 -07:00
Jun Wu
bb7914ab50 remotenames: skip pull for modern clone paths
Summary:
The remotenames has logic to work with legacy clones to write the remotenames
state. However, modern clone paths take care of remotenames directly so there
is no need to do an extra pull by remotenames.

Reviewed By: DurhamG

Differential Revision: D29428883

fbshipit-source-id: a73c0ee716b09f4e34d6fa30997f961284678d13
2021-06-28 12:25:17 -07:00
Jun Wu
2aa432e134 clone: add a config to clone with lazy changelog
Summary: This will be used by fbclone to ship lazy commit hash backend.

Reviewed By: DurhamG

Differential Revision: D28554445

fbshipit-source-id: a263ae7683124b3b86f4025b02c7de20dcb9813e
2021-05-24 14:51:58 -07:00
Jun Wu
f36574ef0f test-eager-exchange: test treemanifest reading
Summary:
Add a subtree to exercise treemanifest logic. Blobs in EagerRepo are verified
so we need to disable flatcompat.

Reviewed By: DurhamG

Differential Revision: D28006550

fbshipit-source-id: ac7157a9c01ed99f703601613fb3cf06add69003
2021-05-06 12:13:17 -07:00
Jun Wu
b6d24fc969 eagerepo: support "test:name" repo URLs
Summary: This makes it easier to use it in tests.

Reviewed By: DurhamG

Differential Revision: D28006549

fbshipit-source-id: 90e29b220453a3d7a260d0a62d697d64363d9a6c
2021-05-06 12:13:17 -07:00
Jun Wu
f23f112dc8 test-eager-exchange: add test showing file content can be read after clone
Summary:
With remotefilelog force enabled, it's now possible to read the file content after
clone. Add a test for it.

Reviewed By: DurhamG

Differential Revision: D28006547

fbshipit-source-id: 5be93e162f352b1264a6c52852c2230726652f9d
2021-05-06 12:13:17 -07:00
Jun Wu
4c214bca8c dag: move some tracing logs from dag::namedag to dag::protocol
Summary:
This makes it easier to filter logs related to remote fetching.

The `DEBUG dag::protocol: resolve ids [0] remotely` means the lazy hash resolution is working.

Reviewed By: kulshrax

Differential Revision: D27971117

fbshipit-source-id: f2492204c70d793997d0c3865e500bbad56b1953
2021-05-06 12:13:17 -07:00
Jun Wu
e0b6773019 eagerepo: write commits to master group
Summary:
Write commit to master group. This provides proper "CloneData" and allows us to
actually test lazy commit hash backend (since only commits in the master group
can have lazy hashes).

Reviewed By: DurhamG

Differential Revision: D27971123

fbshipit-source-id: 4e19486007ddc89de7468be65445559f34d796f5
2021-05-06 12:13:17 -07:00
Jun Wu
6763719506 eagerpeer: add clone support
Summary:
Add clone endpoint so we can clone from an eager test repo.

Note: the master group is empty and "cloneata" does not quite work yet due to
EagerRepo not writing to the master group. It will be fixed later.

Reviewed By: DurhamG

Differential Revision: D27971121

fbshipit-source-id: 0cc35136c6987673c2c4fbbd892c344c3586fcb7
2021-05-06 12:13:17 -07:00
Jun Wu
60e240b17e eagerepo: fix Windows compatibility
Summary: Windows path like `eagerepo:///C:\foo\bar` needs special handling.

Reviewed By: kulshrax

Differential Revision: D27971119

fbshipit-source-id: 9d4b87782eca2734b708565f0ee22a7495253cff
2021-05-05 12:01:50 -07:00
Jun Wu
fa7ba86bad exchange: skip pull phase if narrow-heads is on
Summary: We skip it in other places but missed this one. Skip it too.

Reviewed By: kulshrax

Differential Revision: D27957853

fbshipit-source-id: 429d25e8b692218c9bae6c10ad76d08495a4bc66
2021-05-04 18:28:45 -07:00
Jun Wu
ae81c8fd34 edenapi: force use edenapi if ui.ssh is false
Summary: If ui.ssh is "false", then ssh cannot be used at all. Force using edenapi.

Reviewed By: kulshrax

Differential Revision: D27957312

fbshipit-source-id: 9860344779e6a6bab557d3f953ee38e40fadb78b
2021-05-04 18:28:45 -07:00
Jun Wu
032f5e5158 eagerepo: add tracing messages
Summary: Make it easier to check whether APIs in EagerRepo is called or not.

Reviewed By: andll

Differential Revision: D27955426

fbshipit-source-id: 27ca505c63596368cff98642de010b5b5717454c
2021-05-04 18:28:45 -07:00
Jun Wu
49e8c82d07 exchange: pull from EagerRepo without getbundle
Summary:
Add "getbundle" alternative "commitgraph" for pulling from a EagerRepo.
This avoids tech-debt like bundle2 or linkrev. It depends on a lazy
(text) changelog backend.

Reviewed By: kulshrax

Differential Revision: D27951620

fbshipit-source-id: f21119d37da6505e68c6c5f3b33b9bd1f65e4d9a
2021-05-04 17:00:56 -07:00
Jun Wu
494309f22a exchange: push to EagerRepo without unbundle
Summary:
Add "unbundle" alternative "addblobs" for pushing to a EagerRepo.
This avoids tech-debt like bundle2 and linkrev.

Reviewed By: kulshrax

Differential Revision: D27951628

fbshipit-source-id: 3315e0653ee12928993e4e9325fbe8e2c369307b
2021-05-04 17:00:56 -07:00