Summary:
On macOS, ninja only provides prebuilt Intel binaries, not arm64 ones. Since we
need to have a native arm64 ninja to be able to build binaries for the M1,
let's compile it from scratch on macOS too. Compiling it takes less than 30s so
it shouldn't add any notable cost to any builds.
Reviewed By: genevievehelsel
Differential Revision: D26322029
fbshipit-source-id: 1bbeeac2a3f0ba07c477a2b33f8878a91ccaec0e
Summary:
So right now we get the last timestamp at which we logged, then do a compare
exchange and log only if that succeeds. So we're ... racing with another
thread being on the brink of logging too?
What is that possibly supposed to achieve? Let's remove it.
While in there, also clean up the imports a bit, fix up the i64 -> u64
conversion, and remove a useless borrow.
Reviewed By: ahornby
Differential Revision: D26337990
fbshipit-source-id: a17f6613f1fb5fa58e4131181c230006af06f003
Summary: Like it says in the title. This is useful.
Reviewed By: StanislavGlebik
Differential Revision: D26318916
fbshipit-source-id: 22160d1c9b01ace2e2e6e0cd2d41071465884325
Summary:
This updates hgcli to allow us to run without fbinit (and therefore no logging
to Scuba), with a 1% chance to enable it.
Reviewed By: mitrandir77
Differential Revision: D26339638
fbshipit-source-id: 5253fbfea6aa91bc25be7cb52022b43232dbe65a
Summary: Loading an Acl Checker is expensive. Don't do it given we don't use it.
Reviewed By: HarveyHunt
Differential Revision: D26337699
fbshipit-source-id: bc48ac44b3301db5bd03a5d2006b92912b7e6fd0
Summary:
This makes this function run >5mins on bookmarks validator job. This diff fixes
it
Reviewed By: krallin
Differential Revision: D26338710
fbshipit-source-id: 7beeb6689d51ec6c0fa27174f5bd2c272c0f0015
Summary: It will help users better understand latencies - they will know the region they connect to.
Reviewed By: ahornby
Differential Revision: D26249531
fbshipit-source-id: b77c17c19efb93e5c7e83926f964cf42ec3326fe
Summary: Give data some time to appear in other stores before triggering repair action.
Differential Revision: D26123924
fbshipit-source-id: 71dc84dc243ec5452aaa7686882c0a176bcb0dd8
Summary:
Make the walker use blobstore_factory::make_blobstore like other clients do.
This allows blobstore_factory::{make_blobstore_multiplexed, make_blobstore_put_ops} to be hidden.
Reviewed By: krallin
Differential Revision: D25980596
fbshipit-source-id: 2417ed11d4edc611d19e003122acec6b7ebd341d
Summary: Remove these as common cmdlib ones are preferred.
Reviewed By: krallin
Differential Revision: D25976407
fbshipit-source-id: 30295950e51ad1fb2d88cf396b6a7c7353d17577
Summary:
I've been trying to get EdenFS to compile on an M1 mac, and openssl only
support these starting with 1.1.1i. From their changelog:
*) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target.
[Stuart Carnie]
Let's start by upgrading openssl.
Reviewed By: fanzeyi
Differential Revision: D26318433
fbshipit-source-id: dfe1a06ee7061dfcd026b0347eb050155895ebd9
Summary:
The test is broken in master. I might be using a stale binary running that
test in D26245424 (1392673a95). Revert the test to before D26245424 (1392673a95) fixes it.
Reviewed By: sfilipco
Differential Revision: D26321855
fbshipit-source-id: 4ada61211d3b354ae6f94f7fc8364f4550e9aeb8
Summary:
The high load on our hg servers seems to be coming from the excessive number of
threads allocated by hgcli. Let's default to 1.
Reviewed By: krallin
Differential Revision: D26314594
fbshipit-source-id: c4a15b3398ff4b39e98b3e75e7f9d34a0a12f5ee
Summary:
This diff adds method to FileContentFetcher to get a file changes between two changesets using hg manifests. The method returns a list of file changes, where added/changed paths contain content ids.
The API is needed for Owners files hook.
Reviewed By: StanislavGlebik
Differential Revision: D26040536
fbshipit-source-id: 816194a494f0c77e8ea9aef729fd6161eed904ff
Summary:
Owners file hook requires access to the files in master branch.
This diff extends `FileContentFetcher` to have API for finding files in the master commit. The methods are implemented for the blobrepo. They derive unode manifest for the master bookmark and search given file paths in the manifest, returning list of file content ids.
Reviewed By: StanislavGlebik
Differential Revision: D24936674
fbshipit-source-id: c63931c073b6148972bc8e81126f7c4786db920a
Summary:
Introduce `FallbackStore`, a newstore combinator which implements the `ReadStore` trait and first checks a "preferred" store for the provided keys, before falling back to a "fallback" store. The combinator requires that both stores share the same `Key` type, but allows a user provided "value adapter function" to convert from the fallback store's value type to the preferred store's value type.
Currently `FallbackStore` does not support writing missing values to the preferred store - this functionality will be introduced in a future change.
Reviewed By: DurhamG
Differential Revision: D26203146
fbshipit-source-id: 0e99110f93130ff30c95cce15e3dc7873616519c
Summary: Introduce a new stream combinator, `select_drop`, based on `futures::stream::select`, which performs the same function except dropping the contained streams when they terminate, rather than when the combined stream is exhausted. This prevents a deadlock in cases where one stream will not terminate until the other terminates.
Reviewed By: DurhamG
Differential Revision: D26139816
fbshipit-source-id: d28da32244a215741476e1c3882154ea9e3116a5
Summary: Introduce a minimal version of an async, typed `ReadStore` trait and corresponding `EdenApi` implementation, along with a debug command, `debugnewstore` to exercise it.
Reviewed By: DurhamG
Differential Revision: D26050641
fbshipit-source-id: 2c14c3715e7067f9ecd1e649e6ca146a1ce249bf
Summary: Add skeleton manifests to the derived data types that the warm bookmarks cache keeps warm.
Reviewed By: krallin
Differential Revision: D26312403
fbshipit-source-id: 26bafee69ac0c38c1d49b29cdeb4968c37243271
Summary: Limit durations in derived data logging to two decimal places.
Reviewed By: krallin
Differential Revision: D26311139
fbshipit-source-id: 0f317d9c15c8425ad0591cbe7f07063c74e081b7
Summary:
The warning is noisy if the wait is short and can make users dislike commit cloud.
Make sure we don't print the warning earlier than defaultlockwaitwarntimeout.
This is a follow up on D25587459 (18b8c66439) that doesn't fully work if warntimeout is passed equal to zero.
The default threshold has been introduced earlier in D25587459 (18b8c66439). This is just a fix.
A new test has been added. Also, the api should allow to pass value 0 meaning to show the warning always.
Reviewed By: quark-zju
Differential Revision: D26251321
fbshipit-source-id: c3beb5fec6a65f1816f667df70c1a39dd65ef083
Summary:
This is a preparation for potential necessity of IO being done by this trait and its implementors.
We think the IO might be needed if we move commit sync config storage from `Configerator` into xdb, or some place else. To be clear, I personally am not certain we'll *need* this, but in any case, asyncifying the trait does not seem like a risky thing here (because we usually have only 0-2 sync functions in the stack above `LiveCommitSyncConfig` accessors, so it does not require large-scale code flow changes or anything).
I intentionally did not touch the push-redirection accessors, as those I don't think will ever move away from configerator.
Reviewed By: StanislavGlebik
Differential Revision: D26275905
fbshipit-source-id: 1bfdca087434d475d50032dd47dd94f16be051f9
Summary:
Add support for directly throttling blobstores based on read and write bandwidth used.
Read bytes throttling can only approximate given we only know the size *after* the inner Blobstore::get().
Reviewed By: krallin
Differential Revision: D26022763
fbshipit-source-id: b8019f53bda326117511aa659dcdab2a958dbd27
Summary:
MSVC is broken as it doesn't understand the various macros used to generate
XdrTrait for specific types, and I can't figure out a way to make that work.
Even if I provide dummy version of these, the buck build breaks due to glog
trying to redefine the ERROR symbol that some Microsoft headers contain. For
now, let's just ifdef it out since it's unlikely that we're going to be using
NFS on Windows anytime soon.
Reviewed By: singhsrb
Differential Revision: D26293519
fbshipit-source-id: bbaf325c7d1f1688327708360244797a6d48179e
Summary:
This matches the Rust behavior and is useful for filtering
because the env logger syntax applies to target:
% RUST_LOG=edenscm.hgext.debugshell=info lhg dbsh
In [1]: from edenscm import tracing
In [2]: tracing.info('foo')
[2021-02-05T19:21:41.082Z INFO edenscm.hgext.debugshell] message="foo"
Reviewed By: kulshrax
Differential Revision: D26282053
fbshipit-source-id: 8ee9e82b955835b24c49f9bf81c7a3aec7a65a33
Summary:
Like it says in the title. Let's add some basic throttling control here, in
line with what we have in Mononoke Server. The numbers don't quite match up
since fetches in EdenAPI don't include linknodes or history, but this should be
better than nothing and sufficient for now, and makes sense to have with
EdenAPI & Mononoke Server running in the same process.
Reviewed By: HarveyHunt
Differential Revision: D26250746
fbshipit-source-id: 338eda4341a163d0d915f10bf45fc7f40c74fc69
Summary:
Like it says in the title. I'd like to access our load limiter from there and
this is a good way to do it.
Note that EdenAPI doesn't have client hostnames when we instantiate the load
limiter, but we also don't truly need it because our client identities include
the hostprefix (at least in cases where a reverse lookup stands a chance of
succeeding, i.e. in prod).
Reviewed By: HarveyHunt
Differential Revision: D26250743
fbshipit-source-id: d1ad062d2967bfe28b3ddc164cac977d297d1b6a
Summary:
Like it says in the title. We can't do this for identities extracted from SSH
(because it's not there), but for traffic that comes to us via TLS, we can! So,
let's use it.
Reviewed By: johansglock
Differential Revision: D26250745
fbshipit-source-id: 9d2315712e164c5e21dbea87652a1d88dfd9bcda