Skip to content

Commit 548488e

Browse files
committed
temp
1 parent f325119 commit 548488e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

be/src/runtime/thread_context.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,8 @@ static void attach_bthread() {
249249
#endif
250250
// Create thread-local data on demand.
251251
bthread_context = new ThreadContext;
252-
std::shared_ptr<MemTrackerLimiter> btls_tracker =
253-
std::make_shared<MemTrackerLimiter>(-1, "Bthread:id=" + std::to_string(bthread_id),
254-
ExecEnv::GetInstance()->bthread_mem_tracker());
255-
bthread_context->attach_task(ThreadContext::TaskType::BRPC, "", TUniqueId(), btls_tracker);
256252
// set the data so that next time bthread_getspecific in the thread returns the data.
257253
CHECK_EQ(0, bthread_setspecific(btls_key, bthread_context));
258-
} else {
259-
// two scenarios:
260-
// 1. A new bthread starts, but get a reuses btls.
261-
// 2. A pthread switch occurs. Because the pthread switch cannot be accurately identified at the moment.
262-
// So tracker call reset 0 like reuses btls.
263-
DCHECK(bthread_context->_thread_mem_tracker_mgr->get_attach_layers() == 2);
264-
bthread_context->_thread_mem_tracker_mgr->limiter_mem_tracker_raw()->reset_zero();
265254
}
266255
}
267256

0 commit comments

Comments
 (0)