Remove unnecessary overrides of add methods.

This commit is contained in:
Ben Radford 2023-06-06 12:12:25 +01:00 committed by Ben Radford
parent 8a9baa0a30
commit ee1241da86
2 changed files with 0 additions and 50 deletions

View file

@ -176,44 +176,6 @@ void LocalOverlayStore::registerValidPaths(const ValidPathInfos & infos)
} }
void LocalOverlayStore::addToStore(const ValidPathInfo & info, Source & source,
RepairFlag repair, CheckSigsFlag checkSigs)
{
LocalStore::addToStore(info, source, repair, checkSigs);
if (lowerStore->isValidPath(info.path)) {
// dedup stores
deletePath(toUpperPath(info.path)); // TODO: Investigate whether this can trigger 'stale file handle' errors.
}
}
StorePath LocalOverlayStore::addToStoreFromDump(Source & dump, std::string_view name,
FileIngestionMethod method, HashType hashAlgo, RepairFlag repair, const StorePathSet & references)
{
auto path = LocalStore::addToStoreFromDump(dump, name, method, hashAlgo, repair, references);
if (lowerStore->isValidPath(path)) {
// dedup stores
deletePath(toUpperPath(path));
}
return path;
}
StorePath LocalOverlayStore::addTextToStore(
std::string_view name,
std::string_view s,
const StorePathSet & references,
RepairFlag repair)
{
auto path = LocalStore::addTextToStore(name, s, references, repair);
if (lowerStore->isValidPath(path)) {
// dedup stores
deletePath(toUpperPath(path));
}
return path;
}
void LocalOverlayStore::deleteGCPath(const Path & path, uint64_t & bytesFreed) void LocalOverlayStore::deleteGCPath(const Path & path, uint64_t & bytesFreed)
{ {
auto mergedDir = realStoreDir.get() + "/"; auto mergedDir = realStoreDir.get() + "/";

View file

@ -108,18 +108,6 @@ private:
void registerValidPaths(const ValidPathInfos & infos) override; void registerValidPaths(const ValidPathInfos & infos) override;
void addToStore(const ValidPathInfo & info, Source & source,
RepairFlag repair, CheckSigsFlag checkSigs) override;
StorePath addToStoreFromDump(Source & dump, std::string_view name,
FileIngestionMethod method, HashType hashAlgo, RepairFlag repair, const StorePathSet & references) override;
StorePath addTextToStore(
std::string_view name,
std::string_view s,
const StorePathSet & references,
RepairFlag repair) override;
void queryRealisationUncached(const DrvOutput&, void queryRealisationUncached(const DrvOutput&,
Callback<std::shared_ptr<const Realisation>> callback) noexcept override; Callback<std::shared_ptr<const Realisation>> callback) noexcept override;