mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 09:49:36 +01:00
Merge pull request #13932 from NixOS/move-pathInfoCache
Reduce false sharing between pathInfoCache and Store
This commit is contained in:
commit
9c186c35fa
7 changed files with 37 additions and 63 deletions
|
|
@ -722,12 +722,8 @@ uint64_t LocalStore::addValidPath(State & state, const ValidPathInfo & info, boo
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto state_(Store::state.lock());
|
||||
state_->pathInfoCache.upsert(
|
||||
std::string(info.path.to_string()),
|
||||
PathInfoCacheValue{.value = std::make_shared<const ValidPathInfo>(info)});
|
||||
}
|
||||
pathInfoCache->lock()->upsert(
|
||||
std::string(info.path.to_string()), PathInfoCacheValue{.value = std::make_shared<const ValidPathInfo>(info)});
|
||||
|
||||
return id;
|
||||
}
|
||||
|
|
@ -1022,10 +1018,7 @@ void LocalStore::invalidatePath(State & state, const StorePath & path)
|
|||
/* Note that the foreign key constraints on the Refs table take
|
||||
care of deleting the references entries for `path'. */
|
||||
|
||||
{
|
||||
auto state_(Store::state.lock());
|
||||
state_->pathInfoCache.erase(std::string(path.to_string()));
|
||||
}
|
||||
pathInfoCache->lock()->erase(std::string(path.to_string()));
|
||||
}
|
||||
|
||||
const PublicKeys & LocalStore::getPublicKeys()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue