Replace std::shared_ptr<SystemClock>
by SystemClock*
in TraceExecutionHandler
(#8729)
Summary: All/most trace related APIs directly use `SystemClock*` (https://github.com/facebook/rocksdb/pull/8033). Do the same in `TraceExecutionHandler`. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8729 Test Plan: None Reviewed By: zhichao-cao Differential Revision: D30672159 Pulled By: autopear fbshipit-source-id: 017db4912c6ac1cfede842b8b122cf569a394f25
This commit is contained in:
parent
ec9f52ece6
commit
7b55554605
@ -17,8 +17,7 @@ TraceExecutionHandler::TraceExecutionHandler(
|
||||
: TraceRecord::Handler(),
|
||||
db_(db),
|
||||
write_opts_(WriteOptions()),
|
||||
read_opts_(ReadOptions()),
|
||||
clock_(SystemClock::Default()) {
|
||||
read_opts_(ReadOptions()) {
|
||||
assert(db != nullptr);
|
||||
assert(!handles.empty());
|
||||
cf_map_.reserve(handles.size());
|
||||
@ -26,6 +25,7 @@ TraceExecutionHandler::TraceExecutionHandler(
|
||||
assert(handle != nullptr);
|
||||
cf_map_.insert({handle->GetID(), handle});
|
||||
}
|
||||
clock_ = db_->GetEnv()->GetSystemClock().get();
|
||||
}
|
||||
|
||||
TraceExecutionHandler::~TraceExecutionHandler() { cf_map_.clear(); }
|
||||
|
@ -38,7 +38,7 @@ class TraceExecutionHandler : public TraceRecord::Handler {
|
||||
std::unordered_map<uint32_t, ColumnFamilyHandle*> cf_map_;
|
||||
WriteOptions write_opts_;
|
||||
ReadOptions read_opts_;
|
||||
std::shared_ptr<SystemClock> clock_;
|
||||
SystemClock* clock_;
|
||||
};
|
||||
|
||||
// To do: Handler for trace_analyzer.
|
||||
|
Loading…
Reference in New Issue
Block a user