提交 20fb3ee1 编写于 作者: L lx0 提交者: LINGuanRen

add MacroBlockID in warn log print

上级 b7a5e349
......@@ -423,7 +423,7 @@ int ObSSTableMacroBlockChecker::check_micro_data(
row.row_val_.count_ = OB_ROW_MAX_COLUMNS_COUNT;
row.capacity_ = OB_ROW_MAX_COLUMNS_COUNT;
if (OB_FAIL(reader->get_row(iter, row))) {
STORAGE_LOG(WARN, "fail to get row", K(ret), K(iter));
STORAGE_LOG(WARN, "fail to get row", K(ret), K(iter), K(meta));
} else if (row.row_val_.count_ != meta.meta_->column_number_) {
ret = OB_INVALID_DATA;
STORAGE_LOG(WARN, "column number not match", K(ret));
......
......@@ -415,7 +415,7 @@ int ObMacroBlockWriter::append_micro_block(const ObMicroBlock& micro_block)
} else if (!need_merge) {
if (micro_writer_->get_row_count() > 0) {
if (OB_FAIL(build_micro_block())) {
STORAGE_LOG(WARN, "build_micro_block failed", K(ret));
STORAGE_LOG(WARN, "build_micro_block failed", K(ret), KPC(this));
}
}
if (OB_SUCC(ret)) {
......@@ -423,14 +423,14 @@ int ObMacroBlockWriter::append_micro_block(const ObMicroBlock& micro_block)
if (OB_FAIL(build_micro_block_desc(micro_block, micro_block_desc))) {
STORAGE_LOG(WARN, "build_micro_block_desc failed", K(ret), K(micro_block));
} else if (OB_FAIL(write_micro_block(micro_block_desc))) {
STORAGE_LOG(WARN, "Failed to write micro block, ", K(ret), K(micro_block_desc));
STORAGE_LOG(WARN, "Failed to write micro block, ", K(ret), K(micro_block_desc), KPC(this));
} else if (NULL != data_store_desc_->merge_info_) {
data_store_desc_->merge_info_->rewrite_macro_old_micro_block_count_++;
}
}
} else {
if (OB_FAIL(merge_micro_block(micro_block))) {
STORAGE_LOG(WARN, "merge_micro_block failed", K(micro_block), K(ret));
STORAGE_LOG(WARN, "merge_micro_block failed", K(micro_block), K(ret), KPC(this));
} else {
STORAGE_LOG(TRACE, "merge micro block", K(micro_block));
}
......
......@@ -58,7 +58,7 @@ int ObMicroBlockGetReader::get_row(const uint64_t tenant_id, const ObMicroBlockD
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
}
} else if (OB_FAIL(row_reader.read_row(row_buf, row_len, 0, column_map, allocator_, row))) {
STORAGE_LOG(WARN, "Fail to read row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "Fail to read row, ", K(ret), K(rowkey), K(macro_meta));
}
}
return ret;
......@@ -78,14 +78,14 @@ int ObMicroBlockGetReader::get_row(const uint64_t tenant_id, const ObMicroBlockD
int64_t pos = 0;
if (OB_FAIL(locate_row(rowkey, rowkey_helper, macro_meta.schema_->column_type_array_, row_buf, row_len))) {
if (OB_BEYOND_THE_RANGE != ret) {
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey), K(macro_meta));
}
} else {
ObFlatRowReader row_reader;
row.row_val_.count_ = macro_meta.meta_->column_number_;
if (OB_FAIL(row_reader.read_full_row(
row_buf, row_len, pos, macro_meta.schema_->column_type_array_, allocator_, row))) {
STORAGE_LOG(WARN, "failed to read full row, ", K(ret), K(rowkey), K(pos));
STORAGE_LOG(WARN, "failed to read full row, ", K(ret), K(rowkey), K(pos), K(macro_meta));
}
}
}
......@@ -109,7 +109,7 @@ int ObMicroBlockGetReader::exist_row(const uint64_t tenant_id, const ObMicroBloc
if (OB_BEYOND_THE_RANGE == ret) {
ret = OB_SUCCESS;
} else {
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey), K(macro_meta));
}
} else {
const ObRowHeader* row_header = reinterpret_cast<const ObRowHeader*>(row_buf);
......@@ -323,7 +323,7 @@ int ObMultiVersionBlockGetReader::get_row(const uint64_t tenant_id, const ObMicr
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
}
} else if (OB_FAIL(row_reader.read_row(row_buf, row_len, 0, column_map, allocator_, row))) {
STORAGE_LOG(WARN, "Fail to read row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "Fail to read row, ", K(ret), K(rowkey), K(macro_meta));
}
}
return ret;
......@@ -343,14 +343,14 @@ int ObMultiVersionBlockGetReader::get_row(const uint64_t tenant_id, const ObMicr
int64_t pos = 0;
if (OB_FAIL(locate_row(rowkey, rowkey_helper, macro_meta.schema_->column_type_array_, row_buf, row_len))) {
if (OB_UNLIKELY(OB_BEYOND_THE_RANGE != ret)) {
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey), K(macro_meta));
}
} else {
ObFlatRowReader row_reader;
row.row_val_.count_ = macro_meta.schema_->column_number_;
if (OB_FAIL(row_reader.read_full_row(
row_buf, row_len, pos, macro_meta.schema_->column_type_array_, allocator_, row))) {
STORAGE_LOG(WARN, "failed to read full row, ", K(ret), K(rowkey), K(pos));
STORAGE_LOG(WARN, "failed to read full row, ", K(ret), K(rowkey), K(pos), K(macro_meta));
}
}
}
......@@ -374,7 +374,7 @@ int ObMultiVersionBlockGetReader::exist_row(const uint64_t tenant_id, const ObMi
if (OB_LIKELY(OB_BEYOND_THE_RANGE == ret)) {
ret = OB_SUCCESS;
} else {
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey));
STORAGE_LOG(WARN, "failed to locate row, ", K(ret), K(rowkey), K(macro_meta));
}
} else {
const ObRowHeader* row_header = reinterpret_cast<const ObRowHeader*>(row_buf);
......
......@@ -502,7 +502,7 @@ int ObMicroBlockRowScanner::inner_get_next_row(const ObStoreRow*& row)
ObStoreRow& dest_row = rows_[0];
dest_row.row_val_.count_ = OB_ROW_MAX_COLUMNS_COUNT;
if (OB_FAIL(reader_->get_row(current_, dest_row))) {
STORAGE_LOG(WARN, "micro block reader fail to get row.", K(ret));
STORAGE_LOG(WARN, "micro block reader fail to get row.", K(ret), K(macro_id_));
} else {
row = &dest_row;
if (context_->query_flag_.is_multi_version_minor_merge()) {
......
......@@ -138,7 +138,12 @@ int ObSSTableRowWholeScanner::inner_open(
if (OB_SUCC(ret)) {
if (OB_FAIL(open_macro_block())) {
LOG_WARN("failed to open macro block", K(ret));
LOG_WARN("failed to open macro block",
K(ret),
K(cur_macro_cursor_),
K(cur_micro_cursor_),
"macro_block",
macro_blocks_[cur_macro_cursor_]);
} else {
cur_micro_cursor_ = 0;
if (OB_FAIL(open_micro_block(true))) {
......@@ -196,7 +201,12 @@ int ObSSTableRowWholeScanner::open(const ObTableIterParam& iter_param, ObTableAc
} else if (OB_FAIL(prefetch())) {
LOG_WARN("Fail to do prefetch, ", K(ret));
} else if (OB_FAIL(open_macro_block())) {
LOG_WARN("failed to open macro block", K(ret));
LOG_WARN("failed to open macro block",
K(ret),
K(cur_macro_cursor_),
K(cur_micro_cursor_),
"macro_block",
macro_blocks_[cur_macro_cursor_]);
} else {
cur_micro_cursor_ = 0;
if (OB_FAIL(open_micro_block(true))) {
......@@ -295,14 +305,25 @@ int ObSSTableRowWholeScanner::inner_get_next_row(const ObStoreRow*& row)
if (++cur_macro_cursor_ >= macro_blocks_.count()) {
ret = OB_ITER_END;
} else if (OB_FAIL(open_macro_block())) {
LOG_WARN("failed to open macro block", K(ret), K(cur_macro_cursor_), K(cur_micro_cursor_));
LOG_WARN("failed to open macro block",
K(ret),
K(cur_macro_cursor_),
K(cur_micro_cursor_),
"macro_block",
macro_blocks_[cur_macro_cursor_]);
} else {
cur_micro_cursor_ = 0;
}
}
if (OB_SUCC(ret)) {
if (OB_FAIL(open_micro_block(false))) {
LOG_WARN("failed to open micro block, ", K(ret), K(cur_macro_cursor_), K(cur_micro_cursor_));
LOG_WARN("failed to open micro block, ",
K(ret),
K(cur_macro_cursor_),
K(cur_micro_cursor_),
"macro_block",
macro_blocks_[cur_macro_cursor_],
KPC(scan_handle));
}
}
}
......@@ -398,6 +419,8 @@ int ObSSTableRowWholeScanner::open_macro_block()
if (OB_FAIL(prefetch())) {
LOG_WARN("failed to do prefetch", K(ret));
}
} else {
LOG_WARN("failed to open macro block", K(ret), KPC(scan_handle), K(cur_macro_cursor_));
}
}
return ret;
......
......@@ -29,6 +29,7 @@ private:
{}
void reset();
int get_block_data(const int64_t cur_micro_cursor, blocksstable::ObMicroBlockData& block_data);
TO_STRING_KV(K_(macro_block_id), K_(meta), K_(is_left_border), K_(is_right_border));
blocksstable::MacroBlockId macro_block_id_;
blocksstable::ObMacroBlockHandle macro_io_handle_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册