Fix code scan round 2

This commit is contained in:
JiahuaChen 2024-04-18 10:54:48 +00:00 committed by ob-robot
parent a3970cb5e1
commit ef21911834
5 changed files with 11 additions and 2 deletions

View File

@ -1329,7 +1329,8 @@ int ObTableParam::convert_group_by(const ObTableSchema &table_schema,
}
}
}
if (OB_UNLIKELY(!found)) {
if (OB_FAIL(ret)) {
} else if (OB_UNLIKELY(!found)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected group by column id", K(ret), K(i), K(output_column_ids), K(group_by_column_ids));
}

View File

@ -1830,12 +1830,14 @@ void ObMicroBlockEncoder::free_encoders()
FOREACH(ht, hashtables_) {
// should continue even fail
if (OB_FAIL(hashtable_factory_.recycle(*ht))) {
// overwrite ret
LOG_WARN("recycle hashtable failed", K(ret));
}
}
FOREACH(pt, multi_prefix_trees_) {
// should continue even fail
if (OB_FAIL(multi_prefix_tree_factory_.recycle(*pt))) {
// overwrite ret
LOG_WARN("recycle multi-prefix tree failed", K(ret));
}
}

View File

@ -279,6 +279,7 @@ void ObSSTableMergeRes::reset()
for (int64_t i = 0; i < data_block_ids_.count(); ++i) {
const MacroBlockId &block_id = data_block_ids_.at(i);
if (OB_FAIL(OB_SERVER_BLOCK_MGR.dec_ref(block_id))) {
// overwrite ret
STORAGE_LOG(ERROR, "failed to dec macro block ref cnt",
K(ret), "macro id", block_id);
}
@ -287,6 +288,7 @@ void ObSSTableMergeRes::reset()
for (int64_t i = 0; i < other_block_ids_.count(); ++i) {
const MacroBlockId &block_id = other_block_ids_.at(i);
if (OB_FAIL(OB_SERVER_BLOCK_MGR.dec_ref(block_id))) {
// overwrite ret
STORAGE_LOG(ERROR, "failed to dec macro block ref cnt",
K(ret), "macro id", block_id);
}

View File

@ -1446,6 +1446,7 @@ void ObSSTable::dec_macro_ref() const
} else {
while (OB_SUCC(iterator.get_next_macro_id(macro_id))) {
if (OB_FAIL(OB_SERVER_BLOCK_MGR.dec_ref(macro_id))) {
// overwrite ret
LOG_ERROR("fail to dec other block ref cnt", K(ret), K(macro_id));
} else {
LOG_DEBUG("barry debug decrease other ref cnt", K(macro_id), KPC(this), K(lbt()));
@ -1453,7 +1454,8 @@ void ObSSTable::dec_macro_ref() const
}
}
iterator.reset();
if (OB_FAIL(meta_handle.get_sstable_meta().get_macro_info().get_linked_block_iter(iterator))) { // ignore ret
if (OB_FAIL(meta_handle.get_sstable_meta().get_macro_info().get_linked_block_iter(iterator))) {
// overwrite ret
LOG_ERROR("fail to get linked block iterator", K(ret), KPC(this));
} else {
while (OB_SUCC(iterator.get_next_macro_id(macro_id))) {

View File

@ -982,12 +982,14 @@ void ObTmpTenantMemBlockManager::destroy()
STORAGE_LOG(WARN, "pop wait handle failed", K(ret));
} else if (FALSE_IT(wait_info = static_cast<IOWaitInfo*>(node))) {
} else if (OB_FAIL(wait_info->exec_wait())) {
// overwrite ret
STORAGE_LOG(WARN, "fail to exec iohandle wait", K(ret), K_(tenant_id));
}
}
ATOMIC_STORE(&washing_count_, 0);
DestroyBlockMapOp op;
if (OB_FAIL(t_mblk_map_.foreach_refactored(op))) {
// overwrite ret
STORAGE_LOG(WARN, "destroy mblk map failed", K(ret));
}
t_mblk_map_.destroy();