Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -28,36 +28,13 @@ namespace transaction
namespace tablelock
{
ObLockMemtableMgr::ObLockMemtableMgr()
: ls_id_(),
lock_def_()
ObLockMemtableMgr::ObLockMemtableMgr() : ObIMemtableMgr(LockType::OB_QSYNC_LOCK, &lock_def_)
{
int ret = OB_SUCCESS;
if (OB_FAIL(lock_def_.init(lib::ObMemAttr(MTL_ID(), "LockMemtableMgr")))) {
LOG_WARN("lock memtable mgr lock init error", K(ret), "tenant_id", MTL_ID());
}
lock_.lock_type_ = LockType::OB_QSYNC_LOCK;
lock_.lock_ = &lock_def_;
}
ObLockMemtableMgr::~ObLockMemtableMgr()
{
destroy();
}
void ObLockMemtableMgr::destroy()
{
int ret = OB_SUCCESS;
const int64_t ref_cnt = get_ref();
if (OB_UNLIKELY(0 != ref_cnt)) {
LOG_ERROR("ref cnt is NOT 0", K(ret), K(ref_cnt), K_(ls_id), KPC(this));
}
MemMgrWLockGuard lock_guard(lock_);
reset_tables();
ls_id_.reset();
freezer_ = NULL;
is_inited_ = false;
UNUSED(ret);
}
int ObLockMemtableMgr::init(
@ -90,6 +67,19 @@ int ObLockMemtableMgr::init(
return ret;
}
void ObLockMemtableMgr::destroy()
{
reset();
}
void ObLockMemtableMgr::reset()
{
MemMgrWLockGuard lock_guard(lock_);
reset_tables();
freezer_ = NULL;
is_inited_ = false;
}
int ObLockMemtableMgr::create_memtable(const SCN clog_checkpoint_scn,
const int64_t schema_version,
const SCN newest_clog_checkpoint_scn,