Commit Graph

7 Commits

Author SHA1 Message Date
Harvey Hunt
2504ed8b40 mononoke: Change stats prefix
Summary:
The stats prefix for bonsai hg mapping is "bonsai-hg-mapping" in lib.rs and
"bonsai_hg_mapping" in caching.rs. Convert lib.rs's prefix to match that of caching.rs,
making it easier to find stats.

Reviewed By: StanislavGlebik, farnz

Differential Revision: D16357147

fbshipit-source-id: f9c5bfa5a43c9b8c06ac8cb3b250cdf8fe689a28
2019-07-18 06:23:00 -07:00
Young Kim
f4e8e9bd0b Modify abomonation_future_cache to use VolatileLruCachePool
Summary: Add type safety to `abomonation_future_cache` by requiring usage of `VolatileLruCachePool`, and make that change for all usages of `LruCachePool`.

Reviewed By: farnz

Differential Revision: D15882275

fbshipit-source-id: 3f192142af254d7b6b8ea7f9cc586c2034c97b93
2019-06-21 23:35:07 -07:00
Thomas Orozco
a6004ae016 mononoke: caching_ext: elide DB calls for no data
Summary:
We don't control whatever `get_from_db` will do when asked to fetch no data. We can hope it'll do the smart thing and not hit the DB nor increment any monitoring counters.

This can be problematic, because it can result in confusing data in ODS. See T45198435 for a recent example of this.

Reviewed By: StanislavGlebik

Differential Revision: D15620424

fbshipit-source-id: 629c2eaad00d4977b0598c26e1f2a2ca64a1d66e
2019-06-04 05:16:52 -07:00
Jeremy Fitzhardinge
0b30f5c3cd Convert scm/mononoke/bonsai_hg_mapping to Rust 2018
Summary:
Rust 2018 updates to:
  //scm/mononoke/bonsai_hg_mapping:bonsai_hg_mapping
  //scm/mononoke/bonsai_hg_mapping:bonsai_hg_mapping-unittest
  //scm/mononoke/bonsai_hg_mapping:bonsai_hg_mapping_entry_thrift-rust
  //scm/mononoke/bonsai_hg_mapping:bonsai_hg_mapping_test
  //scm/mononoke/bonsai_hg_mapping:bonsai_hg_mapping_test-rust-build-info-lib

Reviewed By: aslpavel

Differential Revision: D15465954

fbshipit-source-id: fa7b0cff5ccecc0869dc85374cd2edd955cf8ecb
2019-05-23 14:26:32 -07:00
Jeremy Fitzhardinge
08fd9ce03b rust/sql: add LABEL to SqlConstructors
Summary:
Add a LABEL constant to the SqlConstructors trait to make it easier to identify
which table is being used, for stats and logging.

Reviewed By: HarveyHunt

Differential Revision: D13457488

fbshipit-source-id: a061a9582bc1783604f249d5b7dcede4b1e1d3c5
2019-05-21 12:25:14 -07:00
Stanislau Hlebik
1edc51cb05 mononoke: speed up insertion in bonsai hg mapping
Summary:
AnyMapping sql requests was unbearably slow - it took 1 seconds to finish.
Replacing it with two normal requests works much faster.

Note that it affected performance only if there was already an entry in the
mapping table

Reviewed By: farnz

Differential Revision: D14647179

fbshipit-source-id: e54f0474cdcc1f21bd429876cdbb04633f459d59
2019-05-21 12:24:56 -07:00
Kostia Balytskyi
e561682ecd mononoke: rename crates to contain underscores instead of dashes
Summary: Let's not use dashes in crate names.

Reviewed By: StanislavGlebik

Differential Revision: D14341596

fbshipit-source-id: 85a7ded60cf2e326997ac70ee47a29116af97590
2019-03-06 07:18:28 -08:00