2020-06-17 16:26:05 +03:00
|
|
|
[package]
|
|
|
|
name = "eden_mononoke"
|
|
|
|
edition = "2018"
|
|
|
|
version = "0.1.0"
|
|
|
|
authors = ['Facebook']
|
|
|
|
license = "GPLv2+"
|
2020-10-30 03:35:41 +03:00
|
|
|
include = ["cmds/admin/**/*.rs", "cmds/aliasverify.rs", "cmds/backfill_derived_data/**/*.rs", "cmds/backfill_git_mapping.rs", "cmds/benchmark_filestore.rs", "cmds/benchmark_storage_config/**/*.rs", "cmds/blobimport.rs", "cmds/blobstore_healer/**/*.rs", "cmds/bonsai_verify/**/*.rs", "cmds/configlint.rs", "cmds/dumprev.rs", "cmds/idxdump.rs", "cmds/lfs_import.rs", "cmds/manual_scrub/**/*.rs", "cmds/rechunker.rs", "cmds/revlogrepo.rs", "cmds/segmented_changelog_seeder.rs", "cmds/segmented_changelog_tailer.rs", "cmds/sqlblob_gc/**/*.rs", "cmds/statistics_collector.rs", "cmds/streaming_clone_warmup/**/*.rs", "cmds/upload_globalrevs.rs"]
|
2020-07-11 08:08:09 +03:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "admin"
|
|
|
|
path = "cmds/admin/main.rs"
|
2020-06-17 16:26:05 +03:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "aliasverify"
|
|
|
|
path = "cmds/aliasverify.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "backfill_derived_data"
|
|
|
|
path = "cmds/backfill_derived_data/main.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "backfill_git_mapping"
|
|
|
|
path = "cmds/backfill_git_mapping.rs"
|
|
|
|
|
2020-07-11 08:08:09 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "benchmark_filestore"
|
|
|
|
path = "cmds/benchmark_filestore.rs"
|
|
|
|
|
2020-06-17 16:26:05 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "benchmark_storage_config"
|
|
|
|
path = "cmds/benchmark_storage_config/main.rs"
|
|
|
|
|
2020-07-13 12:58:20 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "blobimport"
|
|
|
|
path = "cmds/blobimport.rs"
|
|
|
|
|
2020-07-13 12:58:20 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "blobstore_healer"
|
|
|
|
path = "cmds/blobstore_healer/main.rs"
|
|
|
|
|
2020-06-17 16:26:05 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "bonsai_verify"
|
|
|
|
path = "cmds/bonsai_verify/main.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "configlint"
|
|
|
|
path = "cmds/configlint.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "dumprev"
|
|
|
|
path = "cmds/dumprev.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "idxdump"
|
|
|
|
path = "cmds/idxdump.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "lfs_import"
|
|
|
|
path = "cmds/lfs_import.rs"
|
|
|
|
|
2020-07-10 10:59:29 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "manual_scrub"
|
|
|
|
path = "cmds/manual_scrub/main.rs"
|
|
|
|
|
2020-06-17 16:26:05 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "rechunker"
|
|
|
|
path = "cmds/rechunker.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "revlogrepo"
|
|
|
|
path = "cmds/revlogrepo.rs"
|
|
|
|
|
2020-10-08 19:41:16 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "segmented_changelog_seeder"
|
|
|
|
path = "cmds/segmented_changelog_seeder.rs"
|
|
|
|
|
2020-10-28 20:22:18 +03:00
|
|
|
[[bin]]
|
2020-10-30 03:35:41 +03:00
|
|
|
name = "segmented_changelog_tailer"
|
|
|
|
path = "cmds/segmented_changelog_tailer.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
2020-10-28 20:22:18 +03:00
|
|
|
name = "sqlblob_gc"
|
|
|
|
path = "cmds/sqlblob_gc/main.rs"
|
|
|
|
|
2020-06-17 16:26:05 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "statistics_collector"
|
|
|
|
path = "cmds/statistics_collector.rs"
|
|
|
|
|
2020-09-01 17:12:10 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "streaming_clone_warmup"
|
|
|
|
path = "cmds/streaming_clone_warmup/main.rs"
|
|
|
|
|
2020-06-17 16:26:05 +03:00
|
|
|
[[bin]]
|
|
|
|
name = "upload_globalrevs"
|
|
|
|
path = "cmds/upload_globalrevs.rs"
|
|
|
|
|
|
|
|
[dependencies]
|
2021-01-26 09:08:20 +03:00
|
|
|
backsyncer = { path = "commit_rewriting/backsyncer", version = "0.1.0" }
|
|
|
|
blame = { path = "derived_data/blame", version = "0.1.0" }
|
|
|
|
blobimport_lib = { path = "blobimport_lib", version = "0.1.0" }
|
|
|
|
blobrepo = { path = "blobrepo", version = "0.1.0" }
|
|
|
|
blobrepo_factory = { path = "blobrepo/factory", version = "0.1.0" }
|
|
|
|
blobrepo_hg = { path = "blobrepo/blobrepo_hg", version = "0.1.0" }
|
|
|
|
blobrepo_override = { path = "blobrepo/override", version = "0.1.0" }
|
|
|
|
blobrepo_utils = { path = "blobrepo_utils", version = "0.1.0" }
|
|
|
|
blobstore = { path = "blobstore", version = "0.1.0" }
|
|
|
|
blobstore_factory = { path = "blobstore/factory", version = "0.1.0" }
|
|
|
|
blobstore_sync_queue = { path = "blobstore_sync_queue", version = "0.1.0" }
|
|
|
|
bonsai_globalrev_mapping = { path = "bonsai_globalrev_mapping", version = "0.1.0" }
|
|
|
|
bookmark_renaming = { path = "commit_rewriting/bookmark_renaming", version = "0.1.0" }
|
|
|
|
bookmarks = { path = "bookmarks", version = "0.1.0" }
|
2021-02-01 16:28:45 +03:00
|
|
|
bookmarks_movement = { path = "bookmarks/bookmarks_movement", version = "0.1.0" }
|
2021-01-26 09:08:20 +03:00
|
|
|
bounded_traversal = { path = "common/bounded_traversal", version = "0.1.0" }
|
|
|
|
bulkops = { path = "bulkops", version = "0.1.0" }
|
|
|
|
cacheblob = { path = "blobstore/cacheblob", version = "0.1.0" }
|
|
|
|
changeset_fetcher = { path = "blobrepo/changeset_fetcher", version = "0.1.0" }
|
|
|
|
changesets = { path = "changesets", version = "0.1.0" }
|
|
|
|
cmdlib = { path = "cmdlib", version = "0.1.0" }
|
|
|
|
context = { path = "server/context", version = "0.1.0" }
|
2021-01-27 13:44:40 +03:00
|
|
|
copy_utils = { path = "common/copy_utils", version = "0.1.0" }
|
2021-01-26 09:08:20 +03:00
|
|
|
cross_repo_sync = { path = "commit_rewriting/cross_repo_sync", version = "0.1.0" }
|
|
|
|
dbbookmarks = { path = "bookmarks/dbbookmarks", version = "0.1.0" }
|
|
|
|
deleted_files_manifest = { path = "derived_data/deleted_files_manifest", version = "0.1.0" }
|
|
|
|
derived_data = { path = "derived_data", version = "0.1.0" }
|
|
|
|
derived_data_filenodes = { path = "derived_data/filenodes", version = "0.1.0" }
|
|
|
|
derived_data_utils = { path = "derived_data/utils", version = "0.1.0" }
|
|
|
|
fastlog = { path = "derived_data/fastlog", version = "0.1.0" }
|
|
|
|
filenodes = { path = "filenodes", version = "0.1.0" }
|
|
|
|
filestore = { path = "filestore", version = "0.1.0" }
|
|
|
|
fsnodes = { path = "derived_data/fsnodes", version = "0.1.0" }
|
|
|
|
git_types = { path = "git/git_types", version = "0.1.0" }
|
|
|
|
lfs_import_lib = { path = "lfs_import_lib", version = "0.1.0" }
|
|
|
|
live_commit_sync_config = { path = "commit_rewriting/live_commit_sync_config", version = "0.1.0" }
|
|
|
|
manifest = { path = "manifest", version = "0.1.0" }
|
|
|
|
memblob = { path = "blobstore/memblob", version = "0.1.0" }
|
|
|
|
mercurial_bundle_replay_data = { path = "mercurial/bundle_replay_data", version = "0.1.0" }
|
|
|
|
mercurial_derived_data = { path = "derived_data/mercurial_derived_data", version = "0.1.0" }
|
|
|
|
mercurial_revlog = { path = "mercurial/revlog", version = "0.1.0" }
|
|
|
|
mercurial_types = { path = "mercurial/types", version = "0.1.0" }
|
|
|
|
metaconfig_types = { path = "metaconfig/types", version = "0.1.0" }
|
|
|
|
mononoke_hg_sync_job_helper_lib = { path = "mononoke_hg_sync_job", version = "0.1.0" }
|
|
|
|
mononoke_types = { path = "mononoke_types", version = "0.1.0" }
|
|
|
|
mutable_counters = { path = "mutable_counters", version = "0.1.0" }
|
|
|
|
prefixblob = { path = "blobstore/prefixblob", version = "0.1.0" }
|
|
|
|
pushrebase = { path = "pushrebase", version = "0.1.0" }
|
|
|
|
redactedblobstore = { path = "blobstore/redactedblobstore", version = "0.1.0" }
|
|
|
|
revset = { path = "revset", version = "0.1.0" }
|
|
|
|
scuba_ext = { path = "common/scuba_ext", version = "0.1.0" }
|
|
|
|
segmented_changelog = { path = "segmented_changelog", version = "0.1.0" }
|
|
|
|
skeleton_manifest = { path = "derived_data/skeleton_manifest", version = "0.1.0" }
|
|
|
|
skiplist = { path = "reachabilityindex/skiplist", version = "0.1.0" }
|
|
|
|
sql_construct = { path = "common/sql_construct", version = "0.1.0" }
|
|
|
|
sql_ext = { path = "common/rust/sql_ext", version = "0.1.0" }
|
|
|
|
sqlblob = { path = "blobstore/sqlblob", version = "0.1.0" }
|
|
|
|
streaming_clone = { path = "repo_client/streaming_clone", version = "0.1.0" }
|
|
|
|
synced_commit_mapping = { path = "commit_rewriting/synced_commit_mapping", version = "0.1.0" }
|
|
|
|
throttledblob = { path = "blobstore/throttledblob", version = "0.1.0" }
|
|
|
|
unodes = { path = "derived_data/unodes", version = "0.1.0" }
|
|
|
|
xdiff = { path = "../scm/lib/xdiff", version = "0.1.0" }
|
|
|
|
borrowed = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
cached_config = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
cachelib = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
cloned = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
failure_ext = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
fbinit = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
fbthrift = { git = "https://github.com/facebook/fbthrift.git", branch = "master", version = "0.0.1+unstable" }
|
|
|
|
futures_ext = { package = "futures_01_ext", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
blobstore_healer: use buffered_weight_limited to avoid OOMs
Summary:
`blobstore_healer` works by healing blobs in turn, with some level of concurrency. Healing each blob consumes at least `O(blob_size)` or memory, so healing multiple blobs consumes their combined size of memory. Because blob sizes are not distributed uniformly, we cannot just calculate the desired concurrency level once and for all. Prior to this diff, this is what we did and whenever a few multi-gb blobs ended up in the same concurrently-healed batch, the healer OOMed. To help with this problem, this diff starts using dynamic concurrency - it assigns weight to each healed blob and only concurrently heals up to a certain total weight of blobs. This way, we can limit the total amount of memory consumed by our healer.
This solution is not perfect for a variety of reasons:
- if a single blob is larger than the total allowed weight, we'll still let it through. It's better than never healing it, but it means that OOMs are still possible in theory.
- we do not yet know the sizes of all the blobs in the queue. To mitigate that, I took a look at the known sizes distribution and saw that between 0 and 2KB is the most common size range. I defaulted to 1KB size of the unknown blob
Note 1: I had to make `heal_blob` consume it's args instead of borrowing them because `buffered_weight_limited` needs `'static` lifetime for the futures.
Note 2: When using `futures_ext`, I explicitly rename them to `futures_03_ext`, despite the fact that `blobstore_healer` does not depend on the older version. This is because `Cargo.toml` uses the same `[dependencies]` section for the combined dependencies of all the targets in the same `TARGETS` file. As there are other targets that claim the name of `futures_ext` for 0.1 version, I decided that it's easier to just use `_03_` name here than fix in other places. We can always change that of course.
Reviewed By: krallin
Differential Revision: D26106044
fbshipit-source-id: 4931d86d6e85d055ed0eefdd357b9ba6266a1c37
2021-01-29 21:10:34 +03:00
|
|
|
futures_03_ext = { package = "futures_ext", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
2021-01-26 09:08:20 +03:00
|
|
|
futures_stats = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
lock_ext = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
stats = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
time_ext = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
|
|
|
tracing = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master", version = "0.1.0" }
|
2020-06-17 16:26:05 +03:00
|
|
|
anyhow = "1.0"
|
|
|
|
ascii = "1.0"
|
|
|
|
async-trait = "0.1.29"
|
|
|
|
bytes = { version = "0.5", features = ["serde"] }
|
2021-01-27 23:33:05 +03:00
|
|
|
bytesize = "1.0"
|
2020-07-13 12:58:20 +03:00
|
|
|
chrono = { version = "0.4", features = ["serde"] }
|
2020-06-17 16:26:05 +03:00
|
|
|
clap = "2.33"
|
2020-10-01 19:26:04 +03:00
|
|
|
criterion = "=0.3.1"
|
2020-07-07 06:47:39 +03:00
|
|
|
futures = { version = "0.3.5", features = ["async-await", "compat"] }
|
2021-01-25 19:04:36 +03:00
|
|
|
futures-old = { package = "futures", version = "0.1.30" }
|
2020-12-18 17:08:52 +03:00
|
|
|
futures-util = "0.3.7"
|
2020-11-30 17:21:58 +03:00
|
|
|
humantime = "1.3"
|
2020-06-17 16:26:05 +03:00
|
|
|
itertools = "0.8"
|
2020-07-13 12:58:20 +03:00
|
|
|
lazy_static = "1.0"
|
2020-10-19 19:44:08 +03:00
|
|
|
maplit = "1.0"
|
2020-06-17 16:26:05 +03:00
|
|
|
rand = { version = "0.7", features = ["small_rng"] }
|
2020-12-30 09:57:57 +03:00
|
|
|
regex = "1.4.2"
|
2020-06-17 16:26:05 +03:00
|
|
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
|
|
|
serde_derive = "1.0"
|
2020-12-09 05:28:35 +03:00
|
|
|
serde_json = { version = "1.0", features = ["float_roundtrip"] }
|
2020-06-17 16:26:05 +03:00
|
|
|
sha2 = "0.8"
|
|
|
|
slog = { version = "2.5", features = ["max_level_debug"] }
|
2020-07-11 08:08:09 +03:00
|
|
|
thiserror = "1.0"
|
2021-01-25 19:04:36 +03:00
|
|
|
tokio = { version = "0.2.24", features = ["full", "test-util"] }
|
2020-06-17 16:26:05 +03:00
|
|
|
tokio-compat = "0.1"
|
2020-07-11 08:08:09 +03:00
|
|
|
tokio-timer = "0.2"
|
2020-09-09 03:51:25 +03:00
|
|
|
tokio-util = { version = "0.2", features = ["codec", "udp"] }
|
2020-12-17 18:43:34 +03:00
|
|
|
toml = "=0.5.7"
|
2020-06-17 16:26:05 +03:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2021-01-26 09:08:20 +03:00
|
|
|
fixtures = { path = "tests/fixtures", version = "0.1.0" }
|
|
|
|
tests_utils = { path = "tests/utils", version = "0.1.0" }
|
2020-06-17 16:26:05 +03:00
|
|
|
|
2020-02-13 11:11:03 +03:00
|
|
|
[workspace]
|
|
|
|
|
|
|
|
members = [
|
2020-06-11 04:08:35 +03:00
|
|
|
".",
|
2021-01-20 20:14:11 +03:00
|
|
|
"alpn",
|
2020-03-31 13:56:11 +03:00
|
|
|
"benchmark",
|
2020-05-06 18:40:41 +03:00
|
|
|
"blobimport_lib",
|
2020-08-12 18:48:16 +03:00
|
|
|
"blobimport_lib/consts",
|
2020-03-31 13:56:11 +03:00
|
|
|
"blobrepo",
|
2020-06-22 17:20:47 +03:00
|
|
|
"blobrepo/blobrepo_hg",
|
2020-03-31 13:56:11 +03:00
|
|
|
"blobrepo/blobsync",
|
|
|
|
"blobrepo/changeset_fetcher",
|
2020-09-09 12:46:42 +03:00
|
|
|
"blobrepo/common",
|
2020-03-31 13:56:11 +03:00
|
|
|
"blobrepo/errors",
|
|
|
|
"blobrepo/factory",
|
2020-06-22 17:20:47 +03:00
|
|
|
"blobrepo/override",
|
2020-03-31 13:56:11 +03:00
|
|
|
"blobrepo/repo_blobstore",
|
2020-04-08 13:01:39 +03:00
|
|
|
"blobrepo_utils",
|
2020-02-19 16:13:31 +03:00
|
|
|
"blobstore",
|
2020-05-15 20:26:47 +03:00
|
|
|
"blobstore/blobstore_stats",
|
2020-03-27 18:09:08 +03:00
|
|
|
"blobstore/cacheblob",
|
2020-03-06 12:28:21 +03:00
|
|
|
"blobstore/chaosblob",
|
|
|
|
"blobstore/delayblob",
|
2020-03-31 13:56:11 +03:00
|
|
|
"blobstore/factory",
|
2020-03-06 12:28:21 +03:00
|
|
|
"blobstore/fileblob",
|
2020-03-27 18:09:08 +03:00
|
|
|
"blobstore/if",
|
2020-05-15 20:26:47 +03:00
|
|
|
"blobstore/logblob",
|
2020-03-06 12:28:21 +03:00
|
|
|
"blobstore/memblob",
|
2020-03-27 21:37:45 +03:00
|
|
|
"blobstore/multiplexedblob",
|
2020-06-16 14:09:54 +03:00
|
|
|
"blobstore/packblob",
|
2020-06-16 14:09:54 +03:00
|
|
|
"blobstore/packblob/if",
|
2020-03-06 12:28:21 +03:00
|
|
|
"blobstore/prefixblob",
|
|
|
|
"blobstore/readonlyblob",
|
|
|
|
"blobstore/redactedblobstore",
|
2020-03-23 15:06:51 +03:00
|
|
|
"blobstore/samplingblob",
|
2020-03-27 18:09:08 +03:00
|
|
|
"blobstore/sqlblob",
|
2020-03-06 12:28:21 +03:00
|
|
|
"blobstore/throttledblob",
|
2020-07-03 15:51:08 +03:00
|
|
|
"blobstore/virtually_sharded_blobstore",
|
2020-03-27 21:37:45 +03:00
|
|
|
"blobstore_sync_queue",
|
2020-03-31 13:56:11 +03:00
|
|
|
"bonsai_git_mapping",
|
2020-04-08 13:01:39 +03:00
|
|
|
"bonsai_git_mapping/git_mapping_pushrebase_hook",
|
2020-03-31 13:56:11 +03:00
|
|
|
"bonsai_globalrev_mapping",
|
2020-04-08 13:01:39 +03:00
|
|
|
"bonsai_globalrev_mapping/globalrev_pushrebase_hook",
|
2020-12-07 19:21:28 +03:00
|
|
|
"bonsai_globalrev_mapping/if",
|
2020-03-31 13:56:11 +03:00
|
|
|
"bonsai_hg_mapping",
|
|
|
|
"bonsai_hg_mapping/if",
|
|
|
|
"bookmarks",
|
2020-08-14 12:26:47 +03:00
|
|
|
"bookmarks/bookmarks_movement",
|
2020-03-27 18:09:08 +03:00
|
|
|
"bookmarks/bookmarks_types",
|
2020-03-31 13:56:11 +03:00
|
|
|
"bookmarks/dbbookmarks",
|
2020-04-08 13:01:39 +03:00
|
|
|
"bookmarks/warm_bookmarks_cache",
|
2020-05-14 02:51:05 +03:00
|
|
|
"bulkops",
|
2021-01-11 21:53:52 +03:00
|
|
|
"bulkops/bench",
|
2020-05-06 16:08:02 +03:00
|
|
|
"cache_warmup",
|
2020-03-31 13:56:11 +03:00
|
|
|
"changesets",
|
|
|
|
"changesets/if",
|
2020-04-08 13:01:39 +03:00
|
|
|
"cmdlib",
|
2020-04-08 13:01:39 +03:00
|
|
|
"cmdlib/x_repo",
|
2020-07-23 16:20:54 +03:00
|
|
|
"commit_rewriting/backsyncer",
|
2020-04-08 13:01:39 +03:00
|
|
|
"commit_rewriting/bookmark_renaming",
|
2020-07-31 18:57:13 +03:00
|
|
|
"commit_rewriting/bookmarks_validator",
|
|
|
|
"commit_rewriting/commit_validator",
|
2020-04-08 13:01:39 +03:00
|
|
|
"commit_rewriting/cross_repo_sync",
|
|
|
|
"commit_rewriting/cross_repo_sync/test_utils",
|
commmit_rewriting: introduce live_commit_sync_config
Summary:
`LiveCommitSyncConfig` is intended to be a fundamental struct, on which live push-redirection and commit sync config for push-redurector, x-repo sync job, backsyncer, commit and bookmark validators are based.
The struct wraps a few `ConfigStore` handles, which allows it to query latest values every time one of the public methods is called. Callers receive parsed structs/values (`true`/`false` for push redirection config, `CommitSyncConfig` for the rest), which they later need to use to build things like `Mover`, `BookmarkRenamer`, `CommitSyncer`, `CommitRepos` and so on. For now the idea is to rebuild these derived structs every time, but we can later add a memoization layer, if the overhead is going to be large.
Reviewed By: StanislavGlebik
Differential Revision: D22095975
fbshipit-source-id: 58e1f1d8effe921b0dc264fffa785593ef188665
2020-06-25 13:25:25 +03:00
|
|
|
"commit_rewriting/live_commit_sync_config",
|
2020-07-30 16:43:23 +03:00
|
|
|
"commit_rewriting/megarepo",
|
2020-07-31 18:57:13 +03:00
|
|
|
"commit_rewriting/mononoke_x_repo_sync_job",
|
2020-04-08 13:01:39 +03:00
|
|
|
"commit_rewriting/movers",
|
|
|
|
"commit_rewriting/synced_commit_mapping",
|
2020-05-06 18:40:41 +03:00
|
|
|
"common/allocation_tracing",
|
2020-03-06 12:28:21 +03:00
|
|
|
"common/async_limiter",
|
|
|
|
"common/async_limiter/examples/tokio_v2",
|
2020-04-07 17:05:41 +03:00
|
|
|
"common/bounded_traversal",
|
2021-01-27 13:44:40 +03:00
|
|
|
"common/copy_utils",
|
2020-05-06 18:40:41 +03:00
|
|
|
"common/dedupmap",
|
2021-02-04 21:37:01 +03:00
|
|
|
"common/futures_watchdog",
|
2020-10-05 09:49:34 +03:00
|
|
|
"common/iterhelpers",
|
2020-03-31 13:56:11 +03:00
|
|
|
"common/rust/caching_ext",
|
2020-05-06 16:08:02 +03:00
|
|
|
"common/rust/slog_ext",
|
2020-03-06 12:28:21 +03:00
|
|
|
"common/rust/sql_ext",
|
2020-06-29 22:05:40 +03:00
|
|
|
"common/scribe_ext",
|
2020-02-14 12:24:14 +03:00
|
|
|
"common/scuba_ext",
|
2020-04-02 15:24:53 +03:00
|
|
|
"common/sql_construct",
|
2020-03-31 13:56:11 +03:00
|
|
|
"common/topo_sort",
|
2020-06-22 17:20:47 +03:00
|
|
|
"common/type_map",
|
2020-03-31 13:56:11 +03:00
|
|
|
"common/uniqueheap",
|
|
|
|
"derived_data",
|
|
|
|
"derived_data/blame",
|
|
|
|
"derived_data/changeset_info",
|
|
|
|
"derived_data/changeset_info/if",
|
|
|
|
"derived_data/deleted_files_manifest",
|
|
|
|
"derived_data/fastlog",
|
|
|
|
"derived_data/filenodes",
|
|
|
|
"derived_data/fsnodes",
|
|
|
|
"derived_data/mercurial_derived_data",
|
2020-11-12 00:21:42 +03:00
|
|
|
"derived_data/skeleton_manifest",
|
2020-11-09 17:45:40 +03:00
|
|
|
"derived_data/test_utils",
|
2020-03-31 13:56:11 +03:00
|
|
|
"derived_data/unodes",
|
|
|
|
"derived_data/utils",
|
2020-06-05 16:21:37 +03:00
|
|
|
"edenapi_server",
|
2021-02-04 21:37:01 +03:00
|
|
|
"edenapi_service",
|
2020-05-06 18:40:41 +03:00
|
|
|
"fastreplay",
|
2020-03-27 21:37:45 +03:00
|
|
|
"filenodes",
|
|
|
|
"filenodes/if",
|
|
|
|
"filestore",
|
2020-03-31 13:56:11 +03:00
|
|
|
"git/git_types",
|
|
|
|
"git/git_types/if",
|
2020-05-06 18:40:41 +03:00
|
|
|
"git/gitimport",
|
2020-06-19 17:11:47 +03:00
|
|
|
"git/import_tools",
|
2020-06-11 04:08:35 +03:00
|
|
|
"gotham_ext",
|
|
|
|
"hgcli",
|
2020-05-06 16:08:02 +03:00
|
|
|
"hgproto",
|
2020-05-06 18:40:41 +03:00
|
|
|
"hook_tailer",
|
2020-04-23 13:41:09 +03:00
|
|
|
"hooks",
|
|
|
|
"hooks/content-stores",
|
2020-08-17 19:07:36 +03:00
|
|
|
"hooks/hook_manager_factory",
|
2020-05-06 18:40:41 +03:00
|
|
|
"lfs_import_lib",
|
2020-02-27 03:28:20 +03:00
|
|
|
"lfs_protocol",
|
2020-06-05 16:21:37 +03:00
|
|
|
"lfs_server",
|
2020-05-04 14:31:52 +03:00
|
|
|
"load_limiter",
|
2020-03-27 21:37:45 +03:00
|
|
|
"manifest",
|
2020-07-10 14:44:58 +03:00
|
|
|
"mercurial/bundle_replay_data",
|
2020-04-14 17:46:18 +03:00
|
|
|
"mercurial/bundles",
|
2020-04-23 18:55:55 +03:00
|
|
|
"mercurial/mutation",
|
2020-04-08 19:46:16 +03:00
|
|
|
"mercurial/revlog",
|
2020-03-27 21:37:45 +03:00
|
|
|
"mercurial/types",
|
|
|
|
"mercurial/types/if",
|
|
|
|
"mercurial/types/mocks",
|
2020-03-31 13:56:11 +03:00
|
|
|
"metaconfig/parser",
|
2020-03-27 18:09:08 +03:00
|
|
|
"metaconfig/types",
|
2020-05-06 16:08:02 +03:00
|
|
|
"microwave",
|
|
|
|
"microwave/builder",
|
|
|
|
"microwave/if",
|
2020-06-05 16:21:37 +03:00
|
|
|
"mononoke_api",
|
2021-02-01 18:49:57 +03:00
|
|
|
"mononoke_api_hg",
|
2020-07-30 12:43:24 +03:00
|
|
|
"mononoke_hg_sync_job",
|
2020-02-24 16:19:52 +03:00
|
|
|
"mononoke_types",
|
|
|
|
"mononoke_types/if",
|
|
|
|
"mononoke_types/mocks",
|
2020-04-08 13:01:39 +03:00
|
|
|
"mutable_counters",
|
2020-03-31 13:56:11 +03:00
|
|
|
"newfilenodes",
|
2020-12-05 01:25:24 +03:00
|
|
|
"observability",
|
2020-04-23 13:41:09 +03:00
|
|
|
"permission_checker",
|
2020-03-31 13:56:11 +03:00
|
|
|
"phases",
|
2020-04-08 13:01:39 +03:00
|
|
|
"pushrebase",
|
2020-03-31 13:56:11 +03:00
|
|
|
"reachabilityindex",
|
|
|
|
"reachabilityindex/common",
|
|
|
|
"reachabilityindex/if",
|
|
|
|
"reachabilityindex/skiplist",
|
|
|
|
"reachabilityindex/test-helpers",
|
2020-07-30 16:43:23 +03:00
|
|
|
"regenerate_hg_filenodes",
|
2020-05-06 16:08:02 +03:00
|
|
|
"repo_client",
|
|
|
|
"repo_client/getbundle_response",
|
|
|
|
"repo_client/mononoke_repo",
|
|
|
|
"repo_client/obsolete",
|
|
|
|
"repo_client/remotefilelog",
|
|
|
|
"repo_client/repo_read_write_status",
|
2020-05-07 15:09:54 +03:00
|
|
|
"repo_client/reverse_filler_queue",
|
2020-05-06 16:08:02 +03:00
|
|
|
"repo_client/scribe_commit_queue",
|
|
|
|
"repo_client/streaming_clone",
|
|
|
|
"repo_client/unbundle",
|
|
|
|
"repo_client/wirepack",
|
2020-06-17 13:20:13 +03:00
|
|
|
"repo_import",
|
2020-03-31 13:56:11 +03:00
|
|
|
"revset",
|
|
|
|
"revset/revset-test-helper",
|
2020-06-12 16:52:36 +03:00
|
|
|
"segmented_changelog",
|
2020-05-06 16:08:02 +03:00
|
|
|
"server",
|
2020-02-19 16:13:31 +03:00
|
|
|
"server/context",
|
2020-05-06 16:08:02 +03:00
|
|
|
"server/monitoring",
|
|
|
|
"server/repo_listener",
|
2020-02-13 11:11:03 +03:00
|
|
|
"server/session_id",
|
|
|
|
"sshrelay",
|
2020-03-31 13:56:11 +03:00
|
|
|
"tests/fixtures",
|
|
|
|
"tests/utils",
|
2020-05-06 18:40:41 +03:00
|
|
|
"tests/write_stub_log_entry",
|
2020-05-05 18:00:18 +03:00
|
|
|
"time_window_counter",
|
mononoke: Add tunables - a simple form of config hot reloading
Summary:
Currently, Mononoke's configs are loaded at startup and only refreshed
during restart. There are some exceptions to this, including throttling limits.
Other Mononoke services (such as the LFS server) have their own implementations
of hot reloadable configs, however there isn't a universally agreed upon method.
Static configs makes it hard to roll out features gradually and safely. If a
bad config option is enabled, it can't be rectified until the entire tier is
restarted. However, Mononoke's code is structured with static configs in mind
and doesn't support hot reloading. Changing this would require a lot of work
(imagine trying to swap out blobstore configs during run time) and wouldn't
necessarily provide much benefit.
Instead, add a subset of hot reloadable configs called tunables. Tunables are
accessible from anywhere in the code and are cheap to read as they only require
reading an atomic value. This means that they can be used even in hot code
paths.
Currently tunables support reloading boolean values and i64s. In the future,
I'd like to expand tunables to include more functionality, such as a rollout
percentage.
The `--tunables-config` flag points to a configerator spec that exports a
Tunables thrift struct. This allows differents tiers and Mononoke services to
have their own tunables. If this isn't provided, `MononokeTunables::default()`
will be used.
This diff adds a proc_macro that will generate the relevant `get` and `update`
methods for the fields added to a struct which derives `Tunables`. This struct is
then stored in a `once_cell` and can be accessed using `tunables::tunables()`.
To add a new tunable, add a field to the `MononokeTunables` struct that is of
type `AtomicBool` or `AtomicI64`. Update the relevant tunables configerator
config to include your new field, with the exact same name.
Removing a tunable from `MononokeTunables` is fine, as is removing a tunable
from configerator.
If the `--tunables-config` path isn't passed, then a default tunables config
located at `scm/mononoke/tunables/default` will be loaded. There is also the
`--disable-tunables` flag that won't load anything from configerator, it
will instead use the `Tunable` struct's `default()` method to initialise it.
This is useful in integration tests.
Reviewed By: StanislavGlebik
Differential Revision: D21177252
fbshipit-source-id: 02a93c1ceee99066019b23d81ea308e4c565d371
2020-05-01 02:06:10 +03:00
|
|
|
"tunables",
|
|
|
|
"tunables/tunables-derive",
|
2020-05-06 18:40:41 +03:00
|
|
|
"unbundle_replay",
|
2020-06-05 16:21:37 +03:00
|
|
|
"walker",
|
2020-02-13 11:11:03 +03:00
|
|
|
]
|
2020-06-17 16:26:05 +03:00
|
|
|
|
|
|
|
[patch.crates-io]
|
2020-12-11 17:52:26 +03:00
|
|
|
addr2line = { git ="https://github.com/gimli-rs/addr2line.git", rev = "0b6b6018b5b252a18e628fba03885f7d21844b3c" }
|
2020-11-19 23:56:30 +03:00
|
|
|
bytecount = { git = "https://github.com/llogiq/bytecount", rev = "469eaf8395c99397cd64d059737a9054aa014088" }
|
2020-06-17 16:26:05 +03:00
|
|
|
chashmap = { git = "https://gitlab.redox-os.org/ahornby/chashmap", rev = "901ace2ca3cdbc2095adb1af111d211e254e2aae" }
|
|
|
|
const-random = { git = "https://github.com/fbsource/const-random", rev = "374c5b46427fe2ffbf6acbd9c1687e0f1a809f95" }
|
2021-01-11 14:30:42 +03:00
|
|
|
gotham = { git = "https://github.com/krallin/gotham.git", rev = "da0b85605f5bf84988309446ceb87a4b87870334"}
|
|
|
|
gotham_derive = { git = "https://github.com/krallin/gotham.git", rev = "da0b85605f5bf84988309446ceb87a4b87870334"}
|
2020-11-21 03:58:47 +03:00
|
|
|
lru-disk-cache = { git = "https://github.com/mozilla/sccache", rev = "033ebaae69beeb0ac04e8c35d6ff1103487bd9a3" }
|
2020-12-09 05:28:35 +03:00
|
|
|
openssl = { git = "https://github.com/KapJI/rust-openssl", rev = "e0d808e27fec1818b1eecf362f69764ed860aa34" }
|
|
|
|
openssl-sys = { git = "https://github.com/KapJI/rust-openssl", rev = "e0d808e27fec1818b1eecf362f69764ed860aa34" }
|
2020-06-17 16:26:05 +03:00
|
|
|
prost = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
prost-build = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
prost-derive = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
prost-types = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
|
|
r2d2_sqlite = { git = "https://github.com/jsgf/r2d2-sqlite.git", rev = "6d77a828ca0a3c507a3f58561532a1b6c66c7918" }
|
|
|
|
rustfilt = { git = "https://github.com/jsgf/rustfilt.git", rev = "8141fa7f1caee562ee8daffb2ddeca3d1f0d36e5" }
|
2021-02-11 17:42:49 +03:00
|
|
|
sshcerts = { git = "https://github.com/diggyk/sshcerts.git", rev = "2d3bc7a7088195b8faf693cc8fbddfb09a8ba9a0" }
|
2021-02-02 12:34:14 +03:00
|
|
|
smallvec = { git = "https://github.com/ahornby/rust-smallvec.git", rev = "708e6f09ced4ed211a7c63f53bce7dfe2bbda478"}
|
2020-06-17 16:26:05 +03:00
|
|
|
tokio-core = { git = "https://github.com/bolinfest/tokio-core", rev = "5f37aa3c627d56ee49154bc851d6930f5ab4398f" }
|
2020-12-17 18:43:34 +03:00
|
|
|
toml = { git = "https://github.com/jsgf/toml-rs", branch = "dotted-table-0.5.7" }
|
2021-01-12 03:13:13 +03:00
|
|
|
enumset = { git = "https://github.com/danobi/enumset", rev = "4c01c583c27a725948fededbfb3461c572a669a4" }
|
2021-01-26 00:10:17 +03:00
|
|
|
cursive_buffered_backend = { git = "https://github.com/chengxiong-ruan/cursive_buffered_backend", branch = "upgrade_cursive_core_from_v0.4.1"}
|
2021-01-26 21:56:24 +03:00
|
|
|
hyper-02 = { git = "https://github.com/krallin/hyper.git", rev = "e5cc6150ebe82eae6daa3ec61c91296b19200a81", package = "hyper", version = "0.13.9" }
|