Commit Graph

65937 Commits

Author SHA1 Message Date
Stanislau Hlebik
18718da651 mononoke: implement add_sync_target
Summary:
This is the very first version of add_sync_target method. It's very naive - it
just creates a single merge commit, and it doesn't handle all the necessary
functionality (e.g. linkfiles) and it doesn't do all the necessary checks yet.
TODOs show the missing functionality.

However this implementation it should be good enough as the first version, and
we can continue to extend it.

Reviewed By: mitrandir77

Differential Revision: D28677365

fbshipit-source-id: a8af6b92ced285ce4d012843f591d5c29584669d
2021-05-26 07:26:59 -07:00
Stanislau Hlebik
17a9a29f21 mononoke: move find_repo_by_id to a common trait
Summary: It will be used in the next diffs, let's move it to a common file

Reviewed By: mitrandir77

Differential Revision: D28675768

fbshipit-source-id: 78c21e378053a157d09ee9d032576a434a52c912
2021-05-26 07:26:59 -07:00
Stanislau Hlebik
0ddd4f616a mononoke: move megarepo test utils to a separate file
Summary: They will be used in the next diffs

Reviewed By: mitrandir77

Differential Revision: D28675756

fbshipit-source-id: 2f41191cb83921fb3ff3374c0ccb7a884b7b3a25
2021-05-26 07:26:59 -07:00
Johan Schuijt-Li
151b533a6f mononokepeer: log extra timings
Summary: Sometimes things take longer, make sure we are able to distinguish whether that's due to networking, tls handshake, http parsing, or Mononoke wireproto handling.

Reviewed By: markbt

Differential Revision: D28705508

fbshipit-source-id: 1bafda7fc447f2e429690f47fe7ab81cec511494
2021-05-26 06:47:46 -07:00
Stanislau Hlebik
27ba85afdd mononoke: implement test method for add_sync_target_with_config
Reviewed By: mitrandir77

Differential Revision: D28638072

fbshipit-source-id: a37828656aaccfc6928d3fd5c49a210202a708a1
2021-05-26 04:51:29 -07:00
Yipu Miao
f2bb80c128 Not use gtest for UserInfo.h on Windows
Summary: There are some unused warning on Windows, should be an easy fix.

Reviewed By: fanzeyi

Differential Revision: D28663227

fbshipit-source-id: cee18ec28283c0aef18151465a3c13e9be604d7d
2021-05-25 23:55:08 -07:00
Meyer Jacobs
998be9b07d scmstore: construct aux data store in scmstore builder
Summary:
Extends the `FileScmStoreBuilder` to construct two new indexedlog stores for caching aux data. The stores will be created in a directory adjacent to the normal non-LFS indexedlog stores.

Currently aux data stores will not be constructed for production users, a configuration option will be introduced to gate this before `.store_aux_data()` is called in the `filescmstore` constructor bindings.

Reviewed By: DurhamG

Differential Revision: D28689693

fbshipit-source-id: e3ad1594e5beee00b1a8b9fe489e3b6af3a2e93e
2021-05-25 21:52:15 -07:00
Meyer Jacobs
3aa07eddaa scmstore: add basic attributes support to FileStore
Summary:
Modify `FileStore` to introduce basic aux data fetching. Aux data is currently read from a separate IndexedLog store, serialized with `serde_json` (chosen for expediency / ease of debugging, I intend to optimize the storage format before releasing this, at the very least to avoid unnecessarily serializing the key path).

Currently aux data fetching will never succeed, as aux data fetching is not supported in the EdenApi "files" API and nothing else exists to populate the local aux data stores. Later in this stack, computing aux data (currently only content sha256) to populate the aux data storage is implemented.

Reviewed By: DurhamG

Differential Revision: D28526788

fbshipit-source-id: c8e21a1377689d7913a68426a3a480d53148da66
2021-05-25 21:52:15 -07:00
Meyer Jacobs
580207279b scmstore: refactor FetchState in preparation for attributes support
Summary:
Simplify tracking of incomplete fetches in preparation for attributes support in the next change.

Now, all keys which have not been completely and successfully fetched are recorded in `pending`, and are removed only when the complete fetch is recorded in `found`. Keys are now removed from `lfs_pointers` and `pointer_origin` as they are completed, as they aren't needed for anything other than fetching from local LFS and remote LFS respectively.

Reviewed By: DurhamG

Differential Revision: D28546515

fbshipit-source-id: c657e5c6350cadc8da970f57bb7694ed71022efb
2021-05-25 21:52:15 -07:00
Yipu Miao
871f609401 Fix unused parameters on PrjfsChannel.cpp
Summary: There are some unused warning on Windows, should be an easy fix.

Reviewed By: xavierd

Differential Revision: D28610639

fbshipit-source-id: c85535669f84695217125af5de7cc4848fba6b2d
2021-05-25 19:45:22 -07:00
Yipu Miao
405c6996cd Fix warning on FileDescriptor.cpp
Summary: FileDescriptor.cp throws some warning on comparison of signed long and unsigned long.  So fix these warning and follow how ```folly/portability/SysUio.cpp:doVecOperation``` did

Reviewed By: fanzeyi

Differential Revision: D28608581

fbshipit-source-id: 3b6e35e9764548ce470634f16a1f6eec5118d7ed
2021-05-25 19:45:22 -07:00
Jun Wu
c72cd2333f metalog: remove conditional metalog logic
Summary:
Now metalog can no longer be `None`. Let's just remove logic handling its
`None` case.

This changes the commitcloud-sync-race test because the metalog itself has
internal locking and changes are atomic.

Reviewed By: DurhamG

Differential Revision: D28595292

fbshipit-source-id: bd9851f5f3bb25f28f15d673f608af2863953c46
2021-05-25 19:43:45 -07:00
Jun Wu
1f8d8cfbf0 store: always enable store and fncache
Summary:
fncache and store have been default on for years. Enable them unconditionally.
This also makes sure that metalog is always available.

Practically, the only place that does not use fncache is hgsql server repos and
they are irrelevant now.

Reviewed By: DurhamG

Differential Revision: D28595289

fbshipit-source-id: 32b9906c179518acdb17a206b54f98a3dc994921
2021-05-25 19:43:45 -07:00
CodemodService Bot
65062e63e7 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: farnz

Differential Revision: D28671045

fbshipit-source-id: cbb9dc477bc2a579133d1f68e2a4c12dc0bec456
2021-05-25 17:03:52 -07:00
Xavier Deguillard
9621d533f4 nfs: use makeImmediateFutureWith instead of a manual version of it
Summary:
Now that makeImmediateFutureWith exists, we can simply use it instead of
constructing a ImmediateFuture<folly::Unit> and calling thenValue on it.

Reviewed By: chadaustin

Differential Revision: D28518059

fbshipit-source-id: 0041cf863fb32efab274f11c77c76109ca9b454f
2021-05-25 15:16:59 -07:00
Yipu Miao
814c4c2bcf Fix unused parameters on EdenServiceHandler
Summary: There are some unused warning on Windows, should be an easy fix.

Reviewed By: xavierd

Differential Revision: D28665465

fbshipit-source-id: 9281de7fd62f38e09d91435bb53c819bb98fb4ec
2021-05-25 10:30:29 -07:00
Yipu Miao
eb8deb4f51 Fix unused parameters on inodes on Windows
Summary: There are some unused warning on Windows, should be an easy fix.

Reviewed By: xavierd

Differential Revision: D28595085

fbshipit-source-id: abc03d210b2e9c5aa19a8925be6d4c426311e826
2021-05-25 10:30:29 -07:00
Yipu Miao
8f05086834 Fix unused parameters on StartupLogger.cpp on Windows
Summary: There are some unused warning on Windows, should be an easy fix.

Reviewed By: xavierd

Differential Revision: D28594404

fbshipit-source-id: f3dec92403739d67df3ecd091f2d8283a11ea0db
2021-05-25 10:30:29 -07:00
Xavier Deguillard
5a84f7ac85 utils: add an makeImmediateFutureWith function
Summary: This will be used to replace calls to folly::makeFutureWith.

Reviewed By: chadaustin

Differential Revision: D28515786

fbshipit-source-id: 2c2c542392e8e57b8f865173d6878cb9d00ba376
2021-05-25 09:45:47 -07:00
Mateusz Kwapich
7f0144d872 add claimed_by to requests table
Summary:
For debugging and better error messages it would be nice to know who worked on
a given request.

I'll do AOSC schema change once accepted.

Reviewed By: krallin

Differential Revision: D28441673

fbshipit-source-id: ba146d7f43dde26d9433f76af7fe982da14b5b82
2021-05-25 09:11:43 -07:00
Mateusz Kwapich
fb901786da add repo and bookmark to the async requests table
Summary:
Those will be used for two purposes:
 * to limit a scope of given tailer to just given repo (this way we could use
   different tailer binaries for different repos or disable processing for a
   single repo etc...)
 * to enforce a single in-flight request per repo (to prevent client from
   accidentally scheduling duplicate requests etc...)

I'll do AOSC schema change once accepted.

Reviewed By: krallin

Differential Revision: D28441670

fbshipit-source-id: 7b35a1c7034707d7cf54220c559edd6e03f430c3
2021-05-25 09:11:43 -07:00
Mateusz Kwapich
be32915b9b move the queue to its own module
Summary: I want to put more things in the async_requests crate.

Reviewed By: krallin

Differential Revision: D28441671

fbshipit-source-id: 19233c2c5b697cc1e27107cd9904666baf8f10b7
2021-05-25 09:11:43 -07:00
Alex Hornby
405b1e9f44 mononoke: fix warnings in fastlog
Summary: Fix these rustc warnings.

Reviewed By: farnz

Differential Revision: D28645895

fbshipit-source-id: 1d23c8e115fe43056f2ad2e3fe935e182c596eff
2021-05-25 01:56:35 -07:00
Jan Mazur
0e960695e0 put command renewing certificate in the error message
Summary: I have modified the places where most of the errors were raised that users reported and were resolved by renewal of certificates.

Reviewed By: krallin

Differential Revision: D28568561

fbshipit-source-id: 44fb127a49bde83efee1c934e0435b31f8602a8d
2021-05-25 01:05:16 -07:00
Zeyi (Rice) Fan
a8e007bbf6 hg: promote batch size to a configuration option
Summary: This diff removes the gflag based batch size option and promote it into a EdenFS Configuration so we can experiment with different batch size easily.

Reviewed By: chadaustin

Differential Revision: D28555280

fbshipit-source-id: 6d3a7be3cd880f0aaa3f427c0328222efa2d37ea
2021-05-24 19:17:17 -07:00
svcscm svcscm
bed0fa7c34 Updating submodules
Summary:
GitHub commits:

97183ba540
ec71afa895
a41db66f3d
43778e064b
a492ec64dc
6097866e85

Reviewed By: jurajh-fb

fbshipit-source-id: bcd13864c76bcc69531ce7001b0f7eac778f8826
2021-05-24 18:18:08 -07:00
svcscm svcscm
51763a1222 Updating submodules
Summary:
GitHub commits:

34e9fb6203
6779b8eeed
28a0b74ee5
d3bd20cffe
33d84df82b
4648a5658a
65c80c3f81
8c605d06c7
7a307c4d48

Reviewed By: jurajh-fb

fbshipit-source-id: be57dc2f0823a83faea98e4deafa6af2e5a6ca45
2021-05-24 17:58:10 -07:00
svcscm svcscm
518a268dcf Updating submodules
Summary:
GitHub commits:

3d9d855634
48cd1a65ce
18824d9355
56eb6ea2cd
50379d06bb
c0a6638054
0cfe8059bd
6c39bb2a45
2f6ef4b442
ca2f2f4ad3
9555348ea3

Reviewed By: jurajh-fb

fbshipit-source-id: 047184a0d5b7e9b9a21b328e63f08c638b7708c1
2021-05-24 17:32:58 -07:00
svcscm svcscm
ab6a87af8c Updating submodules
Summary:
GitHub commits:

0b4f440ab1
15ddc84722
60113595a2
99fbca1df1
52bbcd9764
cabd44f885
d4e3ee3ebe
8924d1a170
5253cd03e8
d4c2807cbf

Reviewed By: jurajh-fb

fbshipit-source-id: 81b999feac001d51a308e56d30e8e28eebdc7f84
2021-05-24 17:02:58 -07:00
Chad Austin
e44b403d53 whereami: always read the dirstate, even in EdenFS checkouts
Summary:
The telemetry wrapper didn't validate the SNAPSHOT header, which makes
migrating to a new format harder. Fortunately, it doesn't even need to
read the SNAPSHOT file. The dirstate file is maintained even in EdenFS
checkouts.

Reviewed By: quark-zju

Differential Revision: D28650333

fbshipit-source-id: 174cf7039adcbb28224ec528c2462e0a9232b6cd
2021-05-24 16:52:32 -07:00
Jun Wu
fc9912dbfe test-metalog-migration: remove the test
Summary: Upcoming changes will force enable metalog so there will be no way to migrate down.

Reviewed By: DurhamG

Differential Revision: D28595290

fbshipit-source-id: a130b3c60c5b553d024868f28a28e48c50d44783
2021-05-24 16:40:30 -07:00
svcscm svcscm
35d438b393 Updating submodules
Summary:
GitHub commits:

c94ee29a43
dfdd00185e
be6a88da90
aeb713e65b
189b730c8e
948feeb231
f3c6a63a45
cd6df76914
1147ebd31b
7ca015fd37
3223115dd0

Reviewed By: jurajh-fb

fbshipit-source-id: 89e9fcf1a2f8952e49bd26f5c58c6e7b1d3c7a0d
2021-05-24 16:22:44 -07:00
svcscm svcscm
2b63409a20 Updating submodules
Summary:
GitHub commits:

544e94eb5c
e5bc1bd7df
9551a4f7d1
85d4e767f2
b2fd85fe23
cd3ce74e52
a6394f44cd
41008f1515
8e81393d5b
a291f5e49a
2b5c3b88d5

Reviewed By: jurajh-fb

fbshipit-source-id: 7d11ededf543aba25cf1362bb5d942308511a673
2021-05-24 15:51:31 -07:00
Yipu Miao
c4fe54e1d5 Bump the waiting time for DaemonStartupLoggerTest.daemonClosesStandardFileDescriptors
Reviewed By: chadaustin

Differential Revision: D28499240

fbshipit-source-id: d04fc25ab3a823620c72c1355f897a274703efb5
2021-05-24 15:40:49 -07:00
Jun Wu
a586d3f636 test-encodedstore-long: remove the test
Summary:
It was added by D8527475 (72c3d8afc1) to workaround hgsql with no-fncache and long file
names synced from svn. Upcoming changes will force fncache to simplify
configuration and the hgsql server code was forked. So let's just delete
the test.

Reviewed By: DurhamG

Differential Revision: D28595291

fbshipit-source-id: 60d2449cca7af46b8b5b3c3b557a36507ff1576e
2021-05-24 15:24:18 -07:00
svcscm svcscm
2abfbc102d Updating submodules
Summary:
GitHub commits:

cc3fee7300
cd9426de42
f2e8440cd8
0c57185fb3
0eb4d6e578

Reviewed By: jurajh-fb

fbshipit-source-id: fa2e386bf208b250370115a74d6533135f2ba7e1
2021-05-24 15:10:09 -07:00
Jun Wu
2aa432e134 clone: add a config to clone with lazy changelog
Summary: This will be used by fbclone to ship lazy commit hash backend.

Reviewed By: DurhamG

Differential Revision: D28554445

fbshipit-source-id: a263ae7683124b3b86f4025b02c7de20dcb9813e
2021-05-24 14:51:58 -07:00
svcscm svcscm
8d48eda885 Updating submodules
Summary:
GitHub commits:

ed8c2e1426
8c26adf835
4bd5fcf6b4
992088f6ae
c95c2ca5c8
4de2bace72

Reviewed By: jurajh-fb

fbshipit-source-id: 9fce4169ed57d7afe5739118694821b928e3701d
2021-05-24 14:48:24 -07:00
svcscm svcscm
8741831163 Updating submodules
Summary:
GitHub commits:

a952a90c7e
d1f3264b57
43739b0607
78a7cede01
b73e0709f3
30f1dffd7c
8e37682d7e
6934d09079
9d25b6f956

Reviewed By: jurajh-fb

fbshipit-source-id: f0077cff9612090e74a31a1148fe6d7d24ef9024
2021-05-24 14:29:07 -07:00
svcscm svcscm
f5088de610 Updating submodules
Summary:
GitHub commits:

a0b7b06204
ef7aea5536
71627925c8
db34635b88
142d304d0b
ea29e4b9b5
c7d41fa32d
94d079fe1a
e62fbe895f
80e97453bc
639203e0e6

Reviewed By: jurajh-fb

fbshipit-source-id: 99e50123058bf0296db81b2b625a75f19199acfd
2021-05-24 14:07:58 -07:00
svcscm svcscm
97f3dab4d1 Updating submodules
Summary:
GitHub commits:

8ab5913501
b4ede024ec
b87a40a9ed
48f6f9fed0
999355e3c8
a607b88240
a2fe649ac3
5b9d76621a
9bed02c3ab
5cdb09e881
8bb3bc3d0c
2c30962515
5e86b7c49e

Reviewed By: jurajh-fb

fbshipit-source-id: ddc8d753d81bc0011fd1e7e7d29d1cf87c844570
2021-05-24 13:43:03 -07:00
Matthew William Edwards
f4212a2ab3 Fix openr.thrift Python Module Build
Summary:
Add Dockerfile build for openr.thrift python module.

The python module is built by:
1. Building and installing Facebook libraries with fbcode_builder
2. Building Open/R
3. Generating Cython files from thrift files with the FB thrift compiler
4. Generating C++ files from the Cython modules with the Cython compiler
5. Compiling the C++ modules into shared objects

Future work for building and distributing Breeze:

- Fix the hacks in build_breeze.sh, see comments therein
- Use a staged Dockerfile build for the Open/R and Breeze build
- Install openr.thrift. The openr.thrift shared objects are build and
  stored in the Docker image generated by Dockerfile, but are unused.
- Install all the openr python submodules in a single openr site-package
- Add cross-compilation to the openr.thrift build. This is needed for
  Terragraph
- Upload the openr python package to PyPi

Reviewed By: saifhhasan

Differential Revision: D28614443

fbshipit-source-id: 38b7e7c5594fd4bb5a338f19c69e5fc3b3b95863
2021-05-24 13:13:38 -07:00
Jun Wu
5edc1f6433 metalog: expose compact as debugcompactmetalog command
Summary: This makes it possible to use non-debugshell to compact the metalog.

Reviewed By: DurhamG

Differential Revision: D28550902

fbshipit-source-id: 789830ba35243d248397e6a52ee343584c1e01a9
2021-05-24 11:44:55 -07:00
Jun Wu
318f2ae812 metalog: expose compact and path API to Python
Summary:
The "compact" API rebuilds the metalog by removing older history. It could be
useful to reduce the size overhead of the metalog.

This is also useful if we're doing other "rebuild" work, such as rebuilding the
changelog.

Reviewed By: DurhamG

Differential Revision: D28550903

fbshipit-source-id: 56f875bd955247181236a976dcce6163d126a4b6
2021-05-24 11:44:55 -07:00
Simon Farnsworth
f125000b2b Do not alter rate limit inside derived data utils
Summary: I'm going to reuse this for AOSP import logic speedups, and I do not want my low QPS limit overridden by a higher QPS limit set for backfilling. Push the rate limiter out

Reviewed By: StanislavGlebik

Differential Revision: D28638180

fbshipit-source-id: ef3a783d4b1993614a146f534337f719958a1f36
2021-05-24 11:43:01 -07:00
Alex Hornby
6d9926ab78 mononoke: short circuit PutBehaviour::IfAbsent in sqlblob
Summary: We don't need to load the chunk data or update the chunk generation if the blobstore key is already present in IfAbsent mode.

Reviewed By: farnz

Differential Revision: D28640820

fbshipit-source-id: 3eab255ebfc896d4950935e3d7350b19f9a280b9
2021-05-24 11:08:38 -07:00
Jun Wu
bd1fb8e337 zipimport: workaroud pyc invalidation due to timezone settings
Summary:
The zipimport logic requires the pyc mtime to match its source. However, the
Windows system time zone can invalidate it and cause slow startups.

Workaround it by making the zipimport mtime function return a fallback value so
the mtime check is then bypassed.

    # zipimport.py, _unmarshal_code
    source_mtime, source_size = \
        _get_mtime_and_size_of_source(self, fullpath)

    if source_mtime:  # if source_mtime is false, then the check is bypassed.
        # We don't use _bootstrap_external._validate_timestamp_pyc
        # to allow for a more lenient timestamp check.
        if (not _eq_mtime(_unpack_uint32(data[8:12]), source_mtime) or
                _unpack_uint32(data[12:16]) != source_size):
            _bootstrap._verbose_message(
                f'bytecode is stale for {fullname!r}')
            return None

Change my Windows time zone from GMT-7 to GMT-4. Set PYTHONVERBOSE and
PYTHONDEBUG to 1. Ran `hg init -h` and check its stderr. It prints:

  # bytecode is stale for 'edenscm.traceimport'

and alike before this change, and no longer after replacing the `__init__.py`
in the zip with the new version.

Reviewed By: DurhamG

Differential Revision: D28622287

fbshipit-source-id: bb3e8e378ea168e4f83f4b6aa9713103b2c90ef8
2021-05-24 09:36:37 -07:00
svcscm svcscm
91078f9d51 Updating submodules
Summary:
GitHub commits:

22fe579c15
79b4d47997
5266a01461
0e31e7310a

Reviewed By: yns88

fbshipit-source-id: 72580ef41e49349ddaf248188ef939ff3ec029b2
2021-05-24 08:43:44 -07:00
svcscm svcscm
c6566421b4 Updating submodules
Summary:
GitHub commits:

d1ae4f30d1
408fead8d1

Reviewed By: yns88

fbshipit-source-id: b67b0347d3f5b7352490fb6b7d0514160fa1a9ad
2021-05-24 08:10:36 -07:00
svcscm svcscm
51bdc5b5d8 Updating submodules
Summary:
GitHub commits:

53b5d2834b
ba7bab214f
a331aa2872
bc896a8d61

Reviewed By: yns88

fbshipit-source-id: d0d5f31d372cd719b46c2b14cc694629ad47db0f
2021-05-24 06:46:37 -07:00