mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
be0cd8da1e
Summary: This is the plumbing to allow us to skip Metadata prefetching during eden prefetches. These can trigger a bunch of wasted network requests when we are fetching files anyways. (These network requests are wasted since we fetch the file contents and most of them are being throttled on sandcastle anyways.) We won't necessarily want to skip metadata prefetching always, we will still want it for the watchman queries, but for `eden prefetch` will probably want to skip it. This is why we are making it an option in the GlobParams. Reviewed By: chadaustin Differential Revision: D24640754 fbshipit-source-id: 20db62d4c0e59fe17cb6535c86ac8f1e3877879c
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BackingStore.h"
|
|
#include "eden/fs/store/ObjectFetchContext.h"
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
/*
|
|
* A dummy BackingStore implementation, that always throws std::domain_error
|
|
* for any ID that is looked up.
|
|
*/
|
|
class EmptyBackingStore : public BackingStore {
|
|
public:
|
|
EmptyBackingStore();
|
|
~EmptyBackingStore() override;
|
|
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTree(
|
|
const Hash& id,
|
|
ObjectFetchContext& context) override;
|
|
folly::SemiFuture<std::unique_ptr<Blob>> getBlob(
|
|
const Hash& id,
|
|
ObjectFetchContext& context) override;
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForCommit(
|
|
const Hash& commitID,
|
|
ObjectFetchContext& context) override;
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForManifest(
|
|
const Hash& commitID,
|
|
const Hash& manifestID,
|
|
ObjectFetchContext& context) override;
|
|
};
|
|
} // namespace eden
|
|
} // namespace facebook
|