sapling/eden/mononoke/bonsai_hg_mapping
Mark Juggurnauth-Thomas 69896e90b5 bonsai_hg_mapping: construct rendezvous connections in a blocking closure
Summary:
`RendezVousConnection::new` can block for some time doing work on the CPU,
specifically creating the stats objects.  This causes problems for other
futures during repo construction.

Instead, move rendez-vous construction to a `spawn_blocking` closure, so that
it doesn't interfere with the other futures.

Since `SqlBonsaiHgMapping::from_sql_connections` is not async, and is part of
the SqlConstruct trait, we must convert this to the builder pattern so that we
can defer rendez-vous construction to later on.

Reviewed By: farnz

Differential Revision: D27501915

fbshipit-source-id: 9c58c32411301128424985deeab127d052c43532
2021-04-01 08:27:15 -07:00
..
if vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
schemas Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
src bonsai_hg_mapping: construct rendezvous connections in a blocking closure 2021-04-01 08:27:15 -07:00
test bonsai_hg_mapping: construct rendezvous connections in a blocking closure 2021-04-01 08:27:15 -07:00
Cargo.toml blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00