[BUG.FIX] fix -4002 in replay task
This commit is contained in:
@ -30,9 +30,12 @@ int ObIMemtableMgr::get_active_memtable(ObTableHandleV2 &handle) const
|
|||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
MemMgrRLockGuard lock_guard(lock_);
|
MemMgrRLockGuard lock_guard(lock_);
|
||||||
if (OB_UNLIKELY(memtable_tail_ <= 0)) {
|
if (OB_UNLIKELY(memtable_tail_ < memtable_head_)) {
|
||||||
|
ret = OB_ERR_UNEXPECTED;
|
||||||
|
STORAGE_LOG(WARN, "unexpected error, tail < head", K(ret), K(memtable_tail_), K(memtable_head_));
|
||||||
|
} else if (OB_UNLIKELY(memtable_tail_ == memtable_head_)) {
|
||||||
ret = OB_ENTRY_NOT_EXIST;
|
ret = OB_ENTRY_NOT_EXIST;
|
||||||
STORAGE_LOG(WARN, "There is no memtable in MemtableMgr", K(ret), K(memtable_tail_));
|
STORAGE_LOG(WARN, "There is no memtable in MemtableMgr", K(ret), K(memtable_head_), K(memtable_tail_));
|
||||||
} else if (OB_FAIL(get_ith_memtable(memtable_tail_ - 1, handle))) {
|
} else if (OB_FAIL(get_ith_memtable(memtable_tail_ - 1, handle))) {
|
||||||
STORAGE_LOG(WARN, "fail to get ith memtable", K(ret), K(memtable_tail_));
|
STORAGE_LOG(WARN, "fail to get ith memtable", K(ret), K(memtable_tail_));
|
||||||
} else if (OB_UNLIKELY(!handle.is_valid())) {
|
} else if (OB_UNLIKELY(!handle.is_valid())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user