fix mysqltest && FIFOAllocator destroy ERROR & remove lock in ls::sync_reserved_clog
This commit is contained in:
@ -818,6 +818,7 @@ int ObMediumCompactionInfoList::init_after_check_finish(
|
||||
void ObMediumCompactionInfoList::reset_list()
|
||||
{
|
||||
DLIST_REMOVE_ALL_NORET(info, medium_info_list_) {
|
||||
medium_info_list_.remove(info);
|
||||
static_cast<ObMediumCompactionInfo *>(info)->~ObMediumCompactionInfo();
|
||||
allocator_->free(info);
|
||||
}
|
||||
@ -828,7 +829,6 @@ void ObMediumCompactionInfoList::reset()
|
||||
{
|
||||
if (OB_NOT_NULL(allocator_)) {
|
||||
reset_list();
|
||||
medium_info_list_.reset();
|
||||
}
|
||||
is_inited_ = false;
|
||||
info_ = 0;
|
||||
|
||||
@ -932,9 +932,6 @@ int ObLS::try_sync_reserved_snapshot(
|
||||
} else {
|
||||
ObRole role = INVALID_ROLE;
|
||||
int64_t proposal_id = 0;
|
||||
int64_t read_lock = LSLOCKLS | LSLOCKLOG;
|
||||
int64_t write_lock = 0;
|
||||
ObLSLockGuard lock_myself(lock_, read_lock, write_lock);
|
||||
if (is_stopped_) {
|
||||
// do nothing
|
||||
} else if (OB_FAIL(log_handler_.get_role(role, proposal_id))) {
|
||||
|
||||
@ -27,6 +27,7 @@ ObLSReservedSnapshotMgr::ObLSReservedSnapshotMgr()
|
||||
min_reserved_snapshot_(0),
|
||||
next_reserved_snapshot_(0),
|
||||
snapshot_lock_(),
|
||||
sync_clog_lock_(),
|
||||
ls_(nullptr),
|
||||
ls_handle_(),
|
||||
dependent_tablet_set_(),
|
||||
@ -221,8 +222,11 @@ int ObLSReservedSnapshotMgr::sync_clog(const int64_t new_reserved_snapshot)
|
||||
LOG_WARN("fail to get data version", K(ret));
|
||||
} else if (compat_version < DATA_VERSION_4_1_0_0) {
|
||||
// do nothing, should sync clog
|
||||
} else if (OB_FAIL(try_update_for_leader(new_reserved_snapshot, nullptr/*allocator*/))) {
|
||||
LOG_WARN("failed to send update reserved snapshot log", K(ret), K(new_reserved_snapshot));
|
||||
} else {
|
||||
ObMutexGuard guard(sync_clog_lock_);
|
||||
if (OB_FAIL(try_update_for_leader(new_reserved_snapshot, nullptr/*allocator*/))) {
|
||||
LOG_WARN("failed to send update reserved snapshot log", K(ret), K(new_reserved_snapshot));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -97,6 +97,7 @@ private:
|
||||
int64_t min_reserved_snapshot_;
|
||||
int64_t next_reserved_snapshot_;
|
||||
mutable common::TCRWLock snapshot_lock_;
|
||||
lib::ObMutex sync_clog_lock_;
|
||||
storage::ObLS *ls_;
|
||||
ObLSHandle ls_handle_;
|
||||
common::hash::ObHashSet<uint64_t, hash::NoPthreadDefendMode> dependent_tablet_set_; // tablet_id
|
||||
|
||||
@ -465,6 +465,10 @@ void ObTenantTabletStatMgr::destroy()
|
||||
{
|
||||
ObBucketWLockAllGuard lock_guard(bucket_lock_);
|
||||
stream_map_.destroy();
|
||||
DLIST_REMOVE_ALL_NORET(node, lru_list_) {
|
||||
lru_list_.remove(node);
|
||||
stream_pool_.free(node);
|
||||
}
|
||||
lru_list_.reset();
|
||||
stream_pool_.destroy();
|
||||
report_cursor_ = 0;
|
||||
@ -643,6 +647,7 @@ int ObTenantTabletStatMgr::fetch_node(ObTabletStreamNode *&node)
|
||||
} else if (!lru_list_.add_first(node)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to add node to lru list", K(ret), KPC(node));
|
||||
stream_pool_.free(node);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user