Skip to content

Commit

Permalink
Fix WAL synced
Browse files Browse the repository at this point in the history
Summary: Uhm...

Test Plan: nope

Reviewers: sdong, yhchiang, tnovak, ljin

Reviewed By: ljin

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23343
  • Loading branch information
igorcanadi committed Sep 12, 2014
1 parent 24f034b commit 540a257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4109,9 +4109,9 @@ Status DBImpl::Write(const WriteOptions& options, WriteBatch* my_batch) {
alive_log_files_.back().AddSize(log_entry.size());
log_empty_ = false;
log_size = log_entry.size();
RecordTick(stats_, WAL_FILE_SYNCED);
RecordTick(stats_, WAL_FILE_BYTES, log_size);
if (status.ok() && options.sync) {
RecordTick(stats_, WAL_FILE_SYNCED);
if (db_options_.use_fsync) {
StopWatch(env_, stats_, WAL_FILE_SYNC_MICROS);
status = log_->file()->Fsync();
Expand Down

0 comments on commit 540a257

Please sign in to comment.