Branch: refs/heads/master
Home: https://github.com/NixOS/nix
Commit: 25de80e2b61208850c4a39d8ee44967ada8f040e
https://github.com/NixOS/nix/commit/25de80e2b61208850c4a39d8ee44967ada8f040e
Author: Lluís Batlle i Rossell <[email protected]>
Date: 2012-03-22 (Thu, 22 Mar 2012)
Changed paths:
M src/libstore/local-store.cc
Log Message:
-----------
Adding a nix option to sync before registering a path, for non-ext*
filesystems.
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index f3b779d..950e6e7 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -968,6 +968,8 @@ void LocalStore::registerValidPath(const ValidPathInfo &
info)
void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{
+ if (queryBoolSetting("sync-before-registering", true))
+ sync();
while (1) {
try {
SQLiteTxn txn(db);
================================================================
Commit: 85799bf89ed2649d7f3e2298de0478c50a71776d
https://github.com/NixOS/nix/commit/85799bf89ed2649d7f3e2298de0478c50a71776d
Author: Lluís Batlle i Rossell <[email protected]>
Date: 2012-03-22 (Thu, 22 Mar 2012)
Changed paths:
M src/libstore/local-store.cc
Log Message:
-----------
Fixing the default of sync-before-registering
Setting 'false' as default, as suggested by Eelco.
I also added a comment about the setting in the code.
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 950e6e7..ca541e1 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -968,8 +968,12 @@ void LocalStore::registerValidPath(const ValidPathInfo &
info)
void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{
- if (queryBoolSetting("sync-before-registering", true))
+ /* sqlite will fsync by default, but the new valid paths may not be
fsync-ed.
+ * So some may want to fsync them before registering the validity, at the
+ * expense of some speed of the path registering operation. */
+ if (queryBoolSetting("sync-before-registering", false))
sync();
+
while (1) {
try {
SQLiteTxn txn(db);
================================================================
Commit: 6387830c3b12722e5962a99aa81f225ea0830076
https://github.com/NixOS/nix/commit/6387830c3b12722e5962a99aa81f225ea0830076
Author: Eelco Dolstra <[email protected]>
Date: 2012-04-23 (Mon, 23 Apr 2012)
Changed paths:
M src/libstore/local-store.cc
Log Message:
-----------
Merge pull request #2 from viric/master
Again, adding the sync option
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 1ab9d15..f04436b 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -968,6 +968,12 @@ void LocalStore::registerValidPath(const ValidPathInfo &
info)
void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{
+ /* sqlite will fsync by default, but the new valid paths may not be
fsync-ed.
+ * So some may want to fsync them before registering the validity, at the
+ * expense of some speed of the path registering operation. */
+ if (queryBoolSetting("sync-before-registering", false))
+ sync();
+
while (1) {
try {
SQLiteTxn txn(db);
================================================================
Compare: https://github.com/NixOS/nix/compare/259c6d3...6387830
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits