Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
bde4da0f
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bde4da0f
编写于
2月 15, 2021
作者:
A
alexey-milovidov
提交者:
GitHub
2月 15, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20465 from azat/write-abnormal-server-termination-fixes
Fix abnormal server terminations due to write failures
上级
8be87466
06e8065e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
2 deletion
+14
-2
base/daemon/BaseDaemon.cpp
base/daemon/BaseDaemon.cpp
+1
-0
src/Access/DiskAccessStorage.cpp
src/Access/DiskAccessStorage.cpp
+2
-0
src/Common/tests/compact_array.cpp
src/Common/tests/compact_array.cpp
+1
-0
src/IO/WriteBuffer.h
src/IO/WriteBuffer.h
+9
-2
utils/convert-month-partitioned-parts/main.cpp
utils/convert-month-partitioned-parts/main.cpp
+1
-0
未找到文件。
base/daemon/BaseDaemon.cpp
浏览文件 @
bde4da0f
...
...
@@ -562,6 +562,7 @@ void debugIncreaseOOMScore()
{
DB
::
WriteBufferFromFile
buf
(
"/proc/self/oom_score_adj"
);
buf
.
write
(
new_score
.
c_str
(),
new_score
.
size
());
buf
.
close
();
}
catch
(
const
Poco
::
Exception
&
e
)
{
...
...
src/Access/DiskAccessStorage.cpp
浏览文件 @
bde4da0f
...
...
@@ -217,6 +217,7 @@ namespace
/// Write the file.
WriteBufferFromFile
out
{
tmp_file_path
.
string
()};
out
.
write
(
file_contents
.
data
(),
file_contents
.
size
());
out
.
close
();
/// Rename.
std
::
filesystem
::
rename
(
tmp_file_path
,
file_path
);
...
...
@@ -274,6 +275,7 @@ namespace
writeStringBinary
(
name
,
out
);
writeUUIDText
(
id
,
out
);
}
out
.
close
();
}
...
...
src/Common/tests/compact_array.cpp
浏览文件 @
bde4da0f
...
...
@@ -50,6 +50,7 @@ struct Test
{
DB
::
WriteBufferFromFile
wb
(
filename
);
wb
.
write
(
reinterpret_cast
<
const
char
*>
(
&
store
),
sizeof
(
store
));
wb
.
close
();
}
{
...
...
src/IO/WriteBuffer.h
浏览文件 @
bde4da0f
...
...
@@ -95,8 +95,15 @@ public:
++
pos
;
}
virtual
void
sync
()
{}
virtual
void
finalize
()
{}
virtual
void
sync
()
{
next
();
}
virtual
void
finalize
()
{
next
();
}
private:
/** Write the data in the buffer (from the beginning of the buffer to the current position).
...
...
utils/convert-month-partitioned-parts/main.cpp
浏览文件 @
bde4da0f
...
...
@@ -97,6 +97,7 @@ void run(String part_path, String date_column, String dest_path)
Poco
::
File
(
new_tmp_part_path_str
+
"checksums.txt"
).
setWriteable
();
WriteBufferFromFile
checksums_out
(
new_tmp_part_path_str
+
"checksums.txt"
,
4096
);
checksums
.
write
(
checksums_out
);
checksums
.
close
();
Poco
::
File
(
new_tmp_part_path
).
renameTo
(
new_part_path
.
toString
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录