Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
baa96708
O
oceanbase
项目概览
oceanbase
/
oceanbase
8 个月 前同步成功
通知
260
Star
6084
Fork
1301
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
提交
baa96708
编写于
1月 04, 2022
作者:
H
hiddenbomb
提交者:
LINGuanRen
1月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set DIO_ALIGN_SIZE from 512 to 4096
上级
245b8b7a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
9 deletion
+6
-9
deps/oblib/src/lib/ob_define.h
deps/oblib/src/lib/ob_define.h
+1
-1
src/share/redolog/ob_log_disk_manager.cpp
src/share/redolog/ob_log_disk_manager.cpp
+1
-3
src/share/redolog/ob_log_file_store.cpp
src/share/redolog/ob_log_file_store.cpp
+2
-3
unittest/storage/blocksstable/test_data_buffer.cpp
unittest/storage/blocksstable/test_data_buffer.cpp
+2
-2
未找到文件。
deps/oblib/src/lib/ob_define.h
浏览文件 @
baa96708
...
...
@@ -1874,7 +1874,7 @@ enum ObJITEnableMode {
#define DATABUFFER_SERIALIZE_INFO data_buffer_.get_data(), data_buffer_.get_capacity(), data_buffer_.get_position()
#define DIO_ALIGN_SIZE
512
#define DIO_ALIGN_SIZE
4096
#define DIO_READ_ALIGN_SIZE 4096
#define DIO_ALLOCATOR_CACHE_BLOCK_SIZE (OB_DEFAULT_MACRO_BLOCK_SIZE + DIO_READ_ALIGN_SIZE)
#define CORO_INIT_PRIORITY 120
...
...
src/share/redolog/ob_log_disk_manager.cpp
浏览文件 @
baa96708
...
...
@@ -910,9 +910,7 @@ int ObLogDiskManager::copy_file_content(
int64_t
read_len
=
0
;
int64_t
write_len
=
0
;
int64_t
offset
=
0
;
// CLOG and ILOG DIO aligned size are all CLOG_DIO_ALIGN_SIZE
// SLOG DIO aligned size is DIO_ALIGN_SIZE
int64_t
align_size
=
SLOG_WRITE_POOL
==
pool_type_
?
DIO_ALIGN_SIZE
:
CLOG_DIO_ALIGN_SIZE
;
const
int64_t
align_size
=
DIO_ALIGN_SIZE
;
if
(
!
src_fd
.
is_valid
()
||
file_offset
<
0
)
{
ret
=
OB_INVALID_ARGUMENT
;
...
...
src/share/redolog/ob_log_file_store.cpp
浏览文件 @
baa96708
...
...
@@ -483,7 +483,7 @@ int ObLogFileStore::read(void* buf, int64_t count, int64_t offset, int64_t& read
event_sz
+=
rd_size
;
}
else
if
(
event_res
==
0
)
{
// read nothing from file
ret
=
OB_READ_NOTHING
;
}
else
if
(
event_res
>
0
&&
event_res
<
rd_size
&&
(
0
==
event_res
%
DIO_ALIGN_SIZE
)
)
{
// partial complete
}
else
if
(
event_res
>
0
&&
event_res
<
rd_size
)
{
// partial complete
event_sz
+=
event_res
;
COMMON_LOG
(
INFO
,
"re-submit read"
,
K
(
i
),
K
(
event_res
),
K
(
rd_size
),
K
(
event_sz
),
K
(
count
));
}
else
{
...
...
@@ -1021,8 +1021,7 @@ int ObLogFileStore::process_io_getevents(int64_t& submitted, io_context_t ctx, s
}
else
if
(
event_res
==
wr_info
->
size_
)
{
// full complete
wr_info
->
complete_
=
true
;
wr_info
->
ret_
=
OB_SUCCESS
;
}
else
if
(
event_res
>
0
&&
event_res
<
wr_info
->
size_
&&
(
0
==
event_res
%
DIO_ALIGN_SIZE
))
{
// partial complete
}
else
if
(
event_res
>
0
&&
event_res
<
wr_info
->
size_
)
{
// partial complete
wr_info
->
buf_
=
wr_info
->
buf_
+
event_res
;
wr_info
->
size_
-=
event_res
;
wr_info
->
offset_
+=
event_res
;
...
...
unittest/storage/blocksstable/test_data_buffer.cpp
浏览文件 @
baa96708
...
...
@@ -56,9 +56,9 @@ TEST_F(TestDataBuffer, test_ObSelfBufferWriter)
{
int
ret
=
OB_SUCCESS
;
int64_t
big_size
=
256L
*
1024L
*
1024L
*
1024L
*
1024L
*
1024L
;
// 256TB
ObSelfBufferWriter
buf_align
(
1024
,
ObModIds
::
TEST
,
true
);
ObSelfBufferWriter
buf_align
(
4096
,
ObModIds
::
TEST
,
true
);
ObSelfBufferWriter
buf_not_align
(
0
,
ObModIds
::
TEST
,
false
);
ret
=
buf_align
.
ensure_space
(
1024
);
ret
=
buf_align
.
ensure_space
(
4096
);
ASSERT_EQ
(
ret
,
OB_SUCCESS
);
ret
=
buf_align
.
ensure_space
(
4097
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录