Fixed unit test c_test by initializing logger=NULL.
Summary: Fixed unit test c_test by initializing logger=NULL. Removed "atomic" from last_log_ts so that unit tests do not require C11 compiler. Anyway, last_log_ts is mostly used for logging, so it is ok if it is loosely accurate. Test Plan: run c_test Reviewers: heyongqiang Reviewed By: heyongqiang Differential Revision: https://reviews.facebook.net/D4803
This commit is contained in:
parent
407f020929
commit
a098207c95
@ -134,7 +134,8 @@ DBImpl::DBImpl(const Options& options, const std::string& dbname)
|
||||
log_(NULL),
|
||||
tmp_batch_(new WriteBatch),
|
||||
bg_compaction_scheduled_(false),
|
||||
manual_compaction_(NULL) {
|
||||
manual_compaction_(NULL),
|
||||
logger_(NULL) {
|
||||
mem_->Ref();
|
||||
has_imm_.Release_Store(NULL);
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include <deque>
|
||||
#include <set>
|
||||
#include <atomic>
|
||||
#include "db/dbformat.h"
|
||||
#include "db/log_writer.h"
|
||||
#include "db/snapshot.h"
|
||||
@ -187,7 +186,7 @@ class DBImpl : public DB {
|
||||
|
||||
StatsLogger* logger_;
|
||||
|
||||
std::atomic<int64_t> last_log_ts;
|
||||
int64_t volatile last_log_ts;
|
||||
|
||||
// Per level compaction stats. stats_[level] stores the stats for
|
||||
// compactions that produced data for the specified "level".
|
||||
|
Loading…
Reference in New Issue
Block a user