Commit Graph

51339 Commits

Author SHA1 Message Date
Jun Wu
2781801365 doctor: attempt to fix mutationstore, metalog and allheads
Summary:
Since we got `repair` APIs in the Python land, use them to attempt to repair
things.

This would hopefully be able to fix some user-reported issues, usually
caused by hard reboots.

Reviewed By: xavierd

Differential Revision: D18737907

fbshipit-source-id: ef3deccbf4a1c959cff7e3eb78771acd9ae9bd01
2019-12-09 20:02:09 -08:00
Chad Austin
40e6e4bde2 enable eden debug logging in open source and macOS builds
Summary:
Register the logging and logging_full option handlers in the open
source and macOS builds of Eden.

Reviewed By: simpkins

Differential Revision: D18870545

fbshipit-source-id: 140debe77be071a9fa2d628ad305517273e095e3
2019-12-09 19:41:18 -08:00
svcscm
ba49b7f7f6 Updating submodules
Summary:
GitHub commits:

b221a6b5bb

Reviewed By: zpao

fbshipit-source-id: 6dd4252a106f8c6f6cb35613a1d10d346006d8a1
2019-12-09 18:22:40 -08:00
Stefan Filip
ef336812a7 hggit: update dulwich usage to match 0.19+
Summary:
From Dulwich changelog:
0.19.0 2018-03-10
API CHANGES
GitClient.send_pack now accepts a generate_pack_data rather than a
generate_pack_contents function for performance reasons.

(Note: this ignores all push blocking failures!)

Reviewed By: quark-zju

Differential Revision: D18901269

fbshipit-source-id: 9510b3a516cb2fcbeae9f1f2072d8445e442a9ed
2019-12-09 17:59:14 -08:00
svcscm
61a9c9c6f8 Updating submodules
Summary:
GitHub commits:

8b2d8468c9
840bcfbdb8
0a702dcd44
e45e35f7e1

Reviewed By: zpao

fbshipit-source-id: 524ed22a0723ac5b669ef4c1b00b6b4e511a2d58
2019-12-09 17:59:14 -08:00
svcscm
d2999e8999 Updating submodules
Summary:
GitHub commits:

a072a44b4d
59c0f06905
c39a3e42b8
a68dff5c35
f4b1e6532c
d0790d3a38

Reviewed By: zpao

fbshipit-source-id: 29e7660c1d2981dcd61821dc79c8cc088f96ae5c
2019-12-09 16:46:21 -08:00
Genevieve Helsel
504a255355 add getTreeForManifest
Summary: Adds a function which takes both the manifestID and the commitID to get a Tree. This will be used in `checkOutRevision()` and this allows us to skip looking up the manifestID since the caller can just pass it in themselves.

Reviewed By: wez

Differential Revision: D18719405

fbshipit-source-id: 919f0a7c84bff4a2f0bc20110c45bd272f9e9107
2019-12-09 16:25:27 -08:00
Chad Austin
4963352d64 temporarily mark trees persistent
Summary:
It is very painful for Eden's automatic GC to delete trees from the
local store. An unfortunate number of programs scan the entire repo,
causing every tree to be loaded. If Eden's automatic GC kicks in, it
causes all trees to be downloaded again, blocking both FUSE and Thrift
requests.

Temporarily mark trees as persistent.

Reviewed By: fanzeyi

Differential Revision: D18842066

fbshipit-source-id: 4a22defcb1151912337d4167ac49852519c7789d
2019-12-09 16:11:36 -08:00
Jun Wu
a3129104fe tests: fix buck run :run_tests
Summary:
`buck run :run_tests -- ...` was added to be a buck version of `run-tests.py`.
However it does not work because the watchman path provided was invalided.

Reviewed By: xavierd

Differential Revision: D18892361

fbshipit-source-id: 8745a33e0d19b14f042ef1cd255d10c5737dffb1
2019-12-09 15:26:30 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Jun Wu
84a4da85ca metalog: implement bi-directional migration
Summary:
Previously, it's fine to migrate up to metalog, and fine to migrate down once
since we double write data. However, re-enabling metalog can be problematic
since there is no code path to do "migrate up" again.

This diff fixes the issue by tracking what files (or "keys") are using metalog
as the source of truth in metalog. So we can accurately figure out whether to
migrate svfs files to metalog on demand.

Reviewed By: xavierd

Differential Revision: D18864424

fbshipit-source-id: e61e1790c231f9c88de869f413f27bb954a29920
2019-12-09 14:18:18 -08:00
Jun Wu
d754747d01 bindings: add repair to structures
Summary: Expose the repair API to the Python world.

Reviewed By: xavierd

Differential Revision: D18737913

fbshipit-source-id: c31085727589b6938c2fafb28897925aea617bc4
2019-12-09 14:15:47 -08:00
Jun Wu
02b4902319 metalog: implement Repair
Summary:
Provide a way to repair the MetaLog. It's not just repairing 2 indexedlog
structures, but also checking the relationships between them.

Reviewed By: xavierd

Differential Revision: D18737904

fbshipit-source-id: fcf8ae56a1fdbb0561765701d962dfad4a8b5bd4
2019-12-09 14:15:47 -08:00
svcscm
039e5a1f9d Updating submodules
Summary:
GitHub commits:

aba4498a76
3fa5699d02

Reviewed By: zpao

fbshipit-source-id: 0109e104147cf3eeff04bcc79e72542a1bb89056
2019-12-09 14:15:47 -08:00
svcscm
fa464c1e21 Updating submodules
Summary:
GitHub commits:

cfa22893ac

Reviewed By: zpao

fbshipit-source-id: 2b1b1ec6c532eef5f54c04fc50a57f1644972524
2019-12-09 13:39:34 -08:00
Jun Wu
083bf3f1c3 run-tests: support '#chg-compatible' header
Summary:
Detect `#chg-compatible` in test header and force enable chg. This would allow
us to mark tests as chg-compatible to get some speed ups.

Reviewed By: xavierd

Differential Revision: D18870508

fbshipit-source-id: 923d6cb10b0c621d9995809b60ae535126f6f2a5
2019-12-09 13:20:25 -08:00
Jun Wu
fb13bc5ecf run-tests: make --chg work again
Summary:
The chg logic is inlined in the "hg" binary so the old logic running "chg" as
an external binary needs to be changed.

The version check part can be annoying - it requires more frequent `make local`
to run the tests while `make local` is actually not necessary. So let's just
skip the version check if running in tests.

Reviewed By: ahornby

Differential Revision: D18870510

fbshipit-source-id: 2343549c4080a0425098698b5423c6cfc1f60c77
2019-12-09 13:20:24 -08:00
Xavier Deguillard
82082bfaf8 policy: simplify it
Summary:
We only support the "C" policy, therefore let's inline it and simplify the code
significantly.

Reviewed By: quark-zju

Differential Revision: D18819680

fbshipit-source-id: 0bc0a12b85ddc42af007d3a20c0f4e8497bedb21
2019-12-09 13:13:27 -08:00
Xavier Deguillard
24d99a9178 util: remove os.stat_float_times(False)
Summary:
This is not available on Python3, instead stat.ST_MTIME and friends should be
used to get an integer time. This is achieved by wrapping the output of the
stat function and overriding the st_[acm]time properties.

Reviewed By: quark-zju

Differential Revision: D18819679

fbshipit-source-id: 2911f3d47506456e927872d57f69253d903618e2
2019-12-09 13:13:26 -08:00
Jun Wu
6da344eee2 hgcommands: avoid forked processes to override trace output
Summary:
The environment variable `EDENSCM_TRACE_OUTPUT` specifies where to write the
tracing output for the current command. Environment variables are inherited
by subprocesses by default. That is undesirable because another hg command
(triggered by hook, or background maintaince) will rewrite the trace output.

Avoid it by unsetting EDENSCM_TRACE_OUTPUT for subprocesses.

Reviewed By: xavierd

Differential Revision: D18892973

fbshipit-source-id: 575b6c0df2e7a0775172893e4aa72ca33fa4658c
2019-12-09 13:09:25 -08:00
svcscm
60ce49ea9e Updating submodules
Summary:
GitHub commits:

0f96b98cec
8090b337a4
e43d2c4424
70d1c268bf
fc6140865b
4caba2ed65

Reviewed By: zpao

fbshipit-source-id: 5b4edf4267942ab0cbd2980dc500227e3ce353e3
2019-12-09 13:02:00 -08:00
Durham Goode
dd6f76863b lfs: use unfiltered repo for lfs gc
Summary:
Some users were reporting hg gc failures because it couldn't access a
hidden commit.  It looks like there's a `repo.unfiltered().revs("draft()")`
line to get the list of draft commits, so we need to also use an unfiltered repo
when extracting all the pointers.

Reviewed By: quark-zju

Differential Revision: D18863471

fbshipit-source-id: 61220c1ec3dcbf55879211bb271b4d9b686d66a1
2019-12-09 12:34:22 -08:00
Durham Goode
ad43fdcaf6 fastlog: fix fastlog directory histories
Summary:
D18732257 changed our fastlog integration from using conduit to using
scmquery. This changed the result type from a hash to a dictionary of {"hash":
"xxx"}, but the consumer code wasn't updated appropriately. This fixes it.

Reviewed By: mitrandir77

Differential Revision: D18833566

fbshipit-source-id: 2573cbf4f93c5e4aeb2515d42696526ceb51428e
2019-12-09 12:32:07 -08:00
svcscm
3799971fb1 Updating submodules
Summary:
GitHub commits:

a568051d01
b575961859
7e2f831924

Reviewed By: zpao

fbshipit-source-id: b18f507d9951b6b23e9514aa40cc8e5f4df97ed8
2019-12-09 11:43:08 -08:00
Genevieve Helsel
0907d3adda save loadFileFromPath in DiffContext
Summary: Saves loadFileFromPath in the DiffContext. This allows the source control differ ( at `eden/fs/store/Diff.cpp`) to call this function while it is trying to load gitIgnores and resolve symlinks.

Reviewed By: simpkins

Differential Revision: D18647088

fbshipit-source-id: bddff0158130f0c96ac263bcce81dc51fc017800
2019-12-09 11:33:23 -08:00
Genevieve Helsel
c8bdf32bc9 introduce EdenMount::loadFileContentsFromPath
Summary: Adds a helper function that can take a path to an Inode and load a file by simply getting the Inode then calling the existing `loadFile()` function

Reviewed By: simpkins

Differential Revision: D18647090

fbshipit-source-id: 89c25bef10a7a0d0ffd660293f85479ac0e9f9a9
2019-12-09 11:33:23 -08:00
Genevieve Helsel
32fb62cedf move gitignore loading to EdenMount as EdenMount::loadFileContents
Summary: Move the bulk of the gitignore loading to EdenMount, this is needed later in the stack to pass this function as a callback through the DiffContext to enable gitignore loading from the source control tree differ.

Reviewed By: simpkins

Differential Revision: D18565265

fbshipit-source-id: 062349d81bbfb78235ccb34d6ec72ad445a6e2b0
2019-12-09 11:33:23 -08:00
svcscm
8422adbb1f Updating submodules
Summary:
GitHub commits:

a34673429a
d7535e2e5c
3a6d9436e8
610fa46702
547bdd2955
b122356fd1
a7e933e480

Reviewed By: zpao

fbshipit-source-id: 7c3bc5d3e3e555c0545ce20f9df733c67526a331
2019-12-09 10:20:20 -08:00
svcscm
a20e07f467 Updating submodules
Summary:
GitHub commits:

9b94248d1e
485b5e487f

Reviewed By: yns88

fbshipit-source-id: d6fd911290a174166ede7fc683bd9c8f9ab366b2
2019-12-08 23:22:36 -08:00
svcscm
56bf5d694c Updating submodules
Summary:
GitHub commits:

bb1c9e524b
e3a82bb934

Reviewed By: yns88

fbshipit-source-id: 24cde5a92ecf398cfefc5cf6066e160243ebc1dc
2019-12-07 23:23:30 -08:00
svcscm
b745b4421b Updating submodules
Summary:
GitHub commits:

0fedb49305

Reviewed By: yns88

fbshipit-source-id: 4a7af38531667a9a10ba5466f20ac65b7bc14be4
2019-12-06 22:50:04 -08:00
Jun Wu
8f749d32f2 metalog: handle missing Root blob errors correctly
Summary:
The previously behavior silently uses the empty Root upon "id not found" cases,
which hides data corruption issues captured by the next changes.

Reviewed By: xavierd

Differential Revision: D18737906

fbshipit-source-id: 0f2cfe1b05f11e9d2584d96a14afcb1aed80da4d
2019-12-06 21:08:33 -08:00
Jun Wu
91884d1fab tests: mark tests as skipped on MySQL error
Summary:
Recently many tests become unreliable due to MySQL errors like:

  OperationalError: 2055: Lost connection to MySQL server at '<host:port>', system error: 32 Broken pipe

That makes the testing infra think our tests are broken and cause:

  # Test Failure Bot
  Test is now disabled because it has been consistently broken

Avoid that by detecting MySQL errors and mark tests as skipped.

Reviewed By: simpkins

Differential Revision: D18668303

fbshipit-source-id: 02cb09f31c712fed41903f1e8c4ad45a1d277c30
2019-12-06 21:01:44 -08:00
Jun Wu
35f85f7864 morecolors: remove extension
Summary:
It was used to highlight "more interesting" (aka. extension) code. Nowadays the
non-extension part of code is also interesting. Therefore drop the extension.

Reviewed By: simpkins

Differential Revision: D18666053

fbshipit-source-id: 027190f742015bdb9e7dba109e7a28987af3cf68
2019-12-06 21:01:44 -08:00
Jun Wu
b8c04b5a97 indexedlog: do not repair non-existent directory
Summary: Otherwise the repair will fail with "unable to lock directory" errors.

Reviewed By: xavierd

Differential Revision: D18737911

fbshipit-source-id: 2c47b5b9a071e0db2d20fc385ef466aef1e732f6
2019-12-06 19:35:06 -08:00
Jun Wu
a1f08d6628 indexedlog: make it possible to construct Error from other errors
Summary: This makes it possible for other crates to implement the `Repair` trait.

Reviewed By: xavierd

Differential Revision: D18737909

fbshipit-source-id: 3d098e583b45e84eb4bd01ef45569e9694b63ed6
2019-12-06 19:35:05 -08:00
Jun Wu
d4c4ccde40 zstore: implement indexedlog::DefaultOpenOptions
Summary: This implements `Zstore::repair` for free.

Reviewed By: xavierd

Differential Revision: D18737910

fbshipit-source-id: 7db2032ba4722b7073e777fbad7229a801724f71
2019-12-06 19:35:05 -08:00
Jun Wu
237a9708f6 nodemap: implement indexedlog::DefaultOpenOptions
Summary: This implements `Node{Map,Set}::repair` for free.

Reviewed By: xavierd

Differential Revision: D18737905

fbshipit-source-id: f0a4a64fddeb895d979bee3c51478c138c8235fe
2019-12-06 19:35:05 -08:00
Jun Wu
b0f061f66b mutationstore: implement indexedlog::DefaultOpenOptions
Summary: This implements `MutationStore::repair` for free.

Reviewed By: xavierd

Differential Revision: D18737912

fbshipit-source-id: 098e22bf4ab94af96be9b0d54914abf880c91f74
2019-12-06 19:35:04 -08:00
Jun Wu
7a16996ce0 revisionstore: implement indexedlog::DefaultOpenOptions
Summary:
This simplifies the logic a bit by getting a free `repair` method from
indexedlog.

Reviewed By: xavierd

Differential Revision: D18737908

fbshipit-source-id: 4988c1a83b7709b751cd1899c5663acc0c42e313
2019-12-06 19:35:04 -08:00
Jun Wu
2e01020ea3 indexedlog: add a Repair trait
Summary:
The goal is to make it easier for different structures to implement `repair` by
just providing `OpenOptions`.

Reviewed By: xavierd

Differential Revision: D18737903

fbshipit-source-id: af3c18038c5bb2f91f53ab53926ec097e1d87e6b
2019-12-06 19:35:04 -08:00
svcscm
4981a878c7 Updating submodules
Summary:
GitHub commits:

9242499096
b98a647df5

Reviewed By: yns88

fbshipit-source-id: 62b9d0508b42d6832d7d1713b852fa987e6c940f
2019-12-06 19:16:05 -08:00
Zeyi (Rice) Fan
1ae1169043 RFC: [hg] backingstore: use IOBuf::TakeOwnershipOp to achieve zero-copy
Summary: Uses `folly::IOBuf`'s `TakeOwnership` instead of `CopyBuffer` to achieve zero-copy of file content we get from Rust.

Reviewed By: chadaustin

Differential Revision: D18264900

fbshipit-source-id: 45baa70cb771a2bff0b31feaa1b85569625218eb
2019-12-06 19:05:12 -08:00
svcscm
559a0dafeb Updating submodules
Summary:
GitHub commits:

61d7ab5427
0006ae955a
589523aafe

Reviewed By: yns88

fbshipit-source-id: ff3ca504e9a4d6e809eebf3eb008138ebbd87dff
2019-12-06 19:05:12 -08:00
svcscm
53c132c287 Updating submodules
Summary:
GitHub commits:

435d929205
6f2a34cfd6

Reviewed By: yns88

fbshipit-source-id: b5f84914b41b5f49c985f7b3ebd01f713a24c6a4
2019-12-06 15:25:18 -08:00
Stefan Filip
dd4d4a7b85 manifest: split in two crates: manifest and manifest-tree
Summary:
This isolates the core types in manifest so that it is harder to
create unsound dependencies with specific implementations.

Reviewed By: quark-zju

Differential Revision: D18843133

fbshipit-source-id: 4b866ad84d2e7d0ff2dc4ec6bd65f66548c3fe4a
2019-12-06 14:33:02 -08:00
Stefan Filip
7cf94a2362 manifest: rename Cursor to DfsCursor
Summary: Signal more clearly that the iteration in the cursor is depth first.

Reviewed By: quark-zju

Differential Revision: D18843135

fbshipit-source-id: 8ee2c612963eaf6fec3ae48f75ebf16bd177fed4
2019-12-06 14:33:02 -08:00
Stefan Filip
9274fe2661 manifest: move Cursor from cursor.rs to iter.rs
Summary: Consolidating iteration structures in iter.rs.

Reviewed By: quark-zju

Differential Revision: D18843127

fbshipit-source-id: 5aaed8ba303f5cc95a44ff953bec71a1b5fd2c0d
2019-12-06 14:33:02 -08:00
Stefan Filip
0343eab799 manifest: rename iter::Items to iter::BfsIter
Summary: Items feels a bit generic as a name.

Reviewed By: quark-zju

Differential Revision: D18843136

fbshipit-source-id: 29a904f3a8a1996760e71bd78610bdbfef4ad65b
2019-12-06 14:33:01 -08:00
Stefan Filip
0f44417537 manifest: rename files.rs to iter.rs
Summary: No longer strictly related to files.

Reviewed By: quark-zju

Differential Revision: D18843128

fbshipit-source-id: c7853e08aa5d0256616e777c5bb6dd477b9ebc97
2019-12-06 14:33:01 -08:00