Commit Graph

57730 Commits

Author SHA1 Message Date
Durham Goode
20c3f8b34d scuba: round bytes to the nearest useful value
Summary: This will reduce the amount of space they take in scuba.

Reviewed By: xavierd

Differential Revision: D21483472

fbshipit-source-id: 9de49dedef480932f8583dd17fe6625d222a3285
2020-05-11 21:31:05 -07:00
svcscm
95f0b94031 Updating submodules
Summary:
GitHub commits:

129156f4ff

Reviewed By: zpao

fbshipit-source-id: a502d0767dc42466c66afbc9143eb50c618ed4c8
2020-05-11 21:20:10 -07:00
Alvaro Leiva Geisse
675b83557e add extra 2 extra type hints for systemd Manager
Summary: add two methods calls as typehints (no real code change).

Reviewed By: zeroxoneb

Differential Revision: D21337646

fbshipit-source-id: 8079883f7f989251965d3308c5374f097023b57a
2020-05-11 20:52:13 -07:00
svcscm
ad4c78031c Updating submodules
Summary:
GitHub commits:

825d7e2146
d33c823f0d
247c90a49e

Reviewed By: zpao

fbshipit-source-id: ba3a422976d12dbd798a597185985f7b70eb45ec
2020-05-11 20:52:12 -07:00
svcscm
bb300ac19e Updating submodules
Summary:
GitHub commits:

c0b5c0b084
efb57da2ba

Reviewed By: zpao

fbshipit-source-id: 4b5c66c9cd0efdefeb2bc90851a676f52986297a
2020-05-11 19:00:27 -07:00
Jun Wu
99d288c1bd fsmonitor: write fsmonitor walk events to tracing data
Summary: This allows us to query tracing data for fsmonitor walk events.

Reviewed By: DurhamG

Differential Revision: D19797709

fbshipit-source-id: 1ff76dd6122cf56787e7928711f604f9c3d571cc
2020-05-11 16:56:18 -07:00
Ellis Hoag
1d0d626a36 Pass config object down to repack
Summary:
Pass `configparser::config::ConfigSet` to `repack` in
`revisionstore/src/repack.rs` so that we can use various config values in `filter_incrementalpacks`.

* `repack.maxdatapacksize`, `repack.maxhistpacksize`
  * The overall max pack size
* `repack.sizelimit`
  * The size limit for any individual pack
* `repack.maxpacks`
  * The maximum number of packs we want to have after repack (overrides sizelimit)

Reviewed By: xavierd

Differential Revision: D21484836

fbshipit-source-id: 0407d50dfd69f23694fb736e729819b7285f480f
2020-05-11 16:41:30 -07:00
svcscm
d10bd02c87 Updating submodules
Summary:
GitHub commits:

d8ed7cd812
b3281fd99f
a07fd0febe
fe4c0d46e3
8e025a80a2
2e9324718a
9e0a38526c
16f1f53e1b
5b3b3ac872
3b16ae5126
ad939ea6a9
f513dc756a

Reviewed By: zpao

fbshipit-source-id: 1b3804afd513f1e429cae1411816c9e6166dfdf1
2020-05-11 16:41:29 -07:00
svcscm
3caffc114e Updating submodules
Summary:
GitHub commits:

34027c7b31
29cd269e7f
7c5727c8cc
7e79b25f93
e571d404dd
f2aa9bf7f5
f0e8731b72
22375a92ce
5e84ff4dc0
19d8cafbae
52d172d621
cdcedc50d9
20f413e15b
d8234440b2

Reviewed By: zpao

fbshipit-source-id: 991ae049c052c4d1f16d63aebbbed0d1528ca9d1
2020-05-11 13:39:38 -07:00
Stanislau Hlebik
20017e96fe hgsql: check sqlrepolock in memcommit
Summary:
Let's not allow proceeding with memcommit if repo is locked. This what normal
push flow does, so we should allow it here as well.

Reviewed By: markbt

Differential Revision: D21502435

fbshipit-source-id: 80e665f065fb0cd882bc99482769a3de01d3de30
2020-05-11 12:47:10 -07:00
Alex Hornby
0f8beabdb9 mononoke: walker: make WrappedPath available in stream output
Summary:
Make the repo path in Option<WrappedPath> available in stream output in preparation for using it in the corpus dumper to write to disk

The path is Option as not all nodes can have an associated file system path (e.g. BonsaiChangeset)

The headlines changes are in sampling.rs and sizing.rs.  The progress.rs change slightly generalises to allow any type convertible to NodeType as the main walk identifier in the output stream.

Some refactors done as part of this
* NodeSamplingHandler is renamed to  WalkSampleMapping to reflect this is what it stores.
* WalkSampleMapping generic parameters are extended to take both a key and a sample type
* NodeSamplingHandler::start_node() is moved to a new SampleTrigger::map_keys() type.  This is so that SamplingWalkVisitor doesn't need the full WalkSampleMapping generic parameters.

Reviewed By: krallin

Differential Revision: D20835662

fbshipit-source-id: 58db622dc63d7f869a092739d1187a34b77219f6
2020-05-11 12:00:59 -07:00
Alex Hornby
2222bd9f19 mononoke: make sampling blobstore handlers fallible
Summary: Make sampling blobstore handlers fallible in preparation for corpus dumper so we can know if writes to disk/directory creations failed.

Reviewed By: farnz

Differential Revision: D21168632

fbshipit-source-id: d25123435e8f54c75aaabfc72f5fa653e5cf573d
2020-05-11 12:00:59 -07:00
Alex Hornby
1c044613f8 mononoke: walker: filter the repo path by node type
Summary:
Not all node types can have a path associated

Reset the tracked path to None if the route is taking us through a node type that can't have a repo path.

Reviewed By: krallin

Differential Revision: D21228372

fbshipit-source-id: 2b1e291f09232500adce79c630d428f09cd2d2cc
2020-05-11 12:00:59 -07:00
Alex Hornby
d64505bfff mononoke: walker: add --sample-offset so whole repo can be sampled in slices
Summary:
Add new --sample-offset argument so that in combination with the existing --sample-rate the whole repo can be sampled in slices

For --sample-rate=N, this allows us to scrub or corpus dump 1/Nth of the repo a time, which is particularly useful for corpus dumping on machines with limited disk.

Also factored out the sampling args construction as 3 of the 4 walk variants use them (only validate does not)

Reviewed By: krallin

Differential Revision: D21158486

fbshipit-source-id: 94f98ceb71c22e0e9d368a563cdb04225b6fc459
2020-05-11 12:00:58 -07:00
Alex Hornby
324aacff49 mononoke: walker: use ArcIntern for WrappedPath
Summary: use ArcIntern for WrappedPath to reduced walker memory usage for paths

Reviewed By: farnz

Differential Revision: D21230828

fbshipit-source-id: 525bac5a14b205659e177e03bd83bf06d1444617
2020-05-11 12:00:58 -07:00
Xavier Deguillard
04250881ed getdeps: add filtering of tests
Summary:
For large projects, with lots of tests, running all the tests can take a lot
of time, but for quick development iteration, only a subset of the tests may
be needed to run.

On non-Windows platforms, this can be easily achieved by manually executing
the individual tests binaries and use the builtin filtering mechanism of that
test binary to achieve the goal. On Windows, this can quickly become
impossible as DLLs might not be available, and the right PATH would need to
be manually specified by hand to execute the tests binaries[0].

To solve this, let's simply provide a unified way of running specific tests
by passing in a regexp. Both testpilot and CTest do support regex to execute
specific tests. My understanding is that cargo doesn't yet allows regex, but
will in the future.

[0]: And a missing DLLs would produce no output when executed from
     PowerShell, which makes this very confusing.

Reviewed By: wez

Differential Revision: D21484774

fbshipit-source-id: ee32e950e25bb2a498a2b364a447955a917b0590
2020-05-11 11:50:10 -07:00
Jessica Gomes
50022171c9 add uptime field to DaemonInfo
Summary:
- Added uptime field to DaemonInfo thrift struct
- Created startTime member variable in EdenServer
- Made appropriate refactoring changes to EdenMain and EdenServer
- Changed main.py and util.py to use the new uptime value

Reviewed By: genevievehelsel

Differential Revision: D21471140

fbshipit-source-id: 8868de667dfb95de93e3e71b90c0412fb3825388
2020-05-11 11:42:15 -07:00
Xavier Deguillard
1cd0bba3fa revisionstore: enable use of proxies for LFS
Summary:
If http_proxy.no is set, we should respect it to avoid sending traffic to it
whenever required.

Reviewed By: wez

Differential Revision: D21383138

fbshipit-source-id: 4c8286aaaf51cbe19402bcf8e4ed03e0d167228b
2020-05-11 10:36:11 -07:00
Xavier Deguillard
2001c3fd69 revisionstore: add translate_lfs_missing to remote store get
Summary:
When Qing implemented all the get method, the translate_lfs_missing function
didn't exist, and I forgot to add them in the right places when landing the
diff that added it. Fix this.

Reviewed By: sfilipco

Differential Revision: D21418043

fbshipit-source-id: baf67b0fe60ed20aeb2c1acd50a209d04dc91c5e
2020-05-11 10:34:01 -07:00
svcscm
5c060a098a Updating submodules
Summary:
GitHub commits:

b86a9654d8
41a856c411
4103ac1325
6aaf3811e5
72a568d387
f638193708
3b81021a51
0e2fb21613

Reviewed By: zpao

fbshipit-source-id: be11a1e3d022e6e305859eff4fa2cad4f2be6ab9
2020-05-11 10:30:33 -07:00
Jun Wu
d8abb30eeb pydag: expose some memnamedag APIs
Summary: Make them reusable in other Python bindings, ex. pymutation.

Reviewed By: sfilipco

Differential Revision: D21486524

fbshipit-source-id: 258455c6a442353c77588fadcb560cb5a170926e
2020-05-11 09:50:01 -07:00
Jun Wu
6835eb4b9d pydag: expose render into string feature for memnamedag
Summary: This makes it easier to visualize a MemNameDag.

Reviewed By: sfilipco

Differential Revision: D21486523

fbshipit-source-id: c65f1fc421bd654dc820faae3c93f2aa57f910d4
2020-05-11 09:50:01 -07:00
Jun Wu
010bcac66a pydag: expose MemNameDag APIs
Summary:
This will allow clients to operate on MemNameDag.

Unfortunately, it isn't that easy to reuse code in `py_class!`. Since they are
just thin wrappers, I live with the copy-paste for now.

Reviewed By: sfilipco

Differential Revision: D21479015

fbshipit-source-id: ddcc7f5c7ede6bb1e9c73d058779805875b09200
2020-05-11 09:50:01 -07:00
Jun Wu
85a60dd9e4 renderdag: provide a method to render MemNameDag directly to a string
Summary: This would be handy to visualize a MemNameDag.

Reviewed By: sfilipco

Differential Revision: D21486522

fbshipit-source-id: c8d7147dc53a1a7c1b8b09ce055493c69cceba2f
2020-05-11 09:50:00 -07:00
Jun Wu
4352be72d3 renderdag: use MemNameDag to simplify tests
Summary:
Use MemNameDag::from_ascii to simplify the tests. This removes the need of:
- using tempdir
- converting between Id and VertexName manually via an IdMap
- depending on drawdag directly

Reviewed By: sfilipco

Differential Revision: D21486519

fbshipit-source-id: f04061d8892f043de40e7e321273acc51e15308a
2020-05-11 09:50:00 -07:00
Jun Wu
60684eb2c5 dag: make ASCII -> MemNameDag a public API
Summary:
It seems handy to construct a Dag just from ASCII. Therefore move it to a
public interface.

Reviewed By: sfilipco

Differential Revision: D21486525

fbshipit-source-id: de7f4b8dfcbcc486798928d4334c655431373276
2020-05-11 09:49:59 -07:00
Jun Wu
a6b7e965f3 dag: remove a TODO comment
Summary: It was done as NameSet.

Reviewed By: sfilipco

Differential Revision: D21479022

fbshipit-source-id: 1c32cabb27d72a6438409ede226104a9ebac6a1d
2020-05-11 09:49:59 -07:00
Jun Wu
4eb9251172 dag: move sort and parent_names to NameDagAlgorithm
Summary:
They are part of the read-only algorithms that are not specific to a certain
type of NameDag.

Reviewed By: sfilipco

Differential Revision: D21479017

fbshipit-source-id: 3fa58071ac43246d3cd45d84384ee93c7385f414
2020-05-11 09:49:59 -07:00
Jun Wu
282e034d30 dag: add MemNameDag
Summary:
Adds an in-memory NameDag so we can construct the DAG and use its algorithms by
just providing parents function and heads.

Reviewed By: sfilipco

Differential Revision: D21479021

fbshipit-source-id: e12d53a97afec77b2307d5efbb280bd506dee0ba
2020-05-11 09:49:58 -07:00
Jun Wu
5cbb99f4eb dag: add MemIdMap
Summary: Adds an in-memory IdMap to be used in an in-memory NameDag.

Reviewed By: sfilipco

Differential Revision: D21479018

fbshipit-source-id: bc702762b059e8659c6ab322f3c39f032e95d5b6
2020-05-11 09:49:58 -07:00
Jun Wu
682e8e96a7 dag: use IdMap traits in NameDag and NameSet
Summary:
This allows them to switch to a different IdMap implementation relatively
easily.

Reviewed By: sfilipco

Differential Revision: D21479023

fbshipit-source-id: 8ecb99cafe2093ec7d14b848ffa08581c5300414
2020-05-11 09:49:57 -07:00
Jun Wu
759f8b35c5 dag: move some IdMap operations to traits
Summary: This will allow different IdMap implementations.

Reviewed By: sfilipco

Differential Revision: D21479016

fbshipit-source-id: 852501896fddcb82624338acd9dceee41150e302
2020-05-11 09:49:57 -07:00
Jun Wu
30163eeb58 dag: update snapshot_map on change
Summary:
`NameDag::add_heads` API changes the internal `dag` state without updating
`snapshot_map`. That will cause queries relying on `snapshot_map` to fail.
Update it so that `snapshot_map` gets updated by `add_heads`.

Reviewed By: sfilipco

Differential Revision: D21479019

fbshipit-source-id: 70528aa4a488cef3dc71bf21dd89e45cfe763794
2020-05-11 09:49:57 -07:00
Jun Wu
f014f86b7a dag: move NameDag algorithms to a trait
Summary:
This makes it easier to add an "in-memory-only" NameDag with all the algorithms
implemented.

Reviewed By: sfilipco

Differential Revision: D21479020

fbshipit-source-id: c1a73e95f3291c273c800650f70db2a7eb0966d7
2020-05-11 09:49:56 -07:00
Stefan Filip
aae5b96b8d segmented_changelog: add support for multiple repositories
Summary:
How is this Dag structure going to be used? This is probably the interesting
question for this diff.
On one side the structure could maintain a view of all the repositories and
manage the DAGs for all repositories in a central place. On the other side the
`Dag` is just an instance of a Changelog and Mononoke manages repositories that
each have a `Dag`. I went with the former pattern as it seems to me to be more
in line with the general architecture of Mononoke.

We can see the Dag being another part of the BlobRepo in the future. We will
want to avoid depending on the BlobRepo for actual functionality to avoid
cyclic dependencies. Currently the BlobRepo is used in construction for
convenience but that will have to change in the future.

Reviewed By: StanislavGlebik

Differential Revision: D21418367

fbshipit-source-id: 7c133eac0f38084615c2b9ba1466de626d2ffcbe
2020-05-11 09:12:08 -07:00
Mark Thomas
02e35c7039 commitcloud: remove indent from json.dumps args
Summary:
Commit cloud now uses `mercurial.json` rather than `json`.  This doesn't
support the `indent` arg, so remove this from the debug output when
`debugrequests` is enabled.

Reviewed By: farnz

Differential Revision: D21500306

fbshipit-source-id: ae436e9c32d1d2da432eeb93d114115ea80b825b
2020-05-11 09:12:08 -07:00
Mark Thomas
26f6dc8fb3 setup.py: add converter.py to fbsource-thrift blacklist
Reviewed By: farnz

Differential Revision: D21500308

fbshipit-source-id: 663f3d9457a153945f23b8e8bccd16f9c052b2cb
2020-05-11 09:12:07 -07:00
Igor Katson
246e3e142b Remove .compat() from edenapi_server/main.rs
Summary: This removes .compat() from edenapi_server/main.rs. The actual removal probably could be done with less code, but in addition to removing compat(), I made most of the blocking code async.

Reviewed By: kulshrax, farnz

Differential Revision: D21426641

fbshipit-source-id: 1b3de4dc0b24d06faeb73de2e8658f0629d9491d
2020-05-11 09:12:07 -07:00
David Tolnay
c854d5ef5b Remove configurations where we are using the default
Summary: We don't need to include settings in rustfmt.toml where we just use the default value. Maybe we set these back when they used to have a different default value.

Reviewed By: zertosh

Differential Revision: D21497076

fbshipit-source-id: 687d1aef1af9aca33261f679a91cc049bbf70d0a
2020-05-10 16:06:06 -07:00
svcscm
db6c795410 Updating submodules
Summary:
GitHub commits:

99612a3f69

Reviewed By: jurajh-fb

fbshipit-source-id: 08133876034f1a20ff025770aaa2b18c7c304342
2020-05-10 16:06:06 -07:00
svcscm
1bf7ac2fae Updating submodules
Summary:
GitHub commits:

0f963e26bc
aeabaf80fc
19dae4b3a0

Reviewed By: jurajh-fb

fbshipit-source-id: 4812cd06a780a9f5cb0ac3cb9f3dda91a4e1d2e8
2020-05-09 19:12:25 -07:00
Xavier Deguillard
1d10a0e1a0 config: add the TomlConfigTest.cpp to CMake
Summary: All the tests are passing.

Reviewed By: wez

Differential Revision: D21319018

fbshipit-source-id: 26335f39d39bdc379c00e65942c2cc7c6853089b
2020-05-09 08:46:36 -07:00
Xavier Deguillard
8220cac785 config: add FileChangeMonitorTest to the CMake build
Summary:
The disabled tests are due to the st_mtime stored in the struct stat only
having a second granularity (as expected), but the tests are changing these
files faster than that, causing them to fail. I'll attempt to fix the file
change detection mechanism on a later diff.

Reviewed By: wez

Differential Revision: D21319025

fbshipit-source-id: a3f2d62a3ce56fea37a62bfad73306ac1556f772
2020-05-09 08:46:35 -07:00
Xavier Deguillard
dd9ec5dffd config: add EdenConfigTest.cpp to CMake
Summary:
Same as the previous one, paths are different on Windows, and thus we need to
test against a different path.

Reviewed By: wez

Differential Revision: D21319021

fbshipit-source-id: 849c86574e69c3f638ea180c3b594aaeae2970ad
2020-05-09 08:46:35 -07:00
Xavier Deguillard
255b6777f9 config: add ConfigSettingTest to CMake
Summary:
The use of realpath is needed to resolve a unix-style path to a Windows style
one. This helps keep the test generic with no `#ifdef _WIN32`

Reviewed By: wez

Differential Revision: D21319019

fbshipit-source-id: b8cdd81f0afdd135849a5b850d854399cef8cef8
2020-05-09 08:46:35 -07:00
svcscm
9da8207f89 Updating submodules
Summary:
GitHub commits:

857fa3c5c8

Reviewed By: jurajh-fb

fbshipit-source-id: d5794a10fb31ad4734ebeeb0151e465c2eafa6f4
2020-05-09 08:46:34 -07:00
svcscm
7ce59f5e27 Updating submodules
Summary:
GitHub commits:

1c90e20961
3a1c29d40e

Reviewed By: jurajh-fb

fbshipit-source-id: 6429491b5ff43f834860e2c66c1b754a0ff6969f
2020-05-08 21:51:29 -07:00
Xavier Deguillard
a4af481237 getdeps: silence inherits via dominance warnings
Summary:
Previously, the Windows build was litered with warnings of the form (typo included):

  warning C4250: 'C1': inherits 'C2::C2::method' via dominance
  note: see declaration of 'C2::method'

Microsoft doesn't offer any recommendation, and the internet suggest that the
right `using` should silence it. That's unfortunately not the case, adding:
  using C2::method
In `C1` doesn't do anything, and the compiler still complains :(.

Since the warning appears to be non-actionable, and looks more like a
"notice" than a warning, let's just silence it.

Reviewed By: wez

Differential Revision: D21395095

fbshipit-source-id: ae661b3ed61303e6361b8a15d9e7c6b9627ea8c1
2020-05-08 21:46:06 -07:00
Chad Austin
a31f57db1a disable pthread cancellation on the FuseChannel threads
Summary:
In glibc, pthread cancellation support adds two atomic CAS operations
to each "cancellation point" syscall (see pthreads(7)). This includes
read() and write(). We can avoid that overhead by disabling pthread
cancellation at the start of the FUSE worker threads.

This saves two CAS operations (~40 ns) in the critical FUSE request
processing loop.

Reviewed By: simpkins

Differential Revision: D21469690

fbshipit-source-id: 7f28a2a8e831006351657981e901dc572c58cf48
2020-05-08 20:41:50 -07:00
svcscm
5ea5261b0b Updating submodules
Summary:
GitHub commits:

875a2dd743
7ddd03f5b7
09a4848005
2dfe12ed17

Reviewed By: jurajh-fb

fbshipit-source-id: a8b1ce8b34c9088bab17b6dfa3f66bc9c84d6d41
2020-05-08 20:41:50 -07:00