From: Igor Canadi Date: Wed, 15 Oct 2014 17:57:43 +0000 (-0700) Subject: Move logging outside of mutex X-Git-Tag: rocksdb-3.6.1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f92646cef2a6cf133ba4f0f70e7554227a2532a0;p=rocksdb.git Move logging outside of mutex --- diff --git a/db/db_impl.cc b/db/db_impl.cc index 5abfb4ac..383e2f66 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -4232,6 +4232,9 @@ Status DBImpl::SetNewMemtableAndNewLogFile(ColumnFamilyData* cfd, new_superversion = new SuperVersion(); } } + Log(db_options_.info_log, + "[%s] New memtable created with log file: #%" PRIu64 "\n", + cfd->GetName().c_str(), new_log_number); mutex_.Lock(); if (!s.ok()) { // how do we fail if we're not creating new log? @@ -4264,9 +4267,6 @@ Status DBImpl::SetNewMemtableAndNewLogFile(ColumnFamilyData* cfd, cfd->imm()->Add(cfd->mem()); new_mem->Ref(); cfd->SetMemtable(new_mem); - Log(db_options_.info_log, - "[%s] New memtable created with log file: #%" PRIu64 "\n", - cfd->GetName().c_str(), logfile_number_); context->superversions_to_free_.push_back( cfd->InstallSuperVersion(new_superversion, &mutex_, mutable_cf_options)); return s; diff --git a/include/rocksdb/version.h b/include/rocksdb/version.h index 28527885..84ece982 100644 --- a/include/rocksdb/version.h +++ b/include/rocksdb/version.h @@ -6,7 +6,7 @@ #define ROCKSDB_MAJOR 3 #define ROCKSDB_MINOR 6 -#define ROCKSDB_PATCH 0 +#define ROCKSDB_PATCH 1 // Do not use these. We made the mistake of declaring macros starting with // double underscore. Now we have to live with our choice. We'll deprecate these