print tg_ids with tg thread leak
This commit is contained in:
6
deps/oblib/src/lib/hash/ob_hashset.h
vendored
6
deps/oblib/src/lib/hash/ob_hashset.h
vendored
@ -206,6 +206,12 @@ public:
|
|||||||
{
|
{
|
||||||
return ht_.deserialization(archive, &allocer_);
|
return ht_.deserialization(archive, &allocer_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class _callback>
|
||||||
|
int foreach_refactored(_callback &callback) const
|
||||||
|
{
|
||||||
|
return ht_.foreach_refactored(callback);
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
_allocer allocer_;
|
_allocer allocer_;
|
||||||
_bucket_allocer bucket_allocer_;
|
_bucket_allocer bucket_allocer_;
|
||||||
|
@ -238,7 +238,11 @@ void ObTenantBase::destroy()
|
|||||||
{
|
{
|
||||||
destroy_mtl_module();
|
destroy_mtl_module();
|
||||||
if (tg_set_.size() > 0) {
|
if (tg_set_.size() > 0) {
|
||||||
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "tg thread not execute tg_destory make tg_id leak", K(tg_set_.size()), K(tg_set_));
|
TGSetDumpFunc tg_set_dump_func;
|
||||||
|
tg_set_.foreach_refactored(tg_set_dump_func);
|
||||||
|
_OB_LOG_RET(ERROR, OB_ERR_UNEXPECTED,
|
||||||
|
"tg thread not execute tg_destory make tg_id leak, tg_size=%ld, tg_set=[%s]",
|
||||||
|
tg_set_.size(), tg_set_dump_func.buf_);
|
||||||
}
|
}
|
||||||
tg_set_.destroy();
|
tg_set_.destroy();
|
||||||
thread_dynamic_factor_map_.destroy();
|
thread_dynamic_factor_map_.destroy();
|
||||||
|
@ -406,6 +406,21 @@ friend class ObTenantSpaceFetcher;
|
|||||||
friend class omt::ObTenant;
|
friend class omt::ObTenant;
|
||||||
friend class ObTenantEnv;
|
friend class ObTenantEnv;
|
||||||
|
|
||||||
|
struct TGSetDumpFunc
|
||||||
|
{
|
||||||
|
static const int64_t BUF_LEN = 128;
|
||||||
|
TGSetDumpFunc() : pos_(0)
|
||||||
|
{
|
||||||
|
MEMSET(buf_, '\0', BUF_LEN);
|
||||||
|
}
|
||||||
|
virtual ~TGSetDumpFunc() = default;
|
||||||
|
int operator()(common::hash::HashSetTypes<int64_t>::pair_type &kv)
|
||||||
|
{
|
||||||
|
return databuff_printf(buf_, BUF_LEN, pos_, " %ld", kv.first);
|
||||||
|
}
|
||||||
|
int64_t pos_;
|
||||||
|
char buf_[BUF_LEN];
|
||||||
|
};
|
||||||
template<class T> struct Identity {};
|
template<class T> struct Identity {};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user