Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
20fb3ee1
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
20fb3ee1
编写于
1月 17, 2022
作者:
L
lx0
提交者:
LINGuanRen
1月 17, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add MacroBlockID in warn log print
上级
b7a5e349
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
17 deletion
+41
-17
src/storage/blocksstable/ob_macro_block_checker.cpp
src/storage/blocksstable/ob_macro_block_checker.cpp
+1
-1
src/storage/blocksstable/ob_macro_block_writer.cpp
src/storage/blocksstable/ob_macro_block_writer.cpp
+3
-3
src/storage/blocksstable/ob_micro_block_reader.cpp
src/storage/blocksstable/ob_micro_block_reader.cpp
+8
-8
src/storage/blocksstable/ob_micro_block_row_scanner.cpp
src/storage/blocksstable/ob_micro_block_row_scanner.cpp
+1
-1
src/storage/ob_sstable_row_whole_scanner.cpp
src/storage/ob_sstable_row_whole_scanner.cpp
+27
-4
src/storage/ob_sstable_row_whole_scanner.h
src/storage/ob_sstable_row_whole_scanner.h
+1
-0
未找到文件。
src/storage/blocksstable/ob_macro_block_checker.cpp
浏览文件 @
20fb3ee1
...
...
@@ -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
));
...
...
src/storage/blocksstable/ob_macro_block_writer.cpp
浏览文件 @
20fb3ee1
...
...
@@ -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
));
}
...
...
src/storage/blocksstable/ob_micro_block_reader.cpp
浏览文件 @
20fb3ee1
...
...
@@ -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
);
...
...
src/storage/blocksstable/ob_micro_block_row_scanner.cpp
浏览文件 @
20fb3ee1
...
...
@@ -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
())
{
...
...
src/storage/ob_sstable_row_whole_scanner.cpp
浏览文件 @
20fb3ee1
...
...
@@ -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
;
...
...
src/storage/ob_sstable_row_whole_scanner.h
浏览文件 @
20fb3ee1
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录