Commit Graph

55571 Commits

Author SHA1 Message Date
Jun Wu
787cebfe91 context: print more details on fctx.data() key error
Summary:
Print out the name of the commit and the stack.
Hopefully this can help making debugging KeyErrors easier.

Reviewed By: DurhamG

Differential Revision: D19776181

fbshipit-source-id: 2eb985dd5355732a4d7728af68eb16173c48caa5
2020-02-06 15:56:26 -08:00
Jun Wu
69aa37f23b tracing: limit column width on ASCII output
Summary: This makes the output more readable even if the "name" of a span is very long.

Reviewed By: DurhamG

Differential Revision: D19780536

fbshipit-source-id: dce0d3777409c32b0752db51341a572addb823ea
2020-02-06 15:46:53 -08:00
svcscm
e7f7e557c0 Updating submodules
Summary:
GitHub commits:

fb08a4ea5d

Reviewed By: yns88

fbshipit-source-id: 6303adaebe0b362e7163afba81b177387d08cb19
2020-02-06 15:04:56 -08:00
Durham Goode
309a3a0592 py3: fix commitcloud lock output
Summary:
The use of json meant the progress step was coming out as unicode when
it should be str. Use the mercurial.json functions to solve this for python 2
and 3.

Reviewed By: xavierd

Differential Revision: D19777255

fbshipit-source-id: 15c8e45425fc8742b6e118249104fc1fb2f3345d
2020-02-06 13:23:21 -08:00
Thomas Orozco
d39eea991b blobrepo: don't fetch Hg Changeset IDs sequentially
Summary:
Fetching things from MySQL sequentially in a buffered fashion is a bad
practice, since we might end up saturating the underlying MySQL pool, and
starving other MySQL  clients.

Instead, let's make fewer, bigger queries.

Reviewed By: ahornby

Differential Revision: D19766787

fbshipit-source-id: 1cf9102eaca8cc1ab55b7b85039ca99627a86b71
2020-02-06 12:11:22 -08:00
Thomas Orozco
ce8b9a0fbe getbundle_response: don't fetch Hg Changeset IDs sequentially
Summary:
Fetching things from MySQL sequentially in a buffered fashion is a bad
practice, since we might end up saturating the underlying MySQL pool with a lot
of requests. Doing so will result in other queries being delayed as they wait
behind our batch of queries, which results in higher dispatch latency.

Instead, let's make fewer, bigger queries. Also, while we're in here, let's
update blobrepo to have an up-to-date comment.

Reviewed By: StanislavGlebik

Differential Revision: D19766788

fbshipit-source-id: 318ec4778ca259b210d431fc2add8b327bfce99a
2020-02-06 12:11:21 -08:00
Thomas Orozco
4874c1b7ab mononoke/fastreplay: set MultiplexBlob sampling rate
Summary: We don't need to log so many blob fetches. Let's not.

Reviewed By: HarveyHunt

Differential Revision: D19766017

fbshipit-source-id: 674dee276234f96938a9459af18dd78d09243350
2020-02-06 12:08:43 -08:00
Thomas Orozco
8d2b2f7af2 mononoke/multiplexedblob: make sampling rate configurable
Summary: This will let us lower Scuba utilization from Fastreplay.

Reviewed By: HarveyHunt

Differential Revision: D19766018

fbshipit-source-id: 4eac19b929914db910ed13096b2a5910c134ed3a
2020-02-06 12:08:43 -08:00
svcscm
c992310114 Updating submodules
Summary:
GitHub commits:

f7574673f1
c6f75516b7

Reviewed By: yns88

fbshipit-source-id: c12ec532434d3f4ec3cadd3326180829a625ad9b
2020-02-06 12:08:43 -08:00
svcscm
e498a4ec41 Updating submodules
Summary:
GitHub commits:

f7f2fdc4fd
ed5cfa9336
9a71f68742
ff5d797f27
a2191b9201
ada24d47d5
f33bb45488
9fd77cab60
72b18a4d01
f06a4e64df

Reviewed By: yns88

fbshipit-source-id: 4222bf64c57ac88c29c0d6424cade5af09c1da3f
2020-02-06 09:45:55 -08:00
Mark Thomas
8a829d6f01 scs_server: remove compat around Mononoke::new
Reviewed By: farnz

Differential Revision: D19770416

fbshipit-source-id: 2943d922d0b49a553b410d73c6b520c83f58c35e
2020-02-06 09:14:05 -08:00
svcscm
f12979d14f Updating submodules
Summary:
GitHub commits:

85beed9d76
28b442e2bb
cd1394ac0c
72f4c754b3
43e00ee0fe
c5cd609831
2274daef4b
8db93a6481
ce2eed8817

Reviewed By: yns88

fbshipit-source-id: cfefb06849436b26fe6e82a1cab44d6a64916364
2020-02-06 08:33:59 -08:00
Mark Thomas
060eefff74 mononoke_api: requests for blame information for rejected blames are a request error
Summary:
If the user requests blame information for a file where the blame was rejected
(either becuase the file is too big, or because it is binary), this should be
considered a request error.

Reviewed By: farnz

Differential Revision: D19768261

fbshipit-source-id: 7f0d7ba53fe1087b68f4432ec0c6de0353dc3885
2020-02-06 08:33:59 -08:00
Lukas Piatkowski
e9434f13d2 mononoke: remove the getdeps manifest
Summary: Mononoke is becoming part of Eden repository, remove it's getdeps manifest until we finalize the move.

Reviewed By: krallin

Differential Revision: D19769090

fbshipit-source-id: 9b471686728e9ff28317f9157f5f8a1834c5f5e4
2020-02-06 08:00:16 -08:00
Stanislau Hlebik
688a7aeb35 mononoke: remove compat() methods
Summary: They are not used much - let's use new futures instead

Reviewed By: krallin

Differential Revision: D19767952

fbshipit-source-id: c04bcf5efc6f8ee6f1d31254fcb2cb4603769b91
2020-02-06 08:00:16 -08:00
Liubov Dmitrieva
8228f84a60 Short hashes lookup: implement suggestions the same way as in Mercurial.
Summary:
Suggestions come in the error message as it is currently implemented in
Mercurial code. Format of suggestions also stays the same.

We give the hash, time, author and the title.

All suggestions are ordered (most recent go first).

We don't show them if there are two many.

Reviewed By: krallin

Differential Revision: D19732053

fbshipit-source-id: b94154cbc5a4f440a0053fc3fac2bca2ae0b7119
2020-02-06 07:43:51 -08:00
Stanislau Hlebik
af2f50d644 mononoke: add x_repo_lookup to scsc
Summary:
Useful for debugging.

I also fixed how we open a SqlSyncedCommitMapping, because we used incorrect path for that.

Reviewed By: ikostia

Differential Revision: D19767148

fbshipit-source-id: baf67bceceb7b22429b05b41020cf4350e3c87bd
2020-02-06 07:26:14 -08:00
Stanislau Hlebik
c8a4ba5dac mononoke: commit sync thrift api
Summary:
This is the api that will be used by Sandcastle to remap a commit from one repo
to another.
Previously the implementation api was just looking in the commit mapping table,
but that's not enough - draft commit cloud commits are not in this table, so we
actually need to sync them.

There's a caveat though - we allow syncing public commits from a large repo to
a small repo, but not the other way around. Comment in the code has more info
about it.

Reviewed By: ikostia

Differential Revision: D19718839

fbshipit-source-id: 9939530f818fafd22bc3838b4647dd9cbc1c8c07
2020-02-06 07:26:14 -08:00
Stanislau Hlebik
c97ceda175 mononoke: update IncompleteFilenodes to make transition to FilenodesOnlyPublic
Summary:
Jump from "generating filenodes while generating hg changeset" to "generate
filenodes separately" is tricky to do without breaking production. This diff
adds additional logic in IncompleteFilenodes that should make this transition
smoother. See code comment for more details.

Reviewed By: krallin

Differential Revision: D19741913

fbshipit-source-id: 48987c15fc4144c50afcee7ae34072f6cd634271
2020-02-06 07:26:14 -08:00
svcscm
446ddecbee Updating submodules
Summary:
GitHub commits:

c0f5b5641a
c0bc59ce27
b277fa9b52

Reviewed By: yns88

fbshipit-source-id: 23f6d643ff137aa8edeff216fbea7056a15f6667
2020-02-06 07:26:13 -08:00
Lukasz Piatkowski
415bab4e4b Merge mononoke sources into the eden repository
fbshipit-source-id: 43a0252cb3ec42aa365f20d1b6faa4d24d74c9b8
2020-02-06 14:01:58 +01:00
Lukasz Piatkowski
e8d62b64d5 mononoke: move the codebase under eden/ directory
fbshipit-source-id: 43a0252cb3ec42aa365f20d1b6faa4d24d74c9b8
2020-02-06 13:46:04 +01:00
svcscm
a5805a3c91 Updating submodules
Summary:
GitHub commits:

ebe3e4957c
dd971ef075
0fdfe016e4
7b2574ea2c
04caeb8d7e
65a6c9bfe2

Reviewed By: yns88

fbshipit-source-id: 43a0252cb3ec42aa365f20d1b6faa4d24d74c9b8
2020-02-05 21:02:38 -08:00
Xavier Deguillard
3c41bd2a92 build: use vendored crate from third-party
Summary:
Now that the source of truth for third-party crates is in fbsource, let's use
it in our cargo build system. This removes the need to fetch a tarball and
untar it, which should have the benefit of speeding up the build.

A small caveat is the first build on EdenFS will be slightly slower, due to
crates needing to be individually fetched, subsequent builds will be faster.

Reviewed By: jsgf

Differential Revision: D19726217

fbshipit-source-id: 24f484d1e3118a76e052f07ff3eea0c66cccce96
2020-02-05 17:49:06 -08:00
svcscm
9e83ee5b18 Updating submodules
Summary:
GitHub commits:

2f2a8c75cd
1808c0d0af
b69b747125

Reviewed By: yns88

fbshipit-source-id: dced59284387966a1fb088be0bb84fc8facc39aa
2020-02-05 16:21:22 -08:00
Chad Austin
4e1f60fc24 log checkout type and fetch counts to scuba
Summary: In addition to duration and success, log object fetch counts and checkout type to Scuba.

Reviewed By: fanzeyi

Differential Revision: D19334276

fbshipit-source-id: dabf52427f2ebda2b58df93194df39d52f4fcb4f
2020-02-05 16:05:30 -08:00
Chad Austin
cb1c0b45f3 log fetch statistics after checkout
Summary: Log the number of object lookups and cache hit rates for a checkout operation.

Reviewed By: simpkins

Differential Revision: D19191201

fbshipit-source-id: 5e9ad501e704810f072dabcda3fce86d027c452e
2020-02-05 16:05:30 -08:00
Chad Austin
58f352b807 count fetch statistics during diff and checkout
Summary:
During checkout and stats, count every object fetch and which level of
cache it was served from.

Reviewed By: simpkins

Differential Revision: D19186333

fbshipit-source-id: fc0a74db297b9c723682e245996a7befd762f933
2020-02-05 16:05:29 -08:00
svcscm
34732ab62c Updating submodules
Summary:
GitHub commits:

5c47caf5cc
00647a8d09

Reviewed By: yns88

fbshipit-source-id: 5537868538a2819a2bb26784a51619c5b06f9c33
2020-02-05 15:47:51 -08:00
Jeremy Fitzhardinge
7ead0e29e4 third-party/rust: version bump
Summary:
Update everything to current latest semver-compat version

Once small update needed in scm/mononoke/fastreplay

allow-large-files
ignore-conflict-markers

Reviewed By: dtolnay

Differential Revision: D19731863

fbshipit-source-id: f0bf79f8a836044a55473e831b1877ce8a43ec26
2020-02-05 15:03:32 -08:00
Xavier Deguillard
6ea4bb998e revisionstore: move memcache initialization to a background thread
Summary:
As initializing the memcache client takes ~0.7s, let's move it to a background
thread as to not impact Mercurial startup time. This diff uses ArcSwap in
order to reduce the overhead of the very common read paths as much as possible.
Using Mutex or RwLock instead would have caused unecessary contention.

Reviewed By: DurhamG

Differential Revision: D19518693

fbshipit-source-id: 886e9b86813fda6ff005ccce99659890026f643a
2020-02-05 14:01:54 -08:00
Xavier Deguillard
b8947748b5 pyrevisionstore: expose the memcache client to python
Summary:
This allows the Python code to build a memcache client and build ContentStore
and MetadataStore with it.

Reviewed By: DurhamG

Differential Revision: D19518694

fbshipit-source-id: d932fd5223ccfdf37db69cbb54a11a6571312709
2020-02-05 14:01:54 -08:00
Xavier Deguillard
920ea27a17 revisionstore: add memcache client
Summary:
This enables an in-process memcache client for the Rust
ContentStore/MetadataStore. For now, this implementation is lacking several
necessary optimization:
 - Start-up time is always slowed down by ~0.7s, the initialization will be
   moved to a background thread
 - Writing data to memcache is blocking and will be moved to a background
   thread too.
 - Prefetching data does a roundtrip to memcache for every key, batching
   memcache APIs will be added.

Compared to the existing hg_memcache_client, this implementation is both
significantly shorter and do not exhibit some of the pathological behavior of
having to flush the indexedlog for every fetched blob when used in Eden.

Reviewed By: DurhamG

Differential Revision: D19518696

fbshipit-source-id: 4725447d13e7eddd9586135c2511e13ddb921771
2020-02-05 14:01:53 -08:00
Chad Austin
fc07c3b6e6 add an ObjectFetchContext interface
Summary:
Add a fetch context interface to ObjectStore that allows tracing cache
hits, backing store fetches, and fetch durations in the context of a
diff or checkout operation.

Reviewed By: simpkins

Differential Revision: D19135625

fbshipit-source-id: d0d8f134b1c89f7ba4971a404a46a69a1704ba5c
2020-02-05 13:15:01 -08:00
svcscm
f2388203fe Updating submodules
Summary:
GitHub commits:

5ec45f3297
b0ac8453fd
c173a4b14d

Reviewed By: yns88

fbshipit-source-id: bbd8042fb95efc022ecbaa0997b8cd8b2b704a44
2020-02-05 11:32:01 -08:00
Xavier Deguillard
b192e0b54b demandimport: re-enable
Summary:
Partially backport upstream
https://www.mercurial-scm.org/repo/hg/rev/f81c17ec303c to enable lazy loading
of python code contained in edenscmdeps3.zip.

Also, temporarily disabling the demandimport on Python3 is a bit tricky, for
the reasons mentioned in the deactivated function. Thus, instead of using the
disabled function, let's use the deactivated one.

Reviewed By: DurhamG

Differential Revision: D19672866

fbshipit-source-id: c9e39ed044121d962af1cc46745bdec72629c579
2020-02-05 11:23:29 -08:00
Chad Austin
80b1296a05 add helper for setting default values in toml tables
Summary:
cpptoml has traversal functionality for table reads, but not for
writes. Add a helper function for reading a config value and updating
the TOML table if it's unset.

Reviewed By: fanzeyi

Differential Revision: D19671264

fbshipit-source-id: e2b78d338af35d51fddaa258b7f45f8966d00a26
2020-02-05 11:20:26 -08:00
Puneet Kaushik
9a132380fc Update the state transitions in Windows EdenMount
Summary: This diff updates the states transitions in the EdenMount on Windows. It starts as State::UNINITIALIZED and transitions to State::RUNNING when the start is called. It will transition to State::SHUT_DOWN on stop or destroy. Destroy will put it in State::DESTROYING, from which it should not return.

Reviewed By: chadaustin

Differential Revision: D19559271

fbshipit-source-id: d76983cab610cb9b2c896807cf1fe49c357f8095
2020-02-05 10:37:00 -08:00
Michael Devine
0dceab8e95 New custom immutable revision object to track commit conversions: conversionrevision
Summary:
The Mercurial convert extension passes around parameters to indicate a commit that needs to be converted from source to sink. For existing converters like Git, this is a simple 1:1 conversion: a commit in the source gets mapped to a commit in the sink, and so they use the source commit hash (sometimes called rev or version in the API) to represent the commit to be converted.

Our converter is much more complicated. Source commits get converted multiple times to account for different ways of mounting it into the destination file system and commit history. The commits are also coming from multiple source Git projects. This means that we need multiple pieces of data to represent a single commit conversion action.

Thus far, we've been trying to meet part of this need by using concatenated strings of (variant, commithash). This logic is breaking down as we add more fields. This commit adds a new immutable object called "conversionrevision" that represents the (variant, source commit hash, source project name, destination path) that is the unique identifier for the individual commit conversions we need to perform. This commit also includes logic for serializing and deserializing these objects as strings (useful because the converter seems to require commit IDs to be strings) and unit tests for all of the new logic.

Reviewed By: tchebb

Differential Revision: D19606867

fbshipit-source-id: 77815ca858f841d452874e95dfa3b351bafde306
2020-02-05 10:20:19 -08:00
Saurabh Singh
cbf6db3c58 py3: mark tests failing for Python 3 as requiring Python 2
Reviewed By: xavierd

Differential Revision: D19744346

fbshipit-source-id: b9defccfb396218b2d2fc4d4a2aee438468dcc60
2020-02-05 09:41:55 -08:00
Durham Goode
d0e41ff822 py3: fix test-remotenames-basic.t on Windows
Summary:
When I removed an hggit test case from this test last week, it caused
it to stop being skipped and therefore runs on Windows. The filterpwd magic
doesn't work there, and it's unnecessary, so let's just drop it.

Reviewed By: singhsrb, xavierd

Differential Revision: D19744329

fbshipit-source-id: 21f5c67d4fa7a61f14bbacd78756e5397fd6c819
2020-02-05 09:32:36 -08:00
Saurabh Singh
de006ecee1 test-rebase-inmemory-mergedriver: make the test output more stable
Summary:
Write output using `ui` object instead of using `print` to improve
robustness.

Reviewed By: xavierd

Differential Revision: D19743159

fbshipit-source-id: d0e8d581c65a79784b9843d691c4802ec37d5933
2020-02-05 08:50:54 -08:00
Pavel Aslanov
24998bbc19 remove BlobRepo::upload_file
Summary: remove `BlobRepo::upload_file`

Reviewed By: krallin

Differential Revision: D19742438

fbshipit-source-id: 319e4a55f940ec74e0971dc1ceb54da986f1280a
2020-02-05 08:21:01 -08:00
Pavel Aslanov
a847531484 remove BlobRepo::get_bonsai_changeset
Summary: remove `BlobRepo::get_bonsai_changeset`

Reviewed By: farnz

Differential Revision: D19742232

fbshipit-source-id: 760ef8d89f7a42feed18aec94c08b2a002f14be4
2020-02-05 07:43:55 -08:00
Mark Thomas
47f125dab3 scs_server: log client headers to scuba
Summary: Log `client_id`, `client_correlator`, `client_type` and `proxy_client_id` to scuba.

Reviewed By: krallin

Differential Revision: D19741717

fbshipit-source-id: c5dea17900141de2f43802bb36839bc7c8a824f8
2020-02-05 07:31:06 -08:00
Thomas Orozco
84aebf00f4 mononoke/fastreplay: sample Scuba logging
Summary:
This updates fastreplay to support sampling of the samples we log to Scuba.
This lets us control the volume we log to Scuba.

Reviewed By: farnz

Differential Revision: D19722223

fbshipit-source-id: 2e43f201a3e5930f5f6a29749c35e0e0dea341d2
2020-02-05 06:24:01 -08:00
Thomas Orozco
142b803911 common/rust/scuba: add support for sampling
Summary:
This adds support for sampling scuba samples, and assigns their weight properly
so that Scuba will report the right number of hits. The sampling is determined
at the point where `sampled()` is called, which means we can e.g. create a
Scuba sample and thread it through for a whole request and either everything
will be sampled, or nothing.

I haven't refactored our Multiplex blob to use this just yet, since it's
architecturally a bit trickier to use this there.

Note: I'll rebase on D19599013 if we land that first.

Reviewed By: ahornby

Differential Revision: D19722224

fbshipit-source-id: b5464937a29f73868fbdc8396d507bac1555af78
2020-02-05 06:24:00 -08:00
Pavel Aslanov
6a3b3172f4 remove BlobRepo::get_file_content*
Summary: remove `BlobRepo::get_file_content*`

Reviewed By: farnz

Differential Revision: D19724764

fbshipit-source-id: d334a97a443fec59f5e155c6bfc01d87a158ea3a
2020-02-05 05:32:07 -08:00
svcscm
a092c71abc Updating submodules
Summary:
GitHub commits:

27f6f2f7b1
72c5450838

Reviewed By: yns88

fbshipit-source-id: de5347420f30bf061d65bf0326ca52381aa5fdfe
2020-02-05 00:27:14 -08:00
Jun Wu
1bcfec407d py3: remove pycompat3
Summary:
Use `abc.ABC` from Python 3 stdlib directly. The definition matches
`pycompat3.py`:

  class ABC(metaclass=ABCMeta):
      pass

The following changes are reverted since they're no longer necessary:

  D19732319 "[hg] py3: fix windows build"
  D19703778 "[hg] py3: exclude mercurial/pycompat3.py from Python 2 builds"
  D19703779 "[hg] py3: exclude pycompat3.py from Buck-based Python 2 builds"

Reviewed By: simpkins, singhsrb

Differential Revision: D19739075

fbshipit-source-id: 8c1e3727e8a88ff5f7232270d528d690523b1824
2020-02-04 22:15:16 -08:00