Removed support to differntiate fetch_miss sources

Summary: With the removal of all HgImporter code, we no longer need to differentiate fetch_miss sources. If in the future we have other data stores that fetch from we can add this back. For now, it is just taking up extra space in our scuba table.

Reviewed By: genevievehelsel

Differential Revision: D52404111

fbshipit-source-id: 792d424d5b0459cdd0e47dad45d4bfb1298a1b3d
This commit is contained in:
John Elliott 2024-01-17 13:24:03 -08:00 committed by Facebook GitHub Bot
parent 6782821902
commit ed99297cbd
3 changed files with 0 additions and 12 deletions

View File

@ -292,7 +292,6 @@ folly::Future<TreePtr> HgBackingStore::fetchTreeFromImporter(
if (logger_) {
logger_->logEvent(FetchMiss{
datapackStore_.getRepoName(),
FetchMiss::BackingStore,
FetchMiss::Tree,
tree.exception().what().toStdString(),
true});
@ -539,7 +538,6 @@ SemiFuture<BlobPtr> HgBackingStore::fetchBlobFromHgImporter(
if (logger_) {
logger_->logEvent(FetchMiss{
datapackStore_.getRepoName(),
FetchMiss::BackingStore,
FetchMiss::Blob,
blob.exception().what().toStdString(),
true});

View File

@ -159,7 +159,6 @@ void HgDatapackStore::getTreeBatch(const ImportRequestsList& importRequests) {
if (logger_) {
logger_->logEvent(FetchMiss{
store_.getRepoName(),
FetchMiss::BackingStore,
FetchMiss::Tree,
content.exception().what().toStdString(),
false});
@ -286,7 +285,6 @@ void HgDatapackStore::getBlobBatch(const ImportRequestsList& importRequests) {
if (logger_) {
logger_->logEvent(FetchMiss{
store_.getRepoName(),
FetchMiss::BackingStore,
FetchMiss::Blob,
content.exception().what().toStdString(),
false});
@ -384,7 +382,6 @@ void HgDatapackStore::getBlobMetadataBatch(
if (logger_) {
logger_->logEvent(FetchMiss{
store_.getRepoName(),
FetchMiss::BackingStore,
FetchMiss::BlobMetadata,
auxTry.exception().what().toStdString(),
false});

View File

@ -390,24 +390,17 @@ struct NfsCrawlDetected {
};
struct FetchMiss {
enum MissSource : uint8_t { BackingStore = 0, HgImporter = 1 };
enum MissType : uint8_t { Tree = 0, Blob = 1, BlobMetadata = 2 };
static constexpr const char* type = "fetch_miss";
std::string_view repo_source;
MissSource miss_source;
MissType miss_type;
std::string reason;
bool retry;
void populate(DynamicEvent& event) const {
event.addString("repo_source", std::string(repo_source));
if (miss_source == BackingStore) {
event.addString("miss_source", "backingstore");
} else {
event.addString("miss_source", "hgimporter");
}
if (miss_type == Tree) {
event.addString("miss_type", "tree");
} else if (miss_type == Blob) {