summaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-08 16:40:38 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-08 16:40:38 +0200
commitcdc022264dead218193c4ce51fa29992a6ad43ae (patch)
treecc21a258d7c72ae4a3324f379472396eedde982e /fastos
parent82e328d65cb4d7e431cddbc5f48e2c52f2c5ec13 (diff)
Avoid opening idxfile to early for writing. Especially as it might get truncated due to error handling later on.
Instead just open the file when you need to write it. It does not happen that often to warrant keeping it open all the time.
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/file.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fastos/src/vespa/fastos/file.h b/fastos/src/vespa/fastos/file.h
index dcc2b401846..8a9de224259 100644
--- a/fastos/src/vespa/fastos/file.h
+++ b/fastos/src/vespa/fastos/file.h
@@ -514,6 +514,8 @@ public:
virtual void EnableSyncWrites();
+ bool useSyncWrites() const { return _syncWritesEnabled; }
+
/**
* Set the write chunk size used in WriteBuf.
*/