[tablelock] Fix a bug that select __all_virutal_obj_lock will return error code if the LS is offline
This commit is contained in:
@ -129,7 +129,13 @@ int ObAllVirtualObjLock::get_next_obj_lock_or_iter_tx(ObLockID &lock_id)
|
|||||||
} else {
|
} else {
|
||||||
obj_lock_iter_.reset();
|
obj_lock_iter_.reset();
|
||||||
if (OB_FAIL(ls_->get_lock_id_iter(obj_lock_iter_))) {
|
if (OB_FAIL(ls_->get_lock_id_iter(obj_lock_iter_))) {
|
||||||
SERVER_LOG(WARN, "fail to get obj lock iter", K(ret));
|
if (OB_ENTRY_NOT_EXIST == ret) {
|
||||||
|
SERVER_LOG(WARN,
|
||||||
|
"fail to get obj lock iter, try to get next ls",
|
||||||
|
K(ret), K(ls_->get_ls_id()));
|
||||||
|
ret = OB_SUCCESS; // continue
|
||||||
|
}
|
||||||
|
SERVER_LOG(WARN, "fail to get obj lock iter", K(ret), K(ls_->get_ls_id()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -161,6 +167,12 @@ int ObAllVirtualObjLock::get_next_lock_op(transaction::tablelock::ObTableLockOp
|
|||||||
} else {
|
} else {
|
||||||
lock_op_iter_.reset();
|
lock_op_iter_.reset();
|
||||||
if (OB_FAIL(ls_->get_lock_op_iter(lock_id, lock_op_iter_))) {
|
if (OB_FAIL(ls_->get_lock_op_iter(lock_id, lock_op_iter_))) {
|
||||||
|
if (OB_ENTRY_NOT_EXIST == ret) {
|
||||||
|
SERVER_LOG(WARN,
|
||||||
|
"fail to get lock op iter, try to get next lock_id",
|
||||||
|
K(ret), K(lock_id));
|
||||||
|
ret = OB_SUCCESS; // continue
|
||||||
|
}
|
||||||
SERVER_LOG(WARN, "fail to get lock op iter", K(ret), K(lock_id));
|
SERVER_LOG(WARN, "fail to get lock op iter", K(ret), K(lock_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -192,7 +192,7 @@ int ObLockMemtableMgr::release_head_memtable_(memtable::ObIMemtable *imemtable,
|
|||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
int tmp_ret = OB_SUCCESS;
|
int tmp_ret = OB_SUCCESS;
|
||||||
|
|
||||||
LOG_INFO("lock memtable mgr release head memtable", KP(imemtable));
|
LOG_INFO("lock memtable mgr release head memtable", KP(imemtable), K(force));
|
||||||
ObLockMemtable *memtable = static_cast<ObLockMemtable *>(imemtable);
|
ObLockMemtable *memtable = static_cast<ObLockMemtable *>(imemtable);
|
||||||
if (get_memtable_count_() > 0 && force) {
|
if (get_memtable_count_() > 0 && force) {
|
||||||
// for force
|
// for force
|
||||||
@ -203,7 +203,8 @@ int ObLockMemtableMgr::release_head_memtable_(memtable::ObIMemtable *imemtable,
|
|||||||
LOG_WARN("unregister from common checkpoint failed", K(tmp_ret), K_(ls_id), K(memtable));
|
LOG_WARN("unregister from common checkpoint failed", K(tmp_ret), K_(ls_id), K(memtable));
|
||||||
}
|
}
|
||||||
release_head_memtable();
|
release_head_memtable();
|
||||||
FLOG_INFO("succeed to release head lock table memtable", K(ret), K_(ls_id), KP(imemtable));
|
FLOG_INFO("succeed to release head lock table memtable", K(ret),
|
||||||
|
K_(ls_id), KP(imemtable), K(memtable_head_), K(memtable_tail_));
|
||||||
}
|
}
|
||||||
} else if (!force) {
|
} else if (!force) {
|
||||||
// just for flush
|
// just for flush
|
||||||
|
|||||||
Reference in New Issue
Block a user