sapling/cmds
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
..
admin mononoke: use csid_resolve in places where we used resolve_hg_rev 2019-10-05 05:48:43 -07:00
blobrepo_checker/src Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
blobstore_healer mononoke/blobstore_healer: handle missing regions gracefully 2019-10-07 07:34:10 -07:00
bonsai_verify Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
tests Enable text linter for toml files 2019-09-27 16:21:43 -07:00
aliasverify.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
backfill_derived_data.rs backfill_derived_data: add fsnodes 2019-09-25 05:19:55 -07:00
benchmark_filestore.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
blobimport.rs mononoke: fix parent order in blobimport 2019-10-01 15:18:32 -07:00
configlint.rs mononoke: connect stdlog and slog 2019-09-12 04:13:11 -07:00
dumprev.rs move mercurial related creates to mercurial subdirectory 2019-08-14 04:03:00 -07:00
idxdump.rs move mercurial related creates to mercurial subdirectory 2019-08-14 04:03:00 -07:00
lfs_import.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
populate_healer.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
rechunker.rs Replace *fbinit::FACEBOOK with #[fbinit::main] 2019-09-13 20:17:29 -07:00
revlogrepo.rs move mercurial related creates to mercurial subdirectory 2019-08-14 04:03:00 -07:00
statistics_collector.rs Skip fetching file content for big files in statistics_collector tool 2019-10-02 06:22:57 -07:00