From c859d75bd5d4233c351ee172b2b4f0ec0632b5cd Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 22 Oct 2020 20:58:55 +0000 Subject: [PATCH] Add some trace events for opening / closing database --- fdbserver/KeyValueStoreRocksDB.actor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fdbserver/KeyValueStoreRocksDB.actor.cpp b/fdbserver/KeyValueStoreRocksDB.actor.cpp index e1e9c56f78..2682858c94 100644 --- a/fdbserver/KeyValueStoreRocksDB.actor.cpp +++ b/fdbserver/KeyValueStoreRocksDB.actor.cpp @@ -55,7 +55,7 @@ struct RocksDBKeyValueStore : IKeyValueStore { explicit Writer(DB& db, UID id) : db(db), id(id) {} - ~Writer() { + ~Writer() override { if (db) { delete db; } @@ -88,6 +88,7 @@ struct RocksDBKeyValueStore : IKeyValueStore { TraceEvent(SevError, "RocksDBError").detail("Error", status.ToString()).detail("Method", "Open"); a.done.sendError(statusToError(status)); } else { + TraceEvent(SevInfo, "RocksDB").detail("Path", a.path).detail("Method", "Open"); a.done.send(Void()); } } @@ -131,8 +132,11 @@ struct RocksDBKeyValueStore : IKeyValueStore { s = rocksdb::DestroyDB(a.path, getOptions(), defaultCF); if (!s.ok()) { TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "Destroy"); + } else { + TraceEvent(SevInfo, "RocksDB").detail("Path", a.path).detail("Method", "Destroy"); } } + TraceEvent(SevInfo, "RocksDB").detail("Path", a.path).detail("Method", "Close"); a.done.send(Void()); } };