From: Kefu Chai Date: Thu, 31 Aug 2017 05:02:08 +0000 (+0800) Subject: kv/RocksDBStore: update to accomodate the change in rocksdb 5.6.0 X-Git-Tag: v13.0.1~903^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9d73a7121fdb1ae87cb1aa6f7d9d7a13f329ae68;p=ceph.git kv/RocksDBStore: update to accomodate the change in rocksdb 5.6.0 per rocksdb's HISTORY.md, it > replace global variable `PerfContext perf_context` with `PerfContext* > get_perf_context()`. hence the change. Signed-off-by: Kefu Chai --- diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 8660afe1886d..bc0de79e23cb 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -504,7 +504,7 @@ int RocksDBStore::submit_common(rocksdb::WriteOptions& woptions, KeyValueDB::Tra // considering performance overhead, default is disabled if (g_conf->rocksdb_perf) { rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); - rocksdb::perf_context.Reset(); + rocksdb::get_perf_context()->Reset(); } RocksDBTransactionImpl * _t = @@ -529,13 +529,13 @@ int RocksDBStore::submit_common(rocksdb::WriteOptions& woptions, KeyValueDB::Tra utime_t write_wal_time; utime_t write_pre_and_post_process_time; write_wal_time.set_from_double( - static_cast(rocksdb::perf_context.write_wal_time)/1000000000); + static_cast(rocksdb::get_perf_context()->write_wal_time)/1000000000); write_memtable_time.set_from_double( - static_cast(rocksdb::perf_context.write_memtable_time)/1000000000); + static_cast(rocksdb::get_perf_context()->write_memtable_time)/1000000000); write_delay_time.set_from_double( - static_cast(rocksdb::perf_context.write_delay_time)/1000000000); + static_cast(rocksdb::get_perf_context()->write_delay_time)/1000000000); write_pre_and_post_process_time.set_from_double( - static_cast(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); + static_cast(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); logger->tinc(l_rocksdb_write_delay_time, write_delay_time); logger->tinc(l_rocksdb_write_wal_time, write_wal_time);