Commit Graph

11 Commits

Author SHA1 Message Date
Stanislau Hlebik
e5cdd1a5da mononoke: do not return boolean in BlobstoreSyncQueue interface
Summary:
In the later diff we'll add batching of BlobstoreSyncQueue writes. It would be
much harder to add the batching if we also have to return this boolean.

And since noboby uses it, let's just remove it

Reviewed By: farnz

Differential Revision: D15248290

fbshipit-source-id: 72c64770c1b023e9de23a5dfccd8b4482302fe96
2019-05-21 12:25:40 -07:00
Lukas Piatkowski
a7d5f76635 mononoke: using raw connection to xdb when myrouter_port is not provided
Summary:
In the case of mononoke's admin tool it's annoying for users to be required to run myrouter in the background and provide myrouter port to every command.
Thanks to this change it is no longer necessary to run admin commands through myrouter - the tool will simply use a direct connection to XDB using the sql crate.

It is important to note that the raw XDB connection via sql crate doesn't have connection pooling and doesn't handle XDB failover so it is crucial that it is never used for long-lived or request heavy use cases like running mononoke server or blobimport

Reviewed By: jsgf

Differential Revision: D15174538

fbshipit-source-id: 299d3d7941ae6aec31961149f926c2a4965ed970
2019-05-21 12:25:35 -07:00
Stanislau Hlebik
0e5cca95b2 mononoke: prevent blobstore healer from overloading db
Differential Revision: D14699735

fbshipit-source-id: 1b62c1cfe5792462f0d705e8de2b11bac6b90cfe
2019-05-21 12:24:59 -07:00
Jeremy Fitzhardinge
1c9849c459 mononoke: small idiom tweaks to blobstore healer
Reviewed By: StanislavGlebik

Differential Revision: D14542674

fbshipit-source-id: f6e6b889638e00de5e98490f6489749e0714b6e2
2019-05-21 12:24:51 -07:00
Stanislau Hlebik
29c9ddd4a3 mononoke: speed up blobstore healer
Summary:
The main fix is in speeding up sql query that returns entries to heal.
The sql query was slow in the case when there are a lot of entries for one
repo and few entries for another repo. Selecting entries for smaller repo can
become too slow because mysql has to scan the whole table in order to sort
entries. Since ordering by id doesn't look necessary I suggest to just remove
them.

Also waiting for 1 minute between heal attemps is too slow

There are a few more smaller fixes - replacing join_all with more efficient
futures_unordered and doing batch delete of entries from the sync queue

Reviewed By: aslpavel

Differential Revision: D14598578

fbshipit-source-id: e8d302aab7b5a4bc16c63e14228713b75295e97a
2019-03-25 13:40:56 -07:00
Jeremy Fitzhardinge
d76d128059 mononoke: move memblob and prefixblob out of the base blobstore crate
Summary: Slim down the blobstore trait crate as much as possible.

Reviewed By: aslpavel

Differential Revision: D14542675

fbshipit-source-id: faf09255f7fe2236a491742cd836226474f5967c
2019-03-25 12:34:36 -07:00
Pavel Aslanov
e2c2fcd0f6 make it possible to pick just one repo to heal
Summary:
- healer runs on all repositories at once, and queries for some repositories are timing out
- It is now possible to run healer just for specified repository

Reviewed By: HarveyHunt

Differential Revision: D14539978

fbshipit-source-id: 9139999da97b2655ae9312c33c9e8c15f0b24016
2019-03-21 09:48:21 -07:00
Pavel Aslanov
982207dbe4 wait for myrouter port to be ready
Summary:
- convert to 2018 edition, and removed all `extern crate`
- wait for `myrouter` to be available before actually doing anything

Reviewed By: HarveyHunt

Differential Revision: D14524247

fbshipit-source-id: ebe2e2e74935f00c87945129370f268c794fcab7
2019-03-20 05:15:35 -07:00
Stanislau Hlebik
4d48415149 mononoke: split metaconfig crate
Summary:
Currently if a crate depends even on a single type from metaconfig then in
order to compile this trait buck first compiles metaconfig crate with all the
logic of parsing the configs.

This diff split metaconfig into two crates. The first one just holds the types for
"external consumption" by other crates. The second holds the parsing logic.

That makes builds faster

Reviewed By: jsgf, lukaspiatkowski

Differential Revision: D13877592

fbshipit-source-id: f353fb2d1737845bf1fa0de515ff8ef131020063
2019-01-31 00:41:48 -08:00
Pavel Aslanov
3a44162690 added: multiplexed blobstore scuba logging
Summary:
- Added scuba logging for put/get operation of `MultiplexedBlobstore`
- Added `blobstore_scuba_table` configuration field

Reviewed By: StanislavGlebik

Differential Revision: D13732064

fbshipit-source-id: 9ac0e31f9e1773321b2a7a4d8d561cce9289944b
2019-01-21 10:04:41 -08:00
Lukas Piatkowski
eba422a209 blobstore healer: minimalistic implementation
Summary:
This version still misses:
- proper production-ready logging
- smarter handling of case where the queue entries related to each other do not fit in the limit or `older_than` limit, so the healer will heal much more entries without realizing it shouldn't do so.

Reviewed By: aslpavel

Differential Revision: D13528686

fbshipit-source-id: 0245becea7e4f0ac69383a7885ff3746d81c4add
2019-01-15 10:41:07 -08:00