Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lihongda1002
oceanbase
提交
8c615943
O
oceanbase
项目概览
lihongda1002
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8c615943
编写于
10月 19, 2021
作者:
J
JiahuaChen
提交者:
wangzelin.wzl
10月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Skip reuse old file for slog open
上级
6dd10291
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
4 deletion
+15
-4
src/clog/ob_log_file_pool.h
src/clog/ob_log_file_pool.h
+4
-0
src/share/redolog/ob_log_disk_manager.cpp
src/share/redolog/ob_log_disk_manager.cpp
+10
-3
src/share/redolog/ob_log_disk_manager.h
src/share/redolog/ob_log_disk_manager.h
+1
-1
未找到文件。
src/clog/ob_log_file_pool.h
浏览文件 @
8c615943
...
...
@@ -70,6 +70,10 @@ public:
{
return
ATOMIC_LOAD
(
&
min_using_file_id_
);
}
ObLogWritePoolType
get_pool_type
()
const
{
return
type_
;
}
void
update_min_file_id
(
const
file_id_t
file_id
);
void
update_max_file_id
(
const
file_id_t
file_id
);
void
update_min_using_file_id
(
const
file_id_t
file_id
);
...
...
src/share/redolog/ob_log_disk_manager.cpp
浏览文件 @
8c615943
...
...
@@ -308,10 +308,17 @@ int ObLogDiskManager::sync_system_fd(const int64_t file_id, const int64_t disk_i
ret
=
OB_ERR_UNEXPECTED
;
COMMON_LOG
(
ERROR
,
"unexpected scenario"
,
K
(
ret
),
K
(
disk_id
),
K
(
file_id
),
K
(
fd_info
),
K
(
disk_slots_
[
disk_id
]));
}
}
else
if
(
enable_write
&&
!
is_tmp
)
{
// clog write, may reuse old log file
}
else
if
(
enable_write
&&
!
is_tmp
)
{
if
(
ObLogWritePoolType
::
CLOG_WRITE_POOL
==
disk_slots_
[
disk_id
].
get_file_pool
()
->
get_pool_type
())
{
// clog write, may reuse old log file
if
(
OB_FAIL
(
disk_slots_
[
disk_id
].
get_file_pool
()
->
get_fd
((
uint32_t
)
file_id
,
tmp_fd
)))
{
COMMON_LOG
(
ERROR
,
"file pool get fd fail"
,
K
(
ret
),
K
(
file_id
));
}
}
else
{
if
(
OB_FAIL
(
inner_open_fd
(
disk_id
,
file_id
,
OPEN_FLAG_WRITE
,
is_tmp
,
tmp_fd
)))
{
COMMON_LOG
(
ERROR
,
"open fd fail"
,
K
(
ret
),
K
(
enable_write
),
K
(
is_tmp
));
}
}
}
else
if
(
enable_write
&&
is_tmp
)
{
// ilog write tmp file
if
(
OB_FAIL
(
inner_open_fd
(
disk_id
,
file_id
,
OPEN_FLAG_WRITE
,
is_tmp
,
tmp_fd
)))
{
COMMON_LOG
(
ERROR
,
"open fd fail"
,
K
(
ret
),
K
(
enable_write
),
K
(
is_tmp
));
...
...
src/share/redolog/ob_log_disk_manager.h
浏览文件 @
8c615943
...
...
@@ -501,7 +501,7 @@ private:
int
get_total_disk_space_
(
int64_t
&
total_space
)
const
;
static
const
int
OPEN_FLAG_READ
=
O_RDONLY
|
O_DIRECT
;
static
const
int
OPEN_FLAG_WRITE
=
O_
WRONLY
|
O_DIRECT
|
O_SYNC
|
O_CREAT
;
static
const
int
OPEN_FLAG_WRITE
=
O_
RDWR
|
O_DIRECT
|
O_SYNC
|
O_CREAT
;
static
const
int
OPEN_FLAG_WRITE_WITHOUT_CREATE
=
O_WRONLY
|
O_DIRECT
|
O_SYNC
;
static
const
int
OPEN_MODE
=
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IROTH
;
static
const
int64_t
MONITOR_TASK_INTERVAL_US
=
1000
*
1000
;
// 1 seconds
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录