Commit 6bd2fc19 authored by cmumford's avatar cmumford Committed by Commit bot

IndexedDB: Re-enable leveldb manifest reuse.

The new leveldb manifest reuse feature was disabled because the CrOS dev channel
daily error % by channel values increased after this landed in that channel (by
about 3x). Reverting this change did not return the dev channel rates back to
normal. Furthermore the beta channel (with this feature enabled) did not
experience an increase in errors.

Commit details: Returns manifest reuse back to the state introduced in
crrev.com/803603004 (de701abe) which was disabled in two subsequent reverts:
crrev.com/841753003 (ca6c8754) and crrev.com/852073002 (617e94e4).

BUG=402980

Review URL: https://codereview.chromium.org/899933002

Cr-Commit-Position: refs/heads/master@{#314638}
parent 6cf89e9e
...@@ -103,7 +103,7 @@ static leveldb::Status OpenDB( ...@@ -103,7 +103,7 @@ static leveldb::Status OpenDB(
options.create_if_missing = true; options.create_if_missing = true;
options.paranoid_checks = true; options.paranoid_checks = true;
options.filter_policy = filter_policy->get(); options.filter_policy = filter_policy->get();
options.reuse_logs = false; options.reuse_logs = true;
options.compression = leveldb::kSnappyCompression; options.compression = leveldb::kSnappyCompression;
// For info about the troubles we've run into with this parameter, see: // For info about the troubles we've run into with this parameter, see:
......
...@@ -898,6 +898,22 @@ Status ChromiumEnv::NewWritableFile(const std::string& fname, ...@@ -898,6 +898,22 @@ Status ChromiumEnv::NewWritableFile(const std::string& fname,
} }
} }
Status ChromiumEnv::NewAppendableFile(const std::string& fname,
leveldb::WritableFile** result) {
*result = NULL;
FilePath path = FilePath::FromUTF8Unsafe(fname);
scoped_ptr<base::File> f(new base::File(
path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_APPEND));
if (!f->IsValid()) {
RecordErrorAt(kNewAppendableFile);
return MakeIOError(fname, "Unable to create appendable file",
kNewAppendableFile, f->error_details());
}
*result =
new ChromiumWritableFile(fname, f.release(), this, this, make_backup_);
return Status::OK();
}
uint64_t ChromiumEnv::NowMicros() { uint64_t ChromiumEnv::NowMicros() {
return base::TimeTicks::Now().ToInternalValue(); return base::TimeTicks::Now().ToInternalValue();
} }
......
...@@ -131,6 +131,8 @@ class ChromiumEnv : public leveldb::Env, ...@@ -131,6 +131,8 @@ class ChromiumEnv : public leveldb::Env,
leveldb::RandomAccessFile** result); leveldb::RandomAccessFile** result);
virtual leveldb::Status NewWritableFile(const std::string& fname, virtual leveldb::Status NewWritableFile(const std::string& fname,
leveldb::WritableFile** result); leveldb::WritableFile** result);
virtual leveldb::Status NewAppendableFile(const std::string& fname,
leveldb::WritableFile** result);
virtual leveldb::Status NewLogger(const std::string& fname, virtual leveldb::Status NewLogger(const std::string& fname,
leveldb::Logger** result); leveldb::Logger** result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment