Print DB pointer when opening a DB

Summary: Having a pointer for DB will be helpful to debug when GDB or working on a dump. If the client process doesn't have any thread actively working on RocksDB, it can be hard to find out.

Test Plan: make all check

Reviewers: rven, yhchiang, igor

Reviewed By: igor

Subscribers: yoshinorim, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D33159
main
sdong 10 years ago
parent bee4e51244
commit 91ac3b2067
  1. 2
      db/db_impl.cc

@ -3853,6 +3853,8 @@ Status DB::Open(const DBOptions& db_options, const std::string& dbname,
if (s.ok()) {
impl->opened_successfully_ = true;
Log(InfoLogLevel::INFO_LEVEL, impl->db_options_.info_log, "DB pointer %p",
impl);
*dbptr = impl;
} else {
for (auto* h : *handles) {

Loading…
Cancel
Save