Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/leveldatabase/env_chromium.h

Issue 2243363002: IndexedDB: Limit the size of a leveldb write buffer to minimize disk space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/leveldatabase/env_chromium.h
diff --git a/third_party/leveldatabase/env_chromium.h b/third_party/leveldatabase/env_chromium.h
index 51f28666c34479125e9f150877a2dac6b23ed983..6cc5d45ee330bf05878b975e0994177fb87f4b88 100644
--- a/third_party/leveldatabase/env_chromium.h
+++ b/third_party/leveldatabase/env_chromium.h
@@ -97,6 +97,15 @@ int GetNumCorruptionCodes();
std::string GetCorruptionMessage(const leveldb::Status& status);
bool IndicatesDiskFull(const leveldb::Status& status);
+// Determine the appropriate leveldb write buffer size to use. The default size
+// (4MB) may result in a log file too large to be compacted given the available
+// storage space. This function will return smaller values for smaller disks,
+// and the default leveldb value for larger disks.
+//
+// |path| is the path to any file or directory on the partition on which the
+// leveldb will be created/opened.
+size_t WriteBufferSize(const base::FilePath& path);
+
class UMALogger {
public:
virtual void RecordErrorAt(MethodID method) const = 0;

Powered by Google App Engine
This is Rietveld 408576698