Skip to content

Commit

Permalink
add some FATAL log
Browse files Browse the repository at this point in the history
  • Loading branch information
flabby committed Jul 14, 2016
1 parent 6a47556 commit c805b80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/pika_binlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ Binlog::Binlog(const std::string& binlog_path, const int file_size) :
profile = NewFileName(filename, pro_num_);
s = slash::NewWritableFile(profile, &queue_);
if (!s.ok()) {
LOG(INFO) << "Binlog: new " << filename << " " << s.ToString();
LOG(FATAL) << "Binlog: new " << filename << " " << s.ToString();
}


s = slash::NewRWFile(manifest, &versionfile_);
if (!s.ok()) {
LOG(WARNING) << "Binlog: new versionfile error " << s.ToString();
LOG(FATAL) << "Binlog: new versionfile error " << s.ToString();
}

version_ = new Version(versionfile_);
Expand All @@ -121,12 +122,16 @@ Binlog::Binlog(const std::string& binlog_path, const int file_size) :
// Debug
//version_->debug();
} else {
LOG(WARNING) << "Binlog: open versionfile error";
LOG(FATAL) << "Binlog: open versionfile error";
}

profile = NewFileName(filename, pro_num_);
DLOG(INFO) << "Binlog: open profile " << profile;
slash::AppendWritableFile(profile, &queue_, version_->pro_offset_);
s = slash::AppendWritableFile(profile, &queue_, version_->pro_offset_);
if (!s.ok()) {
LOG(FATAL) << "Binlog: Open file " << profile << " error " << s.ToString();
}

uint64_t filesize = queue_->Filesize();
DLOG(INFO) << "Binlog: filesize is " << filesize;
}
Expand Down
2 changes: 1 addition & 1 deletion third/nemo
Submodule nemo updated from 099d53 to a1bbdb

0 comments on commit c805b80

Please sign in to comment.