Skip to content

Commit

Permalink
db/db_impl.cc: fix object handling, remove double lines
Browse files Browse the repository at this point in the history
Fix for:

[db/db_impl.cc:4039]: (error) Instance of 'StopWatch' object is
 destroyed immediately.
[db/db_impl.cc:4042]: (error) Instance of 'StopWatch' object is
 destroyed immediately.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
  • Loading branch information
dalgaaf committed Sep 30, 2014
1 parent 873f135 commit 33580fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4037,11 +4037,10 @@ Status DBImpl::Write(const WriteOptions& options, WriteBatch* my_batch) {
RecordTick(stats_, WAL_FILE_BYTES, log_size);
if (status.ok() && options.sync) {
RecordTick(stats_, WAL_FILE_SYNCED);
StopWatch sw(env_, stats_, WAL_FILE_SYNC_MICROS);
if (db_options_.use_fsync) {
StopWatch(env_, stats_, WAL_FILE_SYNC_MICROS);
status = log_->file()->Fsync();
} else {
StopWatch(env_, stats_, WAL_FILE_SYNC_MICROS);
status = log_->file()->Sync();
}
}
Expand Down

0 comments on commit 33580fa

Please sign in to comment.