lix/src/libstore
Robert Hensing fb94d5cabd NarInfoDiskCache: Keep BinaryCache.id stable and improve test
Fixes #3898

The entire `BinaryCaches` row used to get replaced after it became
stale according to the `timestamp` column. In a concurrent scenario,
this leads to foreign key conflicts as different instances of the
in-process `state.caches` cache now differ, with the consequence that
the older process still tries to use the `id` number of the old record.

Furthermore, this phenomenon appears to have caused the cache for
actual narinfos to be erased about every week, while the default
ttl for narinfos was supposed to be 30 days.
2023-02-07 23:34:36 +01:00
..
build Get rid of the authHook parameter on processConnection 2023-02-02 12:02:03 -05:00
builtins Fix error message 2023-01-01 12:37:43 +10:00
tests NarInfoDiskCache: Keep BinaryCache.id stable and improve test 2023-02-07 23:34:36 +01:00
binary-cache-store.cc Merge pull request #7203 from graham33/feature/cpp20 2023-02-01 15:41:04 +01:00
binary-cache-store.hh getBuildLog: factor out resolving derivations 2022-12-15 15:58:54 -05:00
build-result.hh Get CPU stats from the cgroup 2022-11-18 13:40:59 +01:00
builtins.hh buildenv: Eliminate global variables, other cleanup 2020-03-24 14:06:47 +01:00
ca-specific-schema.sql ca: add sqlite index on RealisationsRefs(realisationReference) 2022-04-21 10:06:39 +02:00
content-address.cc Fix use after free in content-address.cc 2021-11-23 16:15:34 +01:00
content-address.hh Add ContentAddressMethod and parse/render it 2020-09-17 20:21:04 +02:00
crypto.cc Make sodium a required dependency 2021-01-06 17:56:53 +01:00
crypto.hh crypto.cc: API cleanup and add generate() / to_string() methods 2021-01-06 17:04:46 +01:00
daemon.cc Merge pull request #7739 from obsidiansystems/user-settings 2023-02-03 11:55:37 +01:00
daemon.hh Get rid of the authHook parameter on processConnection 2023-02-02 12:02:03 -05:00
derivations.cc Split OutputsSpec and ExtendedOutputsSpec, use the former more 2023-01-11 18:57:18 -05:00
derivations.hh Better-scope Store forward declarations 2023-01-23 07:05:50 -05:00
derived-path.cc Split OutputsSpec and ExtendedOutputsSpec, use the former more 2023-01-11 18:57:18 -05:00
derived-path.hh More property tests 2023-01-29 17:09:59 -05:00
dummy-store.cc Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
export-import.cc Get rid of std::shared_ptr<std::string> and ref<std::string> 2022-01-18 11:12:30 +01:00
filetransfer.cc Move isUri() and resolveUri() out of filetransfer.cc 2022-12-12 14:05:35 +01:00
filetransfer.hh Move isUri() and resolveUri() out of filetransfer.cc 2022-12-12 14:05:35 +01:00
fs-accessor.hh Use the fs accessor for readInvalidDerivation 2020-12-15 20:10:46 +01:00
gc-store.hh Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
gc.cc Fix deadlock between auto-GC and addTempRoot() 2023-01-03 15:20:21 +01:00
globals.cc Merge pull request #7203 from graham33/feature/cpp20 2023-02-01 15:41:04 +01:00
globals.hh Move trustedUsers and allowedUsers to separate config struct 2023-02-02 14:17:24 -05:00
http-binary-cache-store.cc NarInfoDiskCache: Rename cacheExists -> upToDateCacheExists 2023-02-07 23:34:36 +01:00
legacy-ssh-store.cc Delete dead code 2023-01-30 11:29:01 -05:00
local-binary-cache-store.cc moveFile -> renameFile 2022-08-03 10:27:25 +02:00
local-fs-store.cc getBuildLog: factor out resolving derivations 2022-12-15 15:58:54 -05:00
local-fs-store.hh getBuildLog: factor out resolving derivations 2022-12-15 15:58:54 -05:00
local-store.cc Move the default profiles to the user’s home 2023-01-17 14:17:28 +01:00
local-store.hh Move the default profiles to the user’s home 2023-01-17 14:17:28 +01:00
local.mk Include macOS sandbox files in the Nix binary 2023-01-04 04:36:07 -08:00
lock.cc On macOS with auto-uid-allocation and sandboxing, use the correct gid 2023-01-05 04:58:55 -08:00
lock.hh On macOS with auto-uid-allocation and sandboxing, use the correct gid 2023-01-05 04:58:55 -08:00
log-store.cc Move the getBuildLog implementation to its own implementation file 2023-01-13 11:05:44 +01:00
log-store.hh Move the getBuildLog implementation to its own implementation file 2023-01-13 11:05:44 +01:00
machines.cc Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
machines.hh Remove std::string alias 2022-02-21 16:37:25 +01:00
make-content-addressed.cc Add a test for fetchClosure and 'nix store make-content-addressed' 2022-03-24 21:33:33 +01:00
make-content-addressed.hh fetchClosure: Allow a path to be rewritten to CA on the fly 2022-03-24 21:33:33 +01:00
misc.cc Try to fix build failure 2023-01-15 15:16:14 -05:00
names.cc return string_views from forceString* 2022-01-27 17:15:43 +01:00
names.hh Remove std::string alias 2022-02-21 16:37:25 +01:00
nar-accessor.cc Replace src/libutil/json.cc with nlohmann json generation 2022-11-16 16:50:50 +01:00
nar-accessor.hh Replace src/libutil/json.cc with nlohmann json generation 2022-11-16 16:50:50 +01:00
nar-info-disk-cache.cc NarInfoDiskCache: Keep BinaryCache.id stable and improve test 2023-02-07 23:34:36 +01:00
nar-info-disk-cache.hh NarInfoDiskCache: Keep BinaryCache.id stable and improve test 2023-02-07 23:34:36 +01:00
nar-info.cc libstore/nar-info: drop unused system field 2022-06-23 14:25:10 -04:00
nar-info.hh libstore/nar-info: drop unused system field 2022-06-23 14:25:10 -04:00
nix-store.pc.in Build with C++20 2022-10-22 14:24:25 +01:00
optimise-store.cc moveFile -> renameFile 2022-08-03 10:27:25 +02:00
outputs-spec.cc Test store paths, with property tests 2023-01-23 07:05:50 -05:00
outputs-spec.hh Assert on construction that OutputsSpec::Names is non-empty 2023-01-12 20:52:29 -05:00
parsed-derivations.cc Merge pull request #3600 from NixOS/auto-uid-allocation 2022-11-29 14:01:42 +01:00
parsed-derivations.hh Split auto UID allocation from cgroups 2022-11-08 16:03:42 +01:00
path-info.cc Move ValidPathInfo defintions to path-info.cc 2023-01-13 15:39:19 -05:00
path-info.hh Delete dead code 2023-01-30 11:29:01 -05:00
path-regex.hh Test store paths, with property tests 2023-01-23 07:05:50 -05:00
path-with-outputs.cc Merge pull request #6815 from obsidiansystems/better-wanted-outputs 2023-01-13 16:03:12 +01:00
path-with-outputs.hh Improve OutputsSpec slightly 2023-01-11 18:54:50 -05:00
path.cc Test store paths, with property tests 2023-01-23 07:05:50 -05:00
path.hh Separate path.hh from content-address.hh 2023-01-30 10:14:03 -05:00
pathlocks.cc Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
pathlocks.hh Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
profiles.cc Keep the default profile the same 2023-01-17 14:17:28 +01:00
profiles.hh Move the default profiles to the user’s home 2023-01-17 14:17:28 +01:00
realisation.cc Fix the build with nlohmann/json 3.10.4+ 2022-01-19 14:37:54 +01:00
realisation.hh Separate path.hh from content-address.hh 2023-01-30 10:14:03 -05:00
references.cc Restrict readFile context to references that appear in the string 2022-11-11 13:04:34 +01:00
references.hh Restrict readFile context to references that appear in the string 2022-11-11 13:04:34 +01:00
remote-fs-accessor.cc Replace src/libutil/json.cc with nlohmann json generation 2022-11-16 16:50:50 +01:00
remote-fs-accessor.hh Get rid of std::shared_ptr<std::string> and ref<std::string> 2022-01-18 11:12:30 +01:00
remote-store.cc Don't send plugin-files to the daemon. 2023-02-01 20:05:56 -05:00
remote-store.hh Indentation 2022-08-22 15:32:53 +02:00
repair-flag.hh Clean up DerivationOutput, and headers 2022-03-17 22:35:53 +00:00
s3-binary-cache-store.cc NarInfoDiskCache: Rename cacheExists -> upToDateCacheExists 2023-02-07 23:34:36 +01:00
s3-binary-cache-store.hh Overhaul store subclassing 2020-12-20 15:47:14 +00:00
s3.hh Fix libcxx build 2022-04-28 14:37:05 +02:00
schema.sql schema.sql: add comment about hash being in base16 2022-06-01 14:59:57 +02:00
serve-protocol.hh nix-store --serve: pass on settings.keepFailed from SSH store 2021-08-31 13:11:46 +02:00
sqlite.cc sqlite.cc: Add SQL tracing 2023-02-07 23:34:36 +01:00
sqlite.hh Improve sqlite error messages 2022-12-17 14:51:37 +01:00
ssh-store.cc getBuildLog: factor out resolving derivations 2022-12-15 15:58:54 -05:00
ssh.cc Defer to SSH config files for ForwardAgent option 2022-10-22 19:51:22 -05:00
ssh.hh distributed builds: load remote builder host key from the machines file 2021-02-25 09:17:34 -05:00
store-api.cc Remove an unused capture 2023-02-01 20:27:35 +01:00
store-api.hh Separate path.hh from content-address.hh 2023-01-30 10:14:03 -05:00
store-cast.hh Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
uds-remote-store.cc Non-blocking garbage collector 2021-10-13 12:12:44 +02:00
uds-remote-store.hh Shut down write side before draining the read side 2021-09-23 18:01:04 +02:00
worker-protocol.hh Add Store::buildPathsWithResults() 2022-03-08 19:56:34 +01:00