Skip to content

Commit 3fff57f

Browse files
jsteemannfacebook-github-bot
authored andcommitted
fix linking without thread status support (facebook#12400)
Summary: When compiling with `-DNROCKSDB_THREAD_STATUS`, some functions in ThreadStatusUtil are declared but their definition is missing. Their definitions are only compiled when not defining `NROCKSDB_THREAD_STATUS`. This causes problems on linking, when the linker cannot find the definitions of - ThreadStatusUtil::GetThreadOperation - ThreadStatusUtil::SetEnableTracking This PR fixes it by adding stubs for these functions in case `NROCKSDB_THREAD_STATUS` is defined. Pull Request resolved: facebook#12400 Reviewed By: ajkr Differential Revision: D54510769 Pulled By: cbi42 fbshipit-source-id: e79e9257492d3dba59615e9e306df7e79838d73b
1 parent 1cfdece commit 3fff57f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

monitoring/thread_status_util.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,14 @@ bool ThreadStatusUtil::MaybeInitThreadLocalUpdater(const Env* /*env*/) {
175175
return false;
176176
}
177177

178+
void ThreadStatusUtil::SetEnableTracking(bool /*enable_tracking*/) {}
179+
178180
void ThreadStatusUtil::SetColumnFamily(const ColumnFamilyData* /*cfd*/) {}
179181

182+
ThreadStatus::OperationType ThreadStatusUtil::GetThreadOperation() {
183+
return ThreadStatus::OperationType::OP_UNKNOWN;
184+
}
185+
180186
void ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType /*op*/) {}
181187

182188
void ThreadStatusUtil::SetThreadOperationProperty(int /*code*/,

0 commit comments

Comments
 (0)