Commit Graph

63930 Commits

Author SHA1 Message Date
Arun Kulshreshtha
a7f610e683 edenapi: remove no-op collect
Summary: This line just collects a vector into a vector. Probably a remnant of a refactor. Delete it.

Reviewed By: quark-zju

Differential Revision: D27091643

fbshipit-source-id: fb611aabea375b8495476401b2d9cdf7ba12fde1
2021-03-16 15:45:49 -07:00
svcscm
0626e9e5f4 Updating submodules
Summary:
GitHub commits:

44ae45c530
e03b3e4a60
a22d413383

Reviewed By: jurajh-fb

fbshipit-source-id: a7b2d0aa0e1fe0e7c06dbc070aa6daf7bbf53811
2021-03-16 15:45:49 -07:00
svcscm
27d09e36f1 Updating submodules
Summary:
GitHub commits:

b999ee12b0
47ed7d6e9e
9ebb633ae0
a14750828a
8ae350d3c1

Reviewed By: jurajh-fb

fbshipit-source-id: e1ea763c83f030466b6b0804a0cc6ef4e2caab2d
2021-03-16 15:03:27 -07:00
Andrew Gallagher
fdf9827efb Remove dead get_build_rule_output_path() calls
Summary:
These appear to have been made effectively dead by cleanup in D25313325 (23daa7f90f).

This is part of unblocking the hashed buck-out rollout effort
(https://fb.prod.workplace.com/groups/fbcode.fyi/permalink/3694589863910121/),
as `get_build_rule_output_path()` relies on hard-coded buck-out paths.

Reviewed By: mzlee

Differential Revision: D27072131

fbshipit-source-id: 4fccee06a73c4afbf89cb737b25e1713a1afc55a
2021-03-16 14:23:31 -07:00
Jun Wu
59b8287c85 indexedlog: be compatible with MultiLog changes written by older software
Summary: This makes the new software respects writes by older software.

Differential Revision: D27093942

fbshipit-source-id: 097b57c61b5ee1f0264babb88737306113fe356a
2021-03-16 13:59:21 -07:00
svcscm
f819b4fcdf Updating submodules
Summary:
GitHub commits:

0f48d753b8
86b25135c2
729635f1ef
ba0f51420f
be3807614e
aa4a8752ab
719d04de3b
bc51abcc9f

Reviewed By: jurajh-fb

fbshipit-source-id: aacd425d8cf5ddb72f7b09b7fbb94445a509d870
2021-03-16 13:55:32 -07:00
Mark Juggurnauth-Thomas
991e24fab6 scs_server: log when requests are cancelled
Summary:
When requests are cancelled, their futures are dropped without completion.
Currently this causes no logs or statistics to be logged, as normally this
would happen after the request implementation completes.

Add logging for cancelled requests.  Include the gathered statistics so far,
so that we know how much time was spent on the cancelled request.

Reviewed By: StanislavGlebik

Differential Revision: D27084866

fbshipit-source-id: d4c5c276d496478f0c7caa700627b92d8f9e80a2
2021-03-16 13:04:32 -07:00
svcscm
b07eba93ae Updating submodules
Summary:
GitHub commits:

d42f086041
a4d3ca7f8b

Reviewed By: jurajh-fb

fbshipit-source-id: 642db7697bd496bc35c98ff1a5c80479227ca4ff
2021-03-16 13:04:31 -07:00
svcscm
b8f18d60fb Updating submodules
Summary:
GitHub commits:

e7fb799a9a
ee77651870
18e39451c0
aaf3a79a93
214f567121
5d36b7d07c

Reviewed By: jurajh-fb

fbshipit-source-id: 7b3041d5d1faa616f4f912132adad9344ca1e2f3
2021-03-16 11:05:17 -07:00
Chengxiong Ruan
4fb5ba1152 Use released cursive_tab and cursive_buffered_backend version (#8078)
Summary:
Pull Request resolved: https://github.com/facebookincubator/resctl/pull/8078

Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/21

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/76

Use released version to fix cursive_core version conflicts.

Reviewed By: boyuni

Differential Revision: D27032206

fbshipit-source-id: ba664b21cd55453dbc8124ff967a6f9d61fc4926
2021-03-16 10:00:37 -07:00
Stefan Filip
62cca2ec9b segmented_changelog: add scuba logs for loads
Summary: Logs. Minimal observability for loading Segmented Changelog.

Reviewed By: ahornby

Differential Revision: D27048940

fbshipit-source-id: 3005e7c71a32572743d06d5d371a009a030f8e4c
2021-03-16 09:30:55 -07:00
Stefan Filip
deae65979e segmented_changelog: update OverlayIdMap with assigned vertex ranges
Summary:
Pretty big bug here with the "Overlay" when we are updating both stores.  It
turns out that we don't really want a standard Overlay. We want the loaded
iddag to operate with the Ids in the shared IdMap and we want whatever is
updates to use the in process IdMap. The problem we have with the overlay is
that the shared IdMap may have more data than the in process IdMap. The shared
IdMap is always updated by the tailer, after all. This means that when we query
the overlay, we may get data from the shared store even if this is the first
time we are trying to update a changeset for the current process.

The solution here is to specify which vertexes are fetched from either store.

Reviewed By: quark-zju

Differential Revision: D27028367

fbshipit-source-id: e09f003d94100778eabd990724579c84b0f86541
2021-03-16 09:30:55 -07:00
Stefan Filip
c18b35a400 segmented_changelog: update PeriodicReload to work with any SegmentedChangelog
Summary:
Using the generic load function from SegmentedChangelogManager. This is the
config SegmentedChangelog that is consistent with the specified configuration.

I wanted to have another look at ArcSwap to understand if
`Arc<ArcSwap<Arc<dyn SegmentedChangelog>>>` was the type that it was
recommending for our situation and indeed it is.

Reviewed By: quark-zju

Differential Revision: D27028369

fbshipit-source-id: 7c601d0c664f2be0eef782700ef4dcefa9b5822d
2021-03-16 09:30:55 -07:00
Stefan Filip
19e10a7250 segmented_changelog: update reload and update to master periods
Summary:
Keep SegmentedChangelog up to date by triggerring an update to the master
bookmark every minute.
Updating SegmentedChangelog in process has the sideeffect of adding some in
process only bookkeeping. Over long periods of time this can result in
increased memory usage. To mitigate any potential issues, we reload Segmented
Changelog every hour. This will make it's parameters more predictable.

Reviewed By: quark-zju

Differential Revision: D27028368

fbshipit-source-id: dae581b9a067c6eae7975b4517203085b168e2f0
2021-03-16 09:30:55 -07:00
Stefan Filip
e097ff6951 segmented_changelog: clarify logs
Summary: Words.

Reviewed By: quark-zju

Differential Revision: D27028370

fbshipit-source-id: 4e4be1048837f09e18b1b65762b6f23c28cc4c6a
2021-03-16 09:30:54 -07:00
svcscm
18bf40c5cd Updating submodules
Summary:
GitHub commits:

6221be872a
63792f5c9d

Reviewed By: jurajh-fb

fbshipit-source-id: d1e8b5f5a99fd23ba226185f29e22eed63c4878e
2021-03-16 08:30:10 -07:00
Mark Juggurnauth-Thomas
e9806d5a6f scs_server: commonize methods that resolve two commits
Summary:
Several methods (`commit_compare`, `commit_is_ancestor_of`, `commit_file_diffs`
and `commit_common_base_with`) operate on a pair of commits.  Currently these
all resolve the other commit manually and in different ways.  Commonize the
code, and add contextual information so the caller can see which of the two
commits failed to resolve.

Reviewed By: StanislavGlebik

Differential Revision: D27079920

fbshipit-source-id: a2b735801ed75232dd302061aaff2da23448d812
2021-03-16 08:02:20 -07:00
Mark Juggurnauth-Thomas
ee82a59544 scs_server: add context for service errors
Summary:
Add a `.context` method for `ServiceError`, which allows the addition of
context information in errors.

Since these are wrapped Thrift errors, we can't use the usual error-chain
mechanism of `std::error::Error`.  Instead, we just prepend the message that
the Thrift client will see with the context.

Add an extenstion to `Result` for results that contain an error that can be
converted into a `ServiceError` to allow the addition of context when
processing a chain of `Result`s.

Reviewed By: StanislavGlebik

Differential Revision: D27079921

fbshipit-source-id: a1200f44346530c91bd559f4be0ca2b04f7d4480
2021-03-16 08:02:20 -07:00
Toan Mai
adb30561fc Autocargo-ed serde_php (#80)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/80

Trying to use this in `ctp` codebase, where most things are autocargo compatible.
Looks like it can be auto-cargoed as it doesn't have any fancy deps.

So I followed the instructions here to make that happen:
https://www.internalfb.com/intern/wiki/Rust-at-facebook/Cargo.toml_from_Buck_(autocargo)/

Reviewed By: farnz

Differential Revision: D27079404

fbshipit-source-id: 83c10c2899a6a0da52c8f3379c9fbfcde5052eea
2021-03-16 07:52:34 -07:00
Stanislau Hlebik
01b6a2faa8 mononoke: init cachelib only once and add more logging
Summary:
Initializing twice causes it to fail. Let's not do that, and also let's use
init_mononoke function instead of our adhoc logger and runtime creationg (at
the very least it also initializes tunables and sets correct tokio runtime
parameters).

Also let's add more logging to see the progress of uploading

Reviewed By: ahornby

Differential Revision: D27079673

fbshipit-source-id: 940135a9aed62f7139835b2450a1964b879e814b
2021-03-16 06:20:00 -07:00
Stanislau Hlebik
2e3b7d0a65 mononoke: add --skip-last-chunk argument to streaming changelog
Summary:
The way I plan to use new streaming_changelog in prod is by running it
periodically (say, every 15 mins or so). However some repos won't get many
commits in the last 15 mins (in fact, they might get just 1 or 2).
And even for high commit rate repos most of the times the last chunk
will not be a full chunk (i.e. it will be less that --max-data-chunk-size).

If we were just uploading last chunk regardless of its size then the size of
streaming changelog database table would've just keep growing by 1 entry every
15 mins even if it's completely unnecessary. Instead I suggest to add an option
to not upload the last chunk if it's not necessary.

Reviewed By: farnz

Differential Revision: D27045681

fbshipit-source-id: 2d0fed3094944c4ed921f36943b881af394d9c17
2021-03-16 03:29:54 -07:00
Stanislau Hlebik
fb4c1544b9 mononoke: add update command to streaming changelog
Summary:
This command can be used to update already existing streaming changelog.
It takes a newly cloned changelog and updates the new streaming changelog
chunks in the database.

The biggest difference from "create" command is that we first need to figure
out what's already uploaded to streaming changelog. For that two new methods
were added SqlStreamingChunksFetcher.

Reviewed By: farnz

Differential Revision: D27045386

fbshipit-source-id: 36fc9387f621e1ec8ad3eb4fbb767ab431a9d0bb
2021-03-16 03:29:54 -07:00
Stanislau Hlebik
d7d3064a79 mononoke: refactor upload_chunks_to_blobstore
Summary:
Small refactoring that will be used in the next diff. In the next diff we'll add
"update" command, and this command will specify the chunk number's itself.

So let's move setting chunk numbers from upload_chunks_to_blobstore function

Differential Revision: D27045387

fbshipit-source-id: c5387a60841fe184c6db5edc4812ddd409eb2215
2021-03-16 03:29:54 -07:00
Stanislau Hlebik
7163c47c82 mononoke: refactor split_into_chunks a bit
Summary:
Small refactoring that makes a few things easier to do in the later diffs:

1) Adds a verification that checks the data offset
2) We now read the first chunk's offset from revlog, instead of hardcoding it
to 0, 0. This will be useful in "update" commands which needs to skip revlog
entries that already exists in the database

Differential Revision: D27045388

fbshipit-source-id: 4ee80c96d9307c77b1108889e457f10e83c8beb7
2021-03-16 03:29:54 -07:00
svcscm
5de2ae9a40 Updating submodules
Summary:
GitHub commits:

e0f215a938
d99e84ce17

Reviewed By: jurajh-fb

fbshipit-source-id: 26080b0f98f40296e6a61d3675f12cd85e319619
2021-03-16 03:29:53 -07:00
svcscm
647368f8ac Updating submodules
Summary:
GitHub commits:

040b38e2fa

Reviewed By: jurajh-fb

fbshipit-source-id: 3e419de90e3a566a82fc48367d5e5b098a7ae7c2
2021-03-16 00:44:28 -07:00
Anna Kukliansky
d54bb04c4f Handle unused variables
Summary: got this from here: https://stackoverflow.com/questions/1486904/how-do-i-best-silence-a-warning-about-unused-variables

Reviewed By: mzlee

Differential Revision: D27037968

fbshipit-source-id: b5b7ae30fdc192e3d99d3ed857209761a56b5e6f
2021-03-15 23:56:08 -07:00
Stanislau Hlebik
3d8cf49381 mononoke: fix getdeps build
Summary: Duplicate name caused getdeps build to fail. This diff fixes it

Reviewed By: krallin

Differential Revision: D27049661

fbshipit-source-id: b23fe52ad89cbe764e656dfe960921ff1ac92b32
2021-03-15 23:07:45 -07:00
Anna Kukliansky
b8be7b6b29 fix compilation error of missing type
Summary:
example failure:https://www.internalfb.com/intern/buck/build/89566c50-0f40-4940-bee8-c58e4597db69/

{F508857478}

Reviewed By: mzlee

Differential Revision: D27037961

fbshipit-source-id: dd77219870f368586567b4acf2247cde2855042e
2021-03-15 22:31:25 -07:00
Andrey Chursin
a43d7c5029 checkout: log when native checkout is used to scuba
Reviewed By: DurhamG

Differential Revision: D27064447

fbshipit-source-id: aabb79657e6e48779126733d0ab2b326c91e807e
2021-03-15 21:58:48 -07:00
svcscm
7fdd69d7db Updating submodules
Summary:
GitHub commits:

93ea6d5d92

Reviewed By: jurajh-fb

fbshipit-source-id: 54b298dc748749b751349c46176ebe52a3886f87
2021-03-15 21:33:26 -07:00
Jun Wu
f2ed2600d2 test-sparse-fetch: improve robustness
Summary:
`hg stauts` can be "indeterministic" because of the last second mtime fix
special rule (see pytreestate/src/lib.rs:invalidatemtime).
The test sometimes fails like:

  test-sparse-fetch-t.py:140: [] != ['x', 'x/x']

Update it to support both `[]` and `['x', 'x/x']` case.

Reviewed By: sfilipco

Differential Revision: D27071225

fbshipit-source-id: c413906897b408c1e85912852afed1717a87ffc9
2021-03-15 20:04:54 -07:00
svcscm
f12b7b9531 Updating submodules
Summary:
GitHub commits:

eef86a2526
bd470d9232

Reviewed By: jurajh-fb

fbshipit-source-id: 71c018c51a52bfb2bd4e2580741ce92364ccad29
2021-03-15 19:39:10 -07:00
Jun Wu
b8fa495ea8 indexedlog: make finalize_indexes report more detailed error
Summary:
The error was triggered but it's unclear what's wrong. Make the error
more detailed.

Reviewed By: xavierd

Differential Revision: D27058212

fbshipit-source-id: 3f6220e2d100d9118c05a8b4c75c5ba19c9181db
2021-03-15 18:49:16 -07:00
Jun Wu
e312b57623 doctor: repair segmented changelog
Summary: Add repair logic for segmented changelog.

Reviewed By: sfilipco

Differential Revision: D27057695

fbshipit-source-id: 2c1c367ce161e830219f449993fbf371f9330f16
2021-03-15 18:45:07 -07:00
Jun Wu
b573e1b866 pydag: add API to repair NameDag
Summary: This will be used by `doctor` command.

Reviewed By: sfilipco

Differential Revision: D27053349

fbshipit-source-id: bc33e25997f30107f919a090ff68693bfdd7199d
2021-03-15 18:45:07 -07:00
Jun Wu
a904d5606d dag: move MultiLog OpenOptions to a DefaultOpenOptions
Summary:
By implementing DefaultOpenOptions, indexedlog provides `repair()` for free.

Re-export the `Repair` trait so other crates can use `repair()` without
importing indexedlog.

Reviewed By: sfilipco

Differential Revision: D27053352

fbshipit-source-id: 8fa952f0e51e007b9d348bc12699ef1d65000c6b
2021-03-15 18:45:07 -07:00
Jun Wu
6e85ede2c1 indexedlog: implement repair for MultiLog
Summary:
With the new log for MultiMeta. It's now possible to repair a MultiLog by:
- Repair all Logs
- Scanning through the MultiMeta Log and find a valid MultiMeta.
- Set the current MultiMeta to the picked MultiMeta.

Reviewed By: sfilipco

Differential Revision: D27053346

fbshipit-source-id: d60596fb00323b3bcadd5ade2e34cad29a37d64a
2021-03-15 18:45:07 -07:00
Jun Wu
f2f7d49a0a indexedlog: make a few APIs crate visible
Summary: They will be used later.

Reviewed By: sfilipco

Differential Revision: D27053348

fbshipit-source-id: 85b534873a4470532cde1f2b201469a034f08d55
2021-03-15 18:45:07 -07:00
Jun Wu
568ad7a7cb indexedlog: track multilog meta in a separate log
Summary:
We recently saw a few reports about "multimeta" being 0-sized. MultiLog cannot
be repaired like other logs because the logs (ex. IdDag and IdMap) have to be
in sync. To implement Repair for MultiLog, let's track MultiMeta in a Log so
we can check its previous entries and fix the multimeta.

Reviewed By: sfilipco

Differential Revision: D27053347

fbshipit-source-id: af99b13d658ee62bfe63973ab9d37338d14a7d4a
2021-03-15 18:45:06 -07:00
svcscm
9ca5307ece Updating submodules
Summary:
GitHub commits:

7e6ca6211c
11dbd0fa9e
0304352882
309e176b50
b1e22bfa63

Reviewed By: jurajh-fb

fbshipit-source-id: aec2d2abc8446de53d2abed370024ac136c839b9
2021-03-15 18:31:04 -07:00
Jun Wu
7eea44ce4e test-doctor: improve robustness
Summary:
The test failed sometimes on Linux:

    --- test-doctor.t
    +++ test-doctor.t.err
    @@ -204,11 +204,11 @@
       M A2
       A A0
         A
    -  A X
       R A
       R A1
       ? B
       ? C
    +  ? X
       ? Y
       ? Z

The treestate fix appears to rollback to even a previous version, which is also
a valid fix. Let's accept that state too.

Reviewed By: DurhamG

Differential Revision: D27064825

fbshipit-source-id: 6aab04e66ad14ad651f93805c9652c7423178665
2021-03-15 18:22:50 -07:00
Jun Wu
c554c56494 test-fb-hgext-fastlog: improve robustness
Summary:
The test failed sometimes on OSX:

    --- test-fb-hgext-fastlog.t
    +++ test-fb-hgext-fastlog.t.err
    @@ -34,6 +34,7 @@
       $ hg log dir -T '{desc}\n'
       b
       a
    +  Exception in thread Thread-3 (most likely raised during interpreter shutdown): (no-eol)
       $ hg log dir -T '{desc}\n' --all
       b
       a2

The threading usage in fastlog does seem kind of risky (especially with async
Rust involved). Race condition in Py_Finalize is not at all fun. Let's just
make the test more robust for now. In the future we probably want to avoid
threading in fastlog.

Reviewed By: DurhamG

Differential Revision: D27064618

fbshipit-source-id: a6c2ee5eda0fbd5120c8b5e5cfcc7af0f158f9b9
2021-03-15 18:22:50 -07:00
svcscm
e3a5ef82a5 Updating submodules
Summary:
GitHub commits:

da1db045c8
29de57bd80
57dd09c4b1
a3d96403ad
d5207ca6a7
09d47890a3
953ee4420c

Reviewed By: jurajh-fb

fbshipit-source-id: 203df3dc9357de611eb7b6b65c1136d924e461d7
2021-03-15 17:59:12 -07:00
Jun Wu
a4912b15c7 tests: fix flakiness of test-fb-hgext-remotefilelog-repack-remove-old.t
Summary:
The test is failing:

    --- test-fb-hgext-remotefilelog-repack-remove-old.t
    +++ test-fb-hgext-remotefilelog-repack-remove-old.t.err
    @@ -63,7 +63,7 @@
       -r--r--r--      80 *.datapack (glob)
       -r--r--r--      80 *.datapack (glob)
       -r--r--r--      80 *.datapack (glob)
    -  -r--r--r--     144 *.datapack (glob)
    +  -r--r--r--      80 ef52660a201e447b43868610b08c72e22067b8b2.datapack

We are migrating away from repack so I just made the test pass without
investigating what's going on exactly.

Reviewed By: sfilipco

Differential Revision: D27064249

fbshipit-source-id: 6bcd583b6ecbe0b373d9fec2b23269b0da6a27f3
2021-03-15 16:00:20 -07:00
svcscm
8a0db1263b Updating submodules
Summary:
GitHub commits:

f4c2569375
38fd96f823
85d4f2c8b3
47daf13d1d
4e7dbd0a69

Reviewed By: jurajh-fb

fbshipit-source-id: 991af3e5746eebf77a1578167ed59235afeef448
2021-03-15 15:51:09 -07:00
Arun Kulshreshtha
0e6eba5880 edenapi_service: add edenapi prefix to scuba column names
Summary: Now that EdenAPI requests are being logged to the same dataset as regular requests (`mononoke_test_perf`), let's prefix the EdenAPI-specific columns with `edenapi_` to avoid confusion.

Reviewed By: krallin

Differential Revision: D26896670

fbshipit-source-id: 92a0710ff1a7297c9cf46ff9bd9576c9bc155e26
2021-03-15 15:44:34 -07:00
Anna Kukliansky
8da39ce0ae supress deprecated error for INSTANTIATE_TEST_CASE_P
Summary:
suppress the deprecated errors.
found something similar in here: https://stackoverflow.com/questions/1902021/suppressing-is-deprecated-when-using-respondstoselector

example failure:
https://www.internalfb.com/intern/buck/build/a3b550b8-4099-4f27-8975-5bfffd6447e5/

```
eden/fs/inodes/test/OverlayTest.cpp:730:1: error:
'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Werror,-Wdeprecated-declarations]
INSTANTIATE_TEST_CASE_P(
/Users/kuki/fbsource/third-party/googletest/googletest/include/gtest/gtest-param-test.h:507:38:
 note:  expanded from macro 'INSTANTIATE_TEST_CASE_P'
  static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
/Users/kuki/fbsource/third-party/googletest/googletest/include/gtest/internal/gtest-internal.h:1209:1:  note: 'InstantiateTestCase_P_IsDeprecated' has been explicitly marked deprecated here
GTEST_INTERNAL_DEPRECATED(
/Users/kuki/fbsource/third-party/googletest/googletest/include/gtest/internal/gtest-port.h:2215:59:
note: expanded from macro 'GTEST_INTERNAL_DEPRECATED'
#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
```

Reviewed By: mzlee

Differential Revision: D27037957

fbshipit-source-id: b12cc500441c9ed4ed72825475c57047fb0c2076
2021-03-15 15:29:12 -07:00
svcscm
cf60ef2537 Updating submodules
Summary:
GitHub commits:

51f3e92ca0
9a474aeccf

Reviewed By: jurajh-fb

fbshipit-source-id: 348d3a6b297f9658b43a835cb9cf45a9bdc2a120
2021-03-15 15:29:12 -07:00
svcscm
d059f33320 Updating submodules
Summary:
GitHub commits:

d7a1aef366

Reviewed By: jurajh-fb

fbshipit-source-id: dbc2d6f3c18bb56ab9d9579583774fca78871935
2021-03-15 13:53:27 -07:00