Summary: I think we prefer dashes over underscores for config flags. These config values aren't actually configured anywhere, so it should be safe to change.
Differential Revision: D34592509
fbshipit-source-id: 4a5e808b492f65b3baa954ce37d66e8ab3bb5770
Summary:
This moves code around and mostly removes TrackedProcess to just be a BTreeMap.
As a bonus, there is a small bug fix where the last access time was always
updated, while it will only be when there has been an access or a fetch.
Reviewed By: genevievehelsel
Differential Revision: D34620287
fbshipit-source-id: 08141b84a02d1cf53be2ee69b32f577c6959d228
Summary:
We want to load the children overlay, not its parent. In the case where only
materialized files were requested, the code would infinitively recurse onto
non-loaded but materialized inodes.
Reviewed By: chadaustin
Differential Revision: D34775507
fbshipit-source-id: ed5f4a2cba5fb3cfd03990b6b8696d65e84dde72
Summary:
When querying the state of EdenFS via the pid file, if EdenFS doesn't respond
to thrift but is still alive we return a fb303_status.STOPPED status. We should
be running the non-healthy checks in that case.
Reviewed By: genevievehelsel
Differential Revision: D34741798
fbshipit-source-id: 9ddd5b20c0e047d9432aa941994e6f97a55440be
Summary:
This diff adds the Python/Rust glue necessary to start implementing the status command in Rust. Specifically, it allows swapping out the implementation of the "dirstate status" with a Rust function, by enabling the `workingcopy.ruststatus` config key.
The status command actually has a few different pieces to it. The full status command can take two arbitrary revisions (or a revision and the "working copy") and produce a status-formatted diff between the two. The first piece (stubbed out here) computes the status between the current revision (`.`) and the working copy.
The end goal is to have the full status functionality implemented in Rust. I chose to start here (by replacing the "dirstate status") because it 1) is something that needs to be implemented anyway and 2) allows us to test it with or without watchman (the pending changes from either concrete implementation are used), even though only the without-watchman case is implemented in Rust. Eventually, the pending changes logic will be called from Rust, rather than called in Python (potentially calling back into Rust) and transferred over to Python. An EdenFS backed repo will not work (yet) -- it bypasses this logic entirely.
In the mean time, to demonstrate that the glue works, I've implemented a basic, incorrect `status` implementation in Rust. Any files modified (or added) on the filesystem are treated as "modified", and any files deleted are treated as "removed".
Reviewed By: DurhamG
Differential Revision: D34623557
fbshipit-source-id: c16e15f5c6596c494a5a385da0ed244d7f27207e
Summary: VSCode can't use watchman to watch the current location .hg/runlog/watchfile since watchman only lets you watch files at the top level of .hg. Move the runlog watchfile up to .hg/runlog_watchfile to compensate.
Reviewed By: DurhamG, quark-zju
Differential Revision: D34767447
fbshipit-source-id: 67f660d4255603402b0d846081db9034bced10ff
Summary:
`choicetuple` currently assumes that the choice will be one character.
In cases where choice is a number >= 10, we see this behavior: {P485111360}
as the entered choice will never match the list of accepted choices.
The proposed fix is to check whether the non-`&` choice is a number
string, if so use that as the choice.
Reviewed By: yancouto
Differential Revision: D34705485
fbshipit-source-id: c538ae19b9a75077b63808f0574f7ac22fef7b5b
Summary: Now we have native prefetch everywhere, it's time to clean HgBackingStore up.
Reviewed By: xavierd
Differential Revision: D34655532
fbshipit-source-id: b57dfbd4efcc0a5a0b9abc8933fc7b00653bfc9c
Summary: This function can be moved to simplify the logic a bit.
Reviewed By: genevievehelsel
Differential Revision: D34654888
fbshipit-source-id: ad41916c311594d335112ac8d5c950737f4adadd
Summary:
Section 5.3.5 in the new C++ Concurrency Technical Specification 2
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/n4895.pdf) specifies
the following function:
rcu_domain& rcu_default_domain() noexcept;
The folly RCU header file currently exposes a very similar rcu_default_domain()
function that returns a pointer to an rcu_domain rather than a reference. This
change updates the folly RCU implementation to instead return a reference, and
updates the few callers in fbcode that were invoking it to instead expect a
reference.
Note that in doing so, we also update rcu_barrier(), rcu_retire(), and
rcu_obj_base::retire() to adhere to the new standard.
Reviewed By: yfeldblum
Differential Revision: D34622786
fbshipit-source-id: 4460ce563f9e9ef4d65cdd517707297c23091c80
Summary:
Sometimes on Windows, we receive user reports that `edenfsctl` hangs indefinitely. We would like to see where it hangs in these cases. Adding this will allow us to see the traceback when ctrl-c edenfsctl with the environment variable set.
Note `--debug` is shared with Rust edenfsctl (where it enables verbose logging).
Reviewed By: xavierd
Differential Revision: D34731381
fbshipit-source-id: 24477d05c01d353f9f7a45fc3c5d28f29b62e3be
Summary:
The team is planning on using buck as an alias to buck2, so let's use buck1 explicitly where necessary.
Turns out most scripts for buck1 just use a path, I just found this one that actually uses buck1.
Reviewed By: mitrandir77
Differential Revision: D34786872
fbshipit-source-id: 33083416ac10630af1ea84dbed8d38e9b7b9e30b
Summary: Add a bookmarks subcommand to the new admin tool, migrated from the old admin tool.
Reviewed By: farnz
Differential Revision: D34620505
fbshipit-source-id: 151efa5e9f98a18ba521887b703508880fd23465
Summary:
This diff adds a helper function, `pystatus::to_python_status`, that converts a Rust `Status` into a proper `scmutil.status`, in preparation for implementing the status functionality in Rust.
This wasn't added to the `status` Rust/Python class (which essentially just wraps a Rust Status) because of inherent incompatibilities: the returned Python status *must* hold mutable lists (various Python code mutates them when consuming the object). The easiest way to do this ended up being constructing a `scmutil.status` object from Rust.
Reviewed By: DurhamG
Differential Revision: D34619611
fbshipit-source-id: 63ce6647d6e14be76ecb0c4fa8a2f278ac977b1a
Summary: When the Rust `Status` struct was originally created, it had 5 different `FileStatus` variants. However, `hg` actually considers two more: `ignored` and `clean` (although these are only revealed in `hg status` if the user explicitly requests them). In preparation for a Rust-native status command, this diff adds the missing variants. It also adds a bit of documentation to the `FileStatus` enum explaining (in what I believe to be clear terms) what each of them mean.
Reviewed By: DurhamG
Differential Revision: D34619612
fbshipit-source-id: fa07e9aab78e51a5aecf19f77bb5c5310e87df8a
Summary:
There are two options for cloning with segmentsclone - one using edenapi from the destrepo and one
using the srcpeer interface. The latter used to be used for tests, but now the
former handles both prod behavior and test behavior, so the obsolete call can
be removed.
Reviewed By: DurhamG
Differential Revision: D34733142
fbshipit-source-id: 2bf9316465e13be4cea6c3c12bd4e812392aac83
Summary:
The SystemTime type isn't guaranteed to be monotonic, and thus getting an
elapsed time from it can fail and thus crash minitop. Since we do not need the
last access time to be tied to an actual wall clock, we can simply use a
simpler monotonic clock: Instant.
Reviewed By: fanzeyi
Differential Revision: D34620286
fbshipit-source-id: e37e5eb6b57b2de78cadef7463e298a37df078de
Summary:
There is a small bug in minitop where the cursor will never move from its
current row due to using scroll directive exclusively. In order to go to the
next row, the cursor needs to be moved down. To simplify the code, a Cursor
abstraction is added which detects when the end of the terminal is reached and
decides whether to scroll, or to go to the next line.
Reviewed By: genevievehelsel
Differential Revision: D34600897
fbshipit-source-id: 480ea919af93a8086def368dbf84afe7672f1a87
Summary:
When migrating to the new hg:object-id-format hash schemes, EdenFS
would sometimes report spurious conflicts from `hg update`. The issue
is that checkout treated the object ID as a proxy for equivalence,
which is not generally true. In that case, let's actually load the
inode in order to compare SHA-1s.
Reviewed By: xavierd
Differential Revision: D34742471
fbshipit-source-id: 230eed0d2d3e45315481a97e32deb41aa040d445
Summary: The invocation of `eden doctor` within rage is causing `eden rage` to hang on Windows when an existing eden mount is hanging. See T113845692 for more info.
Reviewed By: xavierd
Differential Revision: D34741692
fbshipit-source-id: 90d3ed17cec90c8d7b00e9e8315d6d99d21ff83d
Summary: Some users are seeing too many rewrites to the `reponame` file in their filesystems. This was caused by not checking if the file already existed beforehand.
Reviewed By: xavierd
Differential Revision: D34741781
fbshipit-source-id: 4f83aa2d60aa2cd0b823dfa93237a36a37864f80
Summary:
We should not retry when there are missing or expired certs.
Unfortunately we were, because we get a generic TLS RecvError, so we couldn't
distinguish between a connection failure and a cert issue. This diff adds some
hacky error-message based heuristic to determine what kind of TLS error we got,
so we can retry on some but not others.
I also got rid of the existing ssl_in_message condition, since it seemed to be a
no-op.
Reviewed By: kulshrax
Differential Revision: D34734592
fbshipit-source-id: a71b90d15784b39e7dc61dad460aacf97187f63e
Summary:
Presently, the bubble and underlying ephemeral store logic insist only on blobstore trait implementation for the basic needs of creating a bubble and adding content to it. This diff includes changes necessary to ensure the underlying raw stores now implement plain blobstore + enumeration + deletion traits to be used as a backing store for bubbles. Key changes in this diff include:
- Introduced trait `BlobstoreEnumerableWithUnlink` to represent blobstores whose keys can be enumerated and deleted.
- Updated `ephemeral_store` facet creation to use a blobstore implementing `BlobstoreEnumerableWithUnlink`.
- Implemented `unlink()` functionality in `PackBlob` to make it an enumerable + deletable blobstore.
- Implement `enumerate()` functionality in `ThriftManifoldBlob` to make it an enumerable + deletable blobstore.
- Added functions to query the underlying SQL store for expired bubbles and update the expiry status of bubbles.
- Added logic to parse configs for `PackBlob`, `ManifoldBlob` and `FileBlob` to construct them as `dyn BlobstoreEnumerableWithUnlink`.
Reviewed By: yancouto
Differential Revision: D34641524
fbshipit-source-id: ddc498e1b10e24c309b5bee6e8e380bf5ea530db
Summary:
I noticed that there are some build warnings for the OSS build:
```
warning: unused import: `anyhow::Result`
--> cmdlib/log/../logging/glog.rs:8:5
|
8 | use anyhow::Result;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `fbinit::FacebookInit`
--> cmdlib/log/../logging/glog.rs:9:5
|
9 | use fbinit::FacebookInit;
| ^^^^^^^^^^^^^^^^^^^^
warning: unused import: `slog::Level`
--> cmdlib/log/../logging/glog.rs:10:5
|
10 | use slog::Level;
| ^^^^^^^^^^^
```
and:
```
warning: unreachable expression
--> cmdlib/caching/src/lib.rs:42:5
|
34 | unimplemented!("Initialization of cachelib works only for fbcode builds")
| ------------------------------------------------------------------------- any code following this expression is unreachable
...
42 | / if args.blobstore_cachelib_only {
43 | | Caching::CachelibOnlyBlobstore(args.cachelib_shards)
44 | | } else {
45 | | Caching::Enabled(args.cachelib_shards)
46 | | }
| |_____^ unreachable expression
|
= note: `#[warn(unreachable_code)]` on by default
```
This diff fixes them by moving code around and only exposing the `glog` module
during an internal build.
Reviewed By: mzr
Differential Revision: D34750036
fbshipit-source-id: 5c7a7a80a8de922b44364c139d104783fb2ae363
Summary:
VFS already has logic to write symlinks and executables, let's depend on those instead of building our own, which means less surface for bugs.
We still need to fixup the executable permissions for the stuff that we "optimised out", but let's do that in Rust with VFS instead of in python.
This gets rid of some weird issue I've seen where it fails to restore a snapshot, but wasn't able to pinpoint the cause.
Reviewed By: mitrandir77
Differential Revision: D34643939
fbshipit-source-id: acab6f9f33e19237d95861087ba57d610731f8ab
Summary:
The derive function used a `oneshot` channel to send back the response, however, this was not necessary, as we could just await the JoinHandle from the task it wanted the response from.
From a quick look in blame, it seems this is leftover from old to new futures migration, when doing this was probably harder.
This caused this function to sometimes swallow the real error and instead output "oneshot canceled" error, which is not great to debug.
Reviewed By: farnz
Differential Revision: D34720661
fbshipit-source-id: f3b936ffa6065a5bc927cbfb265a0ae7a5b51330
Summary: When we know we have a mutable rename on a commit, we'll look up all sorts of paths. Avoid hitting MySQL repeatedly for things we can cache, same as we did for commits having mutable renames at all.
Reviewed By: yancouto
Differential Revision: D34693551
fbshipit-source-id: ad31dc97c214d2778a75685a5af2b88937762399
Summary:
Extract the commit id parsing and printing functions from the convert subcommand
so that they can be used in other subcommands. Generalise the command so we can
convert to multiple identity schemes.
Reviewed By: farnz
Differential Revision: D34620504
fbshipit-source-id: b213e1eb68b241a02beb188e1887db1b08ee38ff
Summary: These messages are noisy on command line tools. Make them debug logs.
Reviewed By: HarveyHunt
Differential Revision: D34701735
fbshipit-source-id: 2338836306e9d06425a406a2ff467849395ae491
Summary:
Before Mononoke was the source of truth for hg repos, D13804545 (5ff6db64ef)
updated the hg client to pass a pushvar that allowed commits to be accepted to
a read only repo.
Since then, a couple of things have changed:
- Mononoke is the source of truth for all repos
- The `BYPASS_READONLY` pushvar is only checked when a bookmark move happens
(D34108102 (71f58e3133))
This means that providing the pushvar is no longer necessary. Remove it from
the code.
In the future, I want to lock down use of the `BYPASS_READONLY` pushvar so that
only authorised users can use it. The first step of that is to make sure it's
only being passed when needed.
Reviewed By: farnz
Differential Revision: D34109906
fbshipit-source-id: 71c188d2322ab8cfecbe5aa7266654c2b56a4491
Summary:
Two improvements I used to create the test plan for D34556462 (8d9dcc1839)
- We should add dependencies of derived data when regenerating, otherwise it just fails.
- Not printing the warning once per commit verified, but once overall.
Reviewed By: farnz
Differential Revision: D34615406
fbshipit-source-id: 05f39085f3ac10b73618f36a5691201c2fc7bc71
Summary: Makes it easy to change when we need to invalidate the cache
Differential Revision: D34553656
fbshipit-source-id: e6c63f11f21b851fa385906073062134ebefe9fc
Summary: We expect most commits to not have mutable renames, and only a few to have them
Differential Revision: D34527806
fbshipit-source-id: ec96d0f645b4db46b7c29f9df22fa80ddedb944a
Summary: This doubles MySQL queries for now, but gives me a powerful point for caching (the `has_rename` method).
Reviewed By: mitrandir77
Differential Revision: D34527804
fbshipit-source-id: 762cd6644403cbb7fbf26369a13e726df1d4b58c
Summary: I'm going to use TTLs in Mutable Renames caching. Make it work
Reviewed By: mitrandir77
Differential Revision: D34527803
fbshipit-source-id: 3b53ee4e89153814981dcb68b838ee86f5ac7388
Summary:
Let's be consistent and use EdenFS everywhere in our user facing documentation
and messages.
Reviewed By: fanzeyi
Differential Revision: D34692175
fbshipit-source-id: 6346bd9ac3516199fe47123d81833d2c457efbbc
Summary:
Due to changes in EdenFS architecture, recursive calls into EdenFS will no
longer lead to ERROR_ACCESS_DENIED errors, thus this is dead code, let's remove
it.
Reviewed By: chadaustin
Differential Revision: D34464273
fbshipit-source-id: e52560d11bf2b3e11742c6bf7b63b6550ffd3cc4
Summary:
During an `hg update` Mercurial complained about the following error:
error updating some/path: class std::system_error: Couldn't add a placeholder for some/path: 0x80070003: Error (0x80070003) The system cannot find the path specified.
While this didn't stop the update operation, this could be misinterpreted by
users leading to an increase in oncall load. The root cause of this issue is
that EdenFS has loaded TreeInodes that aren't present on disk, and would thus
try to invalidate them.
Reviewed By: chadaustin
Differential Revision: D34464274
fbshipit-source-id: 9ee54c4ab7475a8be5891325d3d1b7151a0878ed
Summary:
Several tools rely on the .eden directory to be present to detect EdenFS.
Unfortunately, removing it by hand would make it disappear breaking these
tools. Thankfully ProjectedFS is providing ways to deny some rename/deletion
from happening.
Reviewed By: chadaustin
Differential Revision: D34433910
fbshipit-source-id: 4d37a6d9eeea3f16f4e1401beac20ef6d6dce71d
Summary: This diff will let Eden log more information like path and rootId.
Reviewed By: xavierd
Differential Revision: D34601083
fbshipit-source-id: f678b94edaf282cc20001ea6a104932fb3188ef7
Summary: Add a thrift method to call removeRecursively. Also enforce flushing invalidation at the end of the removal so the caller can see the up to date state.
Reviewed By: xavierd
Differential Revision: D34591442
fbshipit-source-id: 3fd1dd9d764097a6db614d59fc25792facb7b62d
Summary:
I recently changed scmstore fetch's to also have an error associated
with the key if we can't find the key. It turns out the get_missing
functionality assumed that no error was returned. Now get_missing fails if
anything is missing.
Let's fix that assumption to unbreak this
Differential Revision: D34698935
fbshipit-source-id: b9a1b16371b393b6862d3501035d032cddf97e29
Summary: Move the definition of the generic commits trait out of the pydag binding for usage in rust libraries. We're specifically looking to use this for rust changelog initialization and potentially pull.
Reviewed By: sggutier
Differential Revision: D34692193
fbshipit-source-id: 27c137e63d62cc1e1fe493630ea386bf50e8ca90
Summary:
Let's change `DeletedManifestCommon` so that `lookup` and `into_subentries` also take a blobstore and a context. For DMv1, that is not really necessary, but for v2 it will be, as they might need to fetch from the blobstore.
This also changes `lookup` to return an owned id, instead of a reference.
Reviewed By: mitrandir77
Differential Revision: D34617038
fbshipit-source-id: fe0601c51585ee4125cb94a2e35edc34910519f2
Summary: Let's change `DeletedManifestCommon` so that `lookup` and `into_subentries` are async. For DMv1, that is not really necessary, but for v2 it will be, as they might need to fetch from the blobstore.
Reviewed By: mitrandir77
Differential Revision: D34612094
fbshipit-source-id: 9f4823a429a88d714894ac7876e0ec464c618b41
Summary: Let's make it clearer what each method does.
Reviewed By: farnz
Differential Revision: D34611974
fbshipit-source-id: c04c400926d2ae42834f525e79a9a84ce50481e6
Summary:
The "Reloading redacted config..." message is noisy on command line programs.
Make it a debug log, so it doesn't get output by default.
Reviewed By: HarveyHunt
Differential Revision: D34620506
fbshipit-source-id: 46e60fb376d3db7588b8a16004746bdb4d93c76f
Summary:
by default, Windows PowerShell uses a blue background. I'm sure many users don't change this (but maybe they do and I'm weird).
The text is extremely hard to read if this is the case. We should update it to yellow on Windows (I highly doubt the yellow would clash with the typical PowerShell background).
Reviewed By: fanzeyi
Differential Revision: D34652357
fbshipit-source-id: b55d1912135b957629ffa027562e4a94db62e88f
Summary:
lei2022 needs this, but my patch was specifically for 0.11.4 and the
maintainer still hasn't acknowledged the pr
Reviewed By: lei2022
Differential Revision: D34643727
fbshipit-source-id: 0e3581788755053dec0f9ee97586fca6415e0cb2
Summary:
the healthchecks are failing because we're getting lots of SendError errors
caused by client disconnections. This diff makes it very clear in our logging
that those are disconnections, not actual failures.
Reviewed By: yancouto
Differential Revision: D34640946
fbshipit-source-id: 5eac2d755e9ff249be954c3ab5ff118817f61a1c
Summary:
EdenFS no longer uses 20-byte binary commit hashes and object
IDs. Instead, they're variable-width, and returned over Thrift in a
semi-human-readable format. Update the CLI to render them in a
reasonable way.
Reviewed By: kmancini
Differential Revision: D34573818
fbshipit-source-id: 11e987093db08ddae79e728435031230f5f2783e
Summary:
The BackingStore is responsible for converting between ObjectId and
human readable representations. Add an ObjectIdCodec just like
RootIdCodec to perform that conversion, and migrate our Thrift
handlers to use it.
Reviewed By: kmancini
Differential Revision: D33202497
fbshipit-source-id: cc499ec5e53c7626eb27528538c6e9d94404b468
Summary:
To make it possible to eliminate proxy hashes before we migrate
entirely to EdenAPI, introduce an intermediate object ID format that
includes a path.
Reviewed By: kmancini
Differential Revision: D33200747
fbshipit-source-id: 1ac95b545a6c478bca1b6f3026d1170d88e76ac4
Summary:
There will be two embedded hg object ID formats, so a single boolean
is not sufficient. Introduce an enumeration to prepare for the
intermediate representation.
Reviewed By: kmancini
Differential Revision: D33200681
fbshipit-source-id: 6ecc1488ef000fd3707f2f07094d7940e4a67d39
Summary:
It's possible under innocent refactoring to trip a false "Attempting
to get HgImporter from non-HgImporter thread" error. This is because
the HgImporterTestExecutor is an InlineExecutor, so the thread-local
must be set in `add`, not the constructor.
Reviewed By: xavierd
Differential Revision: D34626728
fbshipit-source-id: 267ca4ed9f4935edbb16dd425c7a5aa01b47b525
Summary:
When we migrated from Hash20 to ObjectId, we didn't fix the #include structure.
Clean that up.
Reviewed By: genevievehelsel
Differential Revision: D32977635
fbshipit-source-id: 202b02f01f22bc174c7559c22af081deb2945caa
Summary:
To avoid shutting the door on whether a BackingStore might want to
support a valid but empty ObjectID, change the hash property in
SerializedInodeMapEntry to optional.
Reviewed By: kmancini
Differential Revision: D32977106
fbshipit-source-id: 8549d2f7e187bfa5e642f8231ccbaebbc6a1ac39
Summary:
Context: D34551121 (6629440ff7)
This diff is a refactor of deleted manifest derivation, which shouldn't change correctness or functionality, but just build things in a different way that opens up space for optimisation in the future.
It changes current derivation by, when deleting a given deleted manifest node, instead of looking at **all** its children, trying to derive them (and possibly just copying the same id), we instead only look at the children that were modified on the current changeset (if doing a merge, we might still need to look at everything).
So, in terms of the recently implemented `DeletedManifestCommon` trait, instead of using a `::new` method to create an object, which takes a list of all its subentries, we instead use a new `::copy_and_add_subentries` method, which "copies" all subentries from the given node (the parent of the current node), and then just adds and removes a few other entries, which size should be bounded by the number of changes in the commit.
This will allow faster derivation in the future, when using sharded maps. Notice that for now, this doesn't really improve efficiency at all, as we **always load everything in memory** in deleted manifest v1.
When considering the steps on D34551121 (6629440ff7), this is part of step 2.
Reviewed By: markbt
Differential Revision: D34556462
fbshipit-source-id: 1c502ac0756eed270ef9b330f1c9284a775cc43f
Summary:
At least to me, `RemoveOrKeepLive` was not super clear, but after reading the code I realise it means we remove if it has become empty and "keep live" otherwise.
So I renamed it to make it a little clearer, and added some doc comments as well.
Reviewed By: markbt
Differential Revision: D34552369
fbshipit-source-id: 88d8e8638739b501eb64df06379dc2167aced00b
Summary:
This is a **refactor**. Currently we use a `parents: Vec<ManifestId>` on DF derivation. However, if two parents have the same id, it's fine to merge them in a single instance, so this diff starts using `HashSet` to do that automatically.
The code already used to do some "manual checking" for this, by checking if all elements were the same:
https://www.internalfb.com/code/fbsource/[df8bda9a02f6535970a490a77d4689854df06ce5]/fbcode/eden/mononoke/derived_data/deleted_files_manifest/derive.rs?lines=321-325
See D34551121 (6629440ff7) for high level context (not necessary for review)
Reviewed By: markbt
Differential Revision: D34551752
fbshipit-source-id: 8c4e4ce80786b85855726677bbd475e0ffae8c3f
Summary:
This is a **refactor** that creates a struct called `DeletedManifestDeriver` and moves related functions inside it.
Basically, this is a refactor to try to make it so we need to use less turbofish operators.
What was previously this:
```
fn fa<T: MyTrait>() {
fb::<T>();
}
fn fb<T: MyTrait>() {
fc::<T>();
}
fn fc<T: MyTrait>() {
... something
}
```
Becomes
```
struct MyStruct<T: MyTrait>(PhantomData<T>);
impl MyStruct {
fn fa() { Self::fb(); }
fn fb() { Self::fc(); }
fn fc() { ...something }
}
```
We only declare the generics once and everywhere else just use `Self::`. Something like this is already used [here](https://fburl.com/code/k492k4c4).
----
See D34551121 (6629440ff7) for high level idea (not necessary for review)
Reviewed By: markbt
Differential Revision: D34551400
fbshipit-source-id: 069b2cd4f74cf82effeb2bb5ffd332953f4bd748
Summary: Add a "watchfile" file that gets touched only when an interesting command is written out to the runlog. "interesting" is defined as not in the runlog.boring-commands config value.
Reviewed By: quark-zju
Differential Revision: D34592501
fbshipit-source-id: f4506ca06649da6adc223990dc83ffda99541a29
Summary: This hint was used for warning about `HGFORCEMETALOGROOT` being set during metalog initialization in Python. Since we recently moved this codepath to Rust (and currently don't have an equivalent for warnings), this hint is no longer necessary.
Differential Revision: D34588792
fbshipit-source-id: 1bb3aaaa7b403a91b874ca840ff7f483fa04b4db
Summary: This moves most of the logic of metalog initialization into Rust. The migration logic is kept in Python since we only have it for legacy reasons and don't plan to keep it in the future.
Differential Revision: D34528394
fbshipit-source-id: 561a8f06d90a697a9286781a43aeaca52a5fc7a2
Summary: As title mentioned, this will return a default nullpoint for context that does not implement getRequestInfo.
Reviewed By: xavierd
Differential Revision: D34253517
fbshipit-source-id: e37e2e3ec81985362e8d8b16b47b616bb3f2694c
Summary:
Previously, when building with `make local`, Cargo outputs two warnings:
```
warning: type `repo` should have an upper camel case name
--> /data/users/elipsitz/fbsource/fbcode/eden/scm/edenscmnative/bindings/modules/pyrepo/src/lib.rs:23:21
|
23 | py_class!(pub class repo |py| {
| ^^^^ help: convert the identifier to upper camel case: `Repo`
|
warning: field is never read: `debug`
--> /data/users/elipsitz/fbsource/fbcode/eden/scm/lib/edenapi/src/builder.rs:403:5
|
403 | pub(crate) debug: bool,
| ^^^^^^^^^^^^^^^^^^^^^^
|
```
This diff just explicitly allows them. For the first one, the other Python bindings files I found all do the same thing (allowing non-camel case names).
Perhaps we should disallow all warnings to ensure this doesn't happen again?
Differential Revision: D34584999
fbshipit-source-id: a41efb318fcac656b97bc6f0da36b1cd3f3ca360
Summary:
This is a **refactor** that creates a trait called `DeletedManifestCommon`, implements that for `DeletedManifest`, and then only uses the trait on the derive functions for deleted_manifest.
It is a first step towards deleted_manifest_v2, as we will try to share as much code as possible with v1, and reuse the main logic for derivation.
High level idea of this first part:
1. Stop depending on DeletedManifest in derivation and instead depend on a trait **(this diff)**
2. Modify trait and derivation so it doesn't need to iterate over all subentries when possible.
3. Implement base DFv2 structures.
4. Implement trait for DFv2 structures and reuse derivation code.
Reviewed By: markbt
Differential Revision: D34551121
fbshipit-source-id: 411463dc7c87bef949d9f9e7ce5834eab6de1c42
Summary:
Now that SCS no longer need special casing, this function simply forwards to
the HgDatapackStore. To make the code consistent with blobs, let's inline this
to the caller.
Reviewed By: kmancini
Differential Revision: D34425492
fbshipit-source-id: e938bff0a273ce5a0fa563074df2a6a3a334338e
Summary:
This was only set by SCS, which is now gone, thus let's deprecate it and remove
the associated code.
Reviewed By: kmancini
Differential Revision: D34425036
fbshipit-source-id: 12fa50062ee714e250b9d15d2d72b20a91ba5904
Summary: The only caller (biggrep) has been removed, let's thus remove the argument.
Reviewed By: kmancini
Differential Revision: D34422423
fbshipit-source-id: 7f93fd2a70606b5bbc5528060692b0a1ec46f8d1
Summary: Conditional compilation causes us to not use certain variables when we build on Windows. The compiler then complained about these unused parameters/variables. This was bothering me, so I added the [[maybe_unused]] compiler attribute to these variables to silence these warnings.
Reviewed By: chadaustin
Differential Revision: D34569567
fbshipit-source-id: 512dc2ee29a4cba193d22c75ab74d72d4fdda808
Summary:
Multiple transactions can happen within a command. If the last transaction
doesn't change the metalog, then the commit cloud check for whether anything
changed won't see a change, and the background backup won't be started.
Instead, ignore whether there was a transaction at all, and just check to see
if the metalog has a new root after the command has completed. If it has,
start the background backup.
Reviewed By: DurhamG
Differential Revision: D34556502
fbshipit-source-id: d70c86075a4a4a311de67f33b80f5f526b978411
Summary:
The output for the endpoint this test is testing can be in either order.
Ensure the output is sorted so the test is stable.
The sorting works on the `repr` of the values. Since `2222...` becomes
`'""...` and `1111...` becomes `"\x11\x11...`, they sort in that order, but it
is stable.
Reviewed By: farnz
Differential Revision: D34558164
fbshipit-source-id: 16e66d673e7a9a7676f08a4661dd9bf806d78074
Summary:
Our aim is to construct as few things as possible in the ServerState constructor. Instead, we should preconstruct these objects, create shared pointers, and pass those into the ServerState constructor. This will allow us to pass in "null" pointers to ServerState for testing purposes in the future.
In this diff, we preconstruct a shared_ptr<ReloadableConfig> inside EdenServer so that we can pass it to the ServerState constructor.
Reviewed By: chadaustin
Differential Revision: D34541321
fbshipit-source-id: 99465fe08099ed95179e56b2e39a97ab68112733
Summary:
Refactor the existing notification class so it uses the new Notifier interface. The notifier interface will be used to set up notifications/notification trays on different platforms.
The notifier interface is not fully completed yet. More methods will be added in a future diff.
As of now, we only have 1 Notifier, the command notifier. I hope to remove this notifier once we implement notifiers for all platforms that we support.
Reviewed By: chadaustin
Differential Revision: D34291809
fbshipit-source-id: a2a67af2683f1f88781428e8d88191f49e100e96
Summary:
With aux data having been enabled everywhere, we no longer need to be able to
fetch metadata via SCS. Thus let's remove the code.
Reviewed By: kmancini
Differential Revision: D34422424
fbshipit-source-id: beed4d1a2e0fd534cea3537f767f33bedd1b676e
Summary:
According to tests on my devserver we can spend up to 9 seconds there blocking
main event loop.
Reviewed By: markbt
Differential Revision: D34557877
fbshipit-source-id: cbebf48ade3f7caa7a8ab19238749db86b6845d1
Summary: Separate parsing args from the sub command implementation. This is needed to migrate walker to the new cmdlib.
Reviewed By: markbt
Differential Revision: D33929025
fbshipit-source-id: 84c9c071e9ea8e88be888d49471436bb1a626e0f
Summary:
Walker has a lot of args and it is hard to migrate it to the new cmdlib iteratively.
I want to separate command implementation from the main command setup and then move the commands one-by-one.
Reviewed By: yancouto
Differential Revision: D33924389
fbshipit-source-id: 1fb468dd9a4d6c9b377391b8f1c11a7e713e31fb
Summary:
Now that we have `#[deny(warnings)]` we must ensure we at least pretend to use
all arguments.
Reviewed By: mitrandir77
Differential Revision: D34549480
fbshipit-source-id: ffdee07c09ca7de102d92e1ea9c9047782581194
Summary:
With D34074710 (1b339b37b8), flushing `MemWritesBlobstore` no longer suffers from the
problem of written data vanishing while it is being flushed. This means we
can now make `DerivationContext::flush` take `&self`, and remove the warning
comment.
Reviewed By: Croohand
Differential Revision: D34520170
fbshipit-source-id: 99652c928783214cef365326ddc949aec7f5aca7
Summary:
Add EdenAPI fallover scuba logging to `HgBackingStore`.
The reason that this is being added to `HgBackingStore` instead of `HgQueuedBackingStore` is that we don't have good access to the actual point where trees and blobs are imported from HgImporter in there. As a result we have to get StructuredLogger in there and send events directly from there.
Reviewed By: xavierd
Differential Revision: D34217906
fbshipit-source-id: 795b61ef6a2ea52e8b67cd08633ec017e5bdbb06
Summary:
On Windows, the default asyncio event loop would throw an exception on tear down.
This diff fixes that by opting to the older event loop. The older event loop doesn't support subprocess but it doesn't look like we use it anyway.
https://stackoverflow.com/a/62413786/694963
Reviewed By: xavierd
Differential Revision: D34486221
fbshipit-source-id: 765056f1e82c9a53d89482527725154445e59494
Summary: Version 2 sparse profiles get unioned at the top level (e.g. if you do "hg sparse enable A" and "hg sparse enable B" and they are v2 profiles, you get "matches(A) OR matches(B)"). However, debugsparsematch was always applying the union logic to the given profile, so for example "hg debugsparsematch -s A ..." would union profiles included in A, which does not match the actual behavior when you enable A.
Reviewed By: quark-zju
Differential Revision: D34463674
fbshipit-source-id: b5e5dfcdf2bd36e0e00c6a1b814fafbc6a6d59cc
Summary:
My recent change to updating from the null commit changed the output
here on case insensitive filesystems. Let's update the test.
Reviewed By: singhsrb
Differential Revision: D34524860
fbshipit-source-id: cad48971d17da06abfaa5c12922f66b30ce84faf
Summary: This was undocumented, but you needed to understand it to use `caching_ext`. Document it
Reviewed By: yancouto
Differential Revision: D34519857
fbshipit-source-id: 56bf089ac0997d6310290985eaa470994368d9f9
Summary:
All clients should be using files2 now, so let's delete the files1 code
path.
Reviewed By: quark-zju
Differential Revision: D34346264
fbshipit-source-id: 86f32237f84ad5521d2f660f10e1000e588187e5
Summary: A large number of things got deprecated, let's follow the recommendations.
Reviewed By: zertosh
Differential Revision: D34467979
fbshipit-source-id: fba2a95c1e4a0de73100cf7f97541ac604b1cdb1
Summary:
On Windows, /proc doesn't exist, let's use sysinfo to collect all processes and
test if they are running.
Reviewed By: zertosh
Differential Revision: D34467978
fbshipit-source-id: d90e8bca7770d2226891bedb02313cd76092d4f4
Summary:
We can directly use the thrift fetch context instead of building a null
context.
Reviewed By: chadaustin
Differential Revision: D34487575
fbshipit-source-id: 15c2fe9167b392d436638e882f4f8aaabebe4662
Summary:
Users frequently get into states where a clone fails and leaves a bunch
of pending changes. We have some logic to detect this and resume the checkout,
but they can still hit issues due to these files and end up having to hg purge
and start again. I just hit this when my machine rebooted and many of the files
that had been written ended up as empty, and therefore considered a conflict.
Let's just make clone checkouts be force checkouts. This not only prevents the
user from getting blocked, but also skips a ton of "check unknown" and "check
conflict" logic, which also bypasses the need to run status and wait for
watchman.
Differential Revision: D34323008
fbshipit-source-id: 5d49a8c645282d17694dbb726c70e8a8d7c66a58
Summary:
The nativecheckout resume feature was failing when a symlink had been
written because the "is it up-to-date" check compared the expected link path
with the contents of the file at the link target.
Let's change vfs::read() to return the symlink link instead of the content, as
that is what Mercurial wants. I can't think of any case where Mercurial ever
wants to read through to the symlink target.
This does add the overhead of a stat call to each read.
Differential Revision: D34314987
fbshipit-source-id: 676647a16f65fa516d6ef97e21d137a1ae137b3f
Summary:
When resuming a checkout we need to go over all the actions and check
if they match the contents on disk. In the old code we did this twice, once when
checking unknown files and once when doing the actual checkout. When the number
of files to check was large, like when resuming a large clone, this was
extremely slow (i.e. many minutes).
Let's only do it once.
Differential Revision: D34314688
fbshipit-source-id: 848dc4e76cb72f173741a9061bd8c71d7120a4bc
Summary:
Previously the "Querying watchman" progress bar covered a bunch of
stuff. I noticed it was hanging a lot when resuming clones. Let's break it into
smaller progress bars.
Differential Revision: D34290594
fbshipit-source-id: 69995f2637c4062062f352e73fdecf30599f9f11
Summary:
LFS and edenapi have different retry logic. Right now LFS doesn't retry for TLS errors or for a number of Http errors. Let's update LFS to match edenapi's more generous retry philosophy.
This should address TLS RecvError's I was seeing during large clones.
Differential Revision: D34290595
fbshipit-source-id: bcd071eee9cd2496e03380d686fcda4947f02a19
Summary:
When resuming a clone, watchman may not be enabled since there is no
.watchmanconfig. Therefore status calls may use the default Python file system
walking code. This currently has no progress bar, so it appears like a hang.
Let's add a progress bar.
Reviewed By: quark-zju
Differential Revision: D34278706
fbshipit-source-id: 425a1c1dadd9ffa68a868766e51c5877b9345562
Summary:
The old native checkout check_unknown logic would iterate over every
new file action and check if the file exists. This can be expensive because 1)
it stats every path, even though most will not exist, and 2) the stat goes
through the path auditor, which stats each parent directory as well.
For initial clones where there are no files on disk already, this isn't too bad,
since the top level directories aren't present so the path auditor aborts early.
When resuming a partially completed checkout however, this can be quite slow
(multiple minutes) since some directories already exist and therefore the
path auditing becomes much more expensive.
We have to run status anyway for the checkout, so let's go ahead and run it
earlier and use its results to only check the actual unknown files. This makes
the check O(unknown files) instead of O(total files to be written).
Additionally, the list of unknown files should be reduced since a resumed
checkout will remove already-written files from the list of files to be checked.
So really this is O(unknown files that differ from what's expected).
Differential Revision: D34278256
fbshipit-source-id: 39ad20387ad2622695864608c7033aefa1eb0df1
Summary:
All errors coming from scmstore fetches should be associated with the
input keys. Let's get rid of the use of other_error in the edenapi fetch path.
Differential Revision: D34257932
fbshipit-source-id: 176ee1fd767df76c8ce6140ddf849a64b3cb3621
Summary:
LFS fetch errors are reported via sha256, and in theory we should have
a Key for every sha256, so we can log keyed rrors all the time. Let's annotate
the non-keyed errors as invalid.
Eventually we'll come back and remove other errors entirely, once we can confirm
this is never hit.
Differential Revision: D34256994
fbshipit-source-id: b00db226d8ef1f222a345f0388c3cb2a5773e008
Summary:
Every error from an scmstore fetch should be associated with an input
key. As part of doing that, let's change top level lfs failures (i.e. '?' calls
inside the lfs fetch logic) to be associated with all keys being fetched.
Differential Revision: D34256261
fbshipit-source-id: b0df6ee4e653e264a4ee1954828a841bccdbb2ee
Summary:
We are seeing fetch failures with empty error lists ("[]"). This should
never happen. Every error should be attributable to an edenapi or a lfs server
fetch failure. There is a clear code path in scmstore that adds an empty error
list if we don't have an error. Let's make this explicitly call out that it's an
unknown error, so we can track these errors down in the future.
Reviewed By: quark-zju
Differential Revision: D34254835
fbshipit-source-id: baa46d641d9b951b1563ac643517dcef15efa4bc
Summary:
This diff fixes some incorrect logic in the physicalfilesystem pendingchanges Rust code that leads to duplicate entries in the "lookup" list (files that need to have their contents checked to know whether they're dirty). We need to fix this, otherwise we'll do 2x the number of (potentially expensive) checks, and we'll need to deduplicate later anyway.
I believe this bug was originally introduced in D25697099 (02606da6c5) -- the change to this region of the code changes the behavior. I believe this was just an oversight when the code was refactored, since the change doesn't have anything to do with the purpose of the diff.
Reviewed By: DurhamG
Differential Revision: D34403900
fbshipit-source-id: 4c38e6a0ba46dfefc8f7ba327b943cb7ccee7fc5
Summary:
Some of EdenFS's integration test functionality can build on macOS, so
implement the required tweaks.
Reviewed By: kmancini
Differential Revision: D34291419
fbshipit-source-id: 296f077f4a3311d7fc8f04ed705fd06019e34212
Summary: Also check for new /files2 endpoint.
Reviewed By: quark-zju
Differential Revision: D34423002
fbshipit-source-id: 409435633e8f776729d25ebf05342020f423b828
Summary: If you give us paths of interest, and ask us to follow mutable rename information, let's do it.
Reviewed By: yancouto
Differential Revision: D34302823
fbshipit-source-id: 647fa2d798436f7a0beb1741570cb280aae2814b
Summary: Tweak "grep lfs" pattern to not match an "lfs" that shows up in tempdir name.
Reviewed By: quark-zju
Differential Revision: D34399625
fbshipit-source-id: 1122d0be4e11f32ed9cf33c046ccf34a99f5cdc3
Summary: Build is failing right now because of deprecation warning.
Reviewed By: mitrandir77, mzr
Differential Revision: D34449857
fbshipit-source-id: 70b7d871ef68995dd3d90a49c1f4af27613550b4
Summary:
Right now, when we create a snapshot on top of a commit that's not on commit cloud, we output things like `queue 0 files for upload` even when we are on plain mode, in which we'd like to only output the hash of the snapshot.
So I made it so the ui is quiet when on plain mode, which makes it not print that.
Reviewed By: quark-zju
Differential Revision: D34378357
fbshipit-source-id: 69b17147b8e72c6d72176f6069d729689130fdc9
Summary: The TOP here feels unecessary, let's remove it.
Reviewed By: fanzeyi
Differential Revision: D34434160
fbshipit-source-id: b8fa901d649694742db7f0b61c3923e9bce3274d
Summary:
Once minitop gains more and more functionality and becomes more interactive,
we'll want an easy way to quit, use 'q' for that. Since we're also in raw mode,
also add back the ability to quit with ctrl+c
Reviewed By: fanzeyi
Differential Revision: D34322721
fbshipit-source-id: 9f92d283d98a8d9d974f773156a0962936983f15
Summary:
With the terminal in raw mode, we need to use curor movement instead of \n for
new lines.
Reviewed By: genevievehelsel
Differential Revision: D34349787
fbshipit-source-id: a6e81100ba5fa8e568ddf89d3f72c524c7c0b103
Summary:
Raw mode allows for capturing input without it being echoed. It however
unfortunately means that \n no longer works correctly and thus printing will
need to be done line by line.
Reviewed By: genevievehelsel
Differential Revision: D34349788
fbshipit-source-id: 0f9362121ee2a40134d711ce56002347c95d0430
Summary:
Once minitop returns, we need to make sure that the terminal state is restored
to its old state. Use an RAII object to make sure that we always restore the
state that was set even in the error cases.
Reviewed By: genevievehelsel
Differential Revision: D34326731
fbshipit-source-id: b5d09988c92b7f469a8f311b106dd28f63ba69f1
Summary:
The interactive mode will redraw on top of the previous update, instead of
scrolling.
Reviewed By: kmancini
Differential Revision: D34326732
fbshipit-source-id: 9c2afd207d51ca4e8bb70c6943e6d620fa8fc1d3
Summary:
This has been turned on everywhere, time to set it to the default, so we can
then clean up the code.
Reviewed By: kmancini
Differential Revision: D34422426
fbshipit-source-id: 1d72a9d1bdbb162a4e1c9b69dbbe5aa4855f4f26
Summary:
The test tries to pushrebase the same commit onto two different bookmarks that are pointing to the same commit. In pushrebase by default we override `author_date` with current timestamp, so the test can [fail](https://fburl.com/sandcastle/5255yczk) if those pushrebases happen in different seconds (result hashes will differ).
Let's fix this by passing `rewritedates: false` pushrebase flag.
Differential Revision: D34416859
fbshipit-source-id: 59a258dc7536833ade8c64c1745e364ee94f6a57
Summary:
Traffic replay is gone. Now we can delete code that dumped wireproto traffic.
The logging that's left could be still somewhat useful: https://fburl.com/scuba/mononoke_test_perf/uismnrv9
Reviewed By: HarveyHunt
Differential Revision: D33898167
fbshipit-source-id: f5f12f3626c578ef90db99a45e5749fe8a94049f
Summary:
This diff includes the following changes:
1. Added a new admin command in commands.rs.
2. Added skiplist.rs for the primary skiplist command in newadmin and build.rs and read.rs for providing building and reading functionalities as subcommands.
3. Added integration test for newadmin skiplist.
4. Updated AdminRepo to include ChangesetFetcher and Changesets.
5. Updated test-backfill-derived-data-tail.t integration test to use newadmin skiplist instead of oldadmin skiplist.
6. Updated TARGETS file to pull the necessary dependencies.
Reviewed By: yancouto
Differential Revision: D34381835
fbshipit-source-id: 24a4f4ee27025f398f446114d9f2d92051c24e06
Summary: This a typo in the macro, which is trying to reference itself but fails. We haven't seen this before because we never used it with more than one argument, but when I tried it failed.
Reviewed By: Croohand
Differential Revision: D34391157
fbshipit-source-id: eb2f2704deac39b4d5f8d537fae75785b77eee5f
Summary:
Test multiple lazy changelog endpoints - pull, commit->location,
location->commit when the client and server have diveraged "main branch" config.
Reviewed By: farnz
Differential Revision: D34276252
fbshipit-source-id: 5ac323387fab509e8832cb5448fa80bb74fd8ca5
Summary:
markbt noticed some commit cloud commits weren't being logged to the scribe category. This is because the EdenApi path to create changesets doesn't do the logging.
This diff makes sure we also do the logging in that case.
Ideally, we'd have an unified place to create changesets, be it from hg changesets, git, or from raw data, but that needs a lot more refactoring and it's riskier.
Reviewed By: markbt
Differential Revision: D34146757
fbshipit-source-id: e82f14e1be6c598f89722b68c20cd6fc572633e0
Summary:
This does some changes to scribe logging logic:
Move it from `bookmarks_movement` to `blobrepo`. Being in `bookmarks_movement` was wrong, as it doesn't only happen in that case. `blobrepo` is not ideal but it's better, as it's close to where we save changesets, which is more or less when this happens.
This is done so the next diff can reuse more of the logging logic without having to duplicate code.
Reviewed By: markbt
Differential Revision: D34145742
fbshipit-source-id: 1dfb94775ea60e4b83412ae80f5c6d3f5e65d952
Summary:
This makes it so HashMaps are serialized in a consistent way in tests (on this crate), which is good because it prevents flakiness.
It also does so at no cost to non-test execution.
Reviewed By: markbt
Differential Revision: D34339601
fbshipit-source-id: e9ec1cb74308f83fb1a346c68f646dfa12021098
Summary: Cleaning up after verify_integrity rollout that switched from Python to Rust client. The rollout switch just appended "_rust" to the binary path.
Reviewed By: yancouto
Differential Revision: D34110979
fbshipit-source-id: 2d7c7d2b00b57626fc3c4f8d23859f520afabdf0
Summary:
Removed the line where we say Mononoke doesn't build, as it does!
Added links to the few .md docs that Mononoke has in repo
Reviewed By: mzr
Differential Revision: D34373614
fbshipit-source-id: 1bec3f4cf4ed158e4698b02a871d1b41d236cd1f
Summary:
While user report of Problem works just fine, telemetry report it as just a
Problem, and it's impossible to figure out which problem it refers to. Let's
force every usage of Problem to instantiate their own class.
Reviewed By: chadaustin
Differential Revision: D34352742
fbshipit-source-id: 30713d64ed5f72bc098e5531075a2f1aef504654
Summary:
Prints the output of `sample $edenfs_process_id` in `eden rage`.
On linux we can use `ps f` to see the process hierarchy we want to have similar
information on macOS. We would also like to have info on the state of the
threads, since we can not log into their machine and look for our selves this
would be a good thing to have in the rage. This give us visibility into eden to
see where the problem might be when there is a rage particularly if/where eden
is hanging.
Reviewed By: xavierd
Differential Revision: D16745028
fbshipit-source-id: 8dcbc1d80b45c3ebe4d065f445f56800104dbd25
Summary:
AppSettings::DisableHelpFlags has been renamed AppSettings::DisableHelpFlag,
and the compiler warns about it.
Reviewed By: fanzeyi
Differential Revision: D34322930
fbshipit-source-id: e376b3ec71fb05a4001b7abe870e16d5e2e55203
Summary: All of these are now available on Windows, thus we do not need to exclude them.
Reviewed By: kmancini
Differential Revision: D34259777
fbshipit-source-id: d7978665cce54e0b8e86424a82cfa13ce51fd947
Summary:
All of these are called during `eden rage`, and since we want `eden rage` to
never hang if EdenFS is hanging, let's add small timeouts for these.
Reviewed By: fanzeyi
Differential Revision: D34317837
fbshipit-source-id: a0537fe6edf912f5e0f946ce233ecef9e146c96c
Summary:
The TSocket.setTimeout in EdenFS is always called before calling open. What
this means is that settimeout is never called on the WindowsSocketHandle
object. In TSocket.open, settimeout is called right before trying the
connection, we should be doing that too.
Reviewed By: fanzeyi
Differential Revision: D34317838
fbshipit-source-id: b89dafdf84d418ec5f7be6acec25ea0e94a0ad52
Summary:
The latter is deprecated, and since this file doesn't import socket, this code
simply doesn't run.
Reviewed By: fanzeyi
Differential Revision: D34317839
fbshipit-source-id: 91baf5750153f7251385ec676edcd82dd5c331be
Summary:
The crossterm documentation states that queue! is more efficient due to needing
less system calls. Let's use it.
Reviewed By: fanzeyi
Differential Revision: D34322722
fbshipit-source-id: b158f86bfc58fd7efac118c27b297bc37f9fd36c
Summary:
In forgetStaleInodes we are checking for unlinked unloaded inodes and
de-referencing them. The dereferencing is happening inline with where we
are iterating through unloaded inodes.
This is causing us to invalidate an iterator that we are using. Which causes
a use after free.
let's collect the inode number of inodes to de-reference and de-reference them
after we finish iterating.
Reviewed By: xavierd
Differential Revision: D34315130
fbshipit-source-id: b390959bd26edf1545e900f0e5f72fc1885efa3a
Summary:
Since MacOS now has multiple architectures, and those architectures
can have different versions of things deployed, this might be pertinent in
investigating issues.
let's include which architecture we are running on in rage.
Reviewed By: fanzeyi
Differential Revision: D34319322
fbshipit-source-id: d5e3308b74f982b79e124400b85340951d626bce
Summary:
The shared futures stored within the mononoke API contexts are not cheap to
instantiate, and since they are not always used, we are paying an unnecessary
overhead. Migrate them to `LazyShared` so that they are initialized lazily.
Reviewed By: yancouto
Differential Revision: D34198428
fbshipit-source-id: bfb491437edfc76a707d523905cd984933f037ed
Summary:
Implement a new method pair for the Source Control Service:
`commit_path_last_changed` and `commit_multiple_path_last_changed`.
These methods return the last commit that changed a path for one or more paths
in a commit. If something exists at that path, this will be the last commit to
modify a file at that path or a file in a directory at that path. If nothing
exists at that path now, but something previously existed, then this will be
the commit that deleted the file or directory at that path.
Similar to the other `commit_multiple_path` method,
`commit_multiple_path_last_changed` does not return entries for paths that never
existed. This is done because efficient manifest traversal prunes these paths
before they are reached.
Reviewed By: yancouto
Differential Revision: D34047425
fbshipit-source-id: 4290e3193aa7834e6d44c90eb4b2626d580b43ae
Summary: This fixes a bug when snapshots with symlinks don't restore well when doing the operation from outside of the repo root. This happened because we were careful about relative paths on the normal file create codepath, but not on the snapshot codepath.
Differential Revision: D34302718
fbshipit-source-id: a8b06fb8a52e53c99735840fdbf5f3c74512a0c9