sapling/cmds/blobstore_healer
Thomas Orozco 6c29aad4a0 mononoke/blobstore_healer: handle missing regions gracefully
Summary:
There's a few things broken with common/rust/sql and the blobstore healer's handling of replication lag right now:

- If Seconds_Behind_Master isn't an int (it'll be NULL if replications is paused), it just panics.
- If it's talking to a server that it expected to be a replica but is a master, it returns None for the replication lag, but 0 would be more appropriate.
- If a region no longer has a replica, it errors out.

This diff fixes that:

- If replication is paused, we return None for lag.
- If we're talking to a master, we return 0.
- If a region has no replica, we ignore it.

Reviewed By: StanislavGlebik

Differential Revision: D17787580

fbshipit-source-id: 9e5e7682456870b88910afec12e1c409fd8c5ba6
2019-10-07 07:34:10 -07:00
..
dummy.rs mononoke: add key filter option to blobstore healer 2019-08-05 03:50:53 -07:00
healer.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
main.rs mononoke/blobstore_healer: handle missing regions gracefully 2019-10-07 07:34:10 -07:00