mononoke/cmdlib: migrate scrub-queue test over to new walker scrub

Summary: The diff migrates one of the tests and checks new walker scrub.

Reviewed By: mitrandir77

Differential Revision: D35343497

fbshipit-source-id: 680d6720eaab13e660bee4356f68ba2126679b0c
This commit is contained in:
Aida Getoeva 2022-04-05 08:28:59 -07:00 committed by Facebook GitHub Bot
parent 7fa1ab5b1d
commit b0a505feed

View File

@ -0,0 +1,32 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License found in the LICENSE file in the root
# directory of this source tree.
$ . "${TEST_FIXTURES}/library.sh"
setup configuration
$ MULTIPLEXED=2 default_setup_blobimport "blob_files"
hg repo
o C [draft;rev=2;26805aba1e60]
o B [draft;rev=1;112478962961]
o A [draft;rev=0;426bada5c675]
$
blobimporting
Erase the sqllites and blobstore_sync_queue
$ rm -rf "$TESTTMP/monsql/sqlite_dbs" "$TESTTMP/blobstore_sync_queue/sqlite_dbs" "$TESTTMP/blobstore"
blobimport them into Mononoke storage again, but with write failures on one side
$ blobimport repo-hg/.hg repo --blobstore-write-chaos-rate=1
Check that healer queue has successful items
$ sqlite3 "$TESTTMP/blobstore_sync_queue/sqlite_dbs" "select count(*) FROM blobstore_sync_queue";
60
Check that scrub doesnt report issues despite one store being missing, as the entries needed are on the queue and less than N minutes old
$ mononoke_new_walker -l loaded --blobstore-scrub-action=ReportOnly scrub -q -I deep -b master_bookmark 2>&1 | strip_glog | sed -re 's/^(scrub: blobstore_id BlobstoreId.0. not repaired for repo0000.).*/\1/' | uniq -c | sed 's/^ *//'
1 Seen,Loaded: 40,40