Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
indiff7643
Terarkdb
提交
cc97aef8
T
Terarkdb
项目概览
indiff7643
/
Terarkdb
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Terarkdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cc97aef8
编写于
4月 28, 2021
作者:
Z
ZhaoMing
提交者:
奏之章
6月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More details for table_file_creation
上级
98a5c0aa
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
8 deletion
+34
-8
db/column_family.cc
db/column_family.cc
+1
-1
db/event_helpers.cc
db/event_helpers.cc
+29
-0
db/version_builder.cc
db/version_builder.cc
+4
-7
未找到文件。
db/column_family.cc
浏览文件 @
cc97aef8
...
...
@@ -215,7 +215,7 @@ ColumnFamilyOptions SanitizeOptions(const ImmutableDBOptions& db_options,
if
(
result
.
compaction_style
!=
CompactionStyle
::
kCompactionStyleLevel
||
!
result
.
enable_lazy_compaction
)
{
result
.
optimize_
filters_for_hits
=
false
;
result
.
optimize_
range_deletion
=
false
;
}
if
(
result
.
max_write_buffer_number
<
2
)
{
...
...
db/event_helpers.cc
浏览文件 @
cc97aef8
...
...
@@ -6,6 +6,7 @@
#include "db/event_helpers.h"
#include "rocksdb/terark_namespace.h"
#include "util/string_util.h"
namespace
TERARKDB_NAMESPACE
{
...
...
@@ -101,6 +102,34 @@ void EventHelpers::LogAndNotifyTableFileCreationFinished(
<<
"num_data_blocks"
<<
table_properties
.
num_data_blocks
<<
"num_entries"
<<
table_properties
.
num_entries
<<
"filter_policy_name"
<<
table_properties
.
filter_policy_name
;
if
(
!
table_properties
.
dependence
.
empty
())
{
jwriter
<<
"dependence"
;
auto
&
dependence
=
table_properties
.
dependence
;
jwriter
.
StartArray
();
for
(
size_t
i
=
0
;
i
<
dependence
.
size
();
++
i
)
{
if
(
i
<
100
)
{
jwriter
<<
dependence
[
i
].
file_number
;
}
else
{
jwriter
<<
"...("
+
ToString
(
dependence
.
size
()
-
i
)
+
")"
;
break
;
}
}
jwriter
.
EndArray
();
}
if
(
!
table_properties
.
inheritance_tree
.
empty
())
{
jwriter
<<
"inheritance_tree"
;
jwriter
.
StartArray
();
auto
&
inheritance_tree
=
table_properties
.
inheritance_tree
;
for
(
size_t
i
=
0
;
i
<
inheritance_tree
.
size
();
++
i
)
{
if
(
i
<
100
)
{
jwriter
<<
inheritance_tree
[
i
];
}
else
{
jwriter
<<
"...("
+
ToString
(
inheritance_tree
.
size
()
-
i
)
+
")"
;
break
;
}
}
jwriter
.
EndArray
();
}
// user collected properties
for
(
const
auto
&
prop
:
table_properties
.
readable_properties
)
{
...
...
db/version_builder.cc
浏览文件 @
cc97aef8
...
...
@@ -18,10 +18,7 @@
#include <algorithm>
#include <atomic>
#include <functional>
#include <map>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
...
...
@@ -33,6 +30,7 @@
#include "rocksdb/terark_namespace.h"
#include "util/c_style_callback.h"
#include "util/chash_map.h"
#include "util/chash_set.h"
#define ROCKS_VERSION_BUILDER_DEBUG 0
...
...
@@ -147,7 +145,7 @@ struct VersionBuilderContextImpl : VersionBuilder::Context {
}
TableCache
*
table_cache
;
std
::
unordered
_map
<
uint64_t
,
FileMetaData
*>*
levels
;
chash
_map
<
uint64_t
,
FileMetaData
*>*
levels
;
size_t
dependence_version
;
size_t
new_deleted_files
;
chash_map
<
uint64_t
,
DependenceItem
>
dependence_map
;
...
...
@@ -196,7 +194,7 @@ class VersionBuilder::Rep {
// storing them in levels to avoid regression in case there are no files
// on invalid levels. The version is not consistent if in the end the files
// on invalid levels don't cancel out.
std
::
map
<
int
,
std
::
unordered
_set
<
uint64_t
>>
invalid_levels_
;
chash_map
<
int
,
chash
_set
<
uint64_t
>>
invalid_levels_
;
// Whether there are invalid new files or invalid deletion on levels larger
// than num_levels_.
bool
has_invalid_levels_
;
...
...
@@ -589,8 +587,7 @@ class VersionBuilder::Rep {
auto
base_context
=
base_vstorage_
->
ReleaseVersionBuilderContext
();
if
(
base_context
==
nullptr
)
{
context_
.
reset
(
new
VersionBuilderContextImpl
());
context_
->
levels
=
new
std
::
unordered_map
<
uint64_t
,
FileMetaData
*>
[
num_levels_
];
context_
->
levels
=
new
chash_map
<
uint64_t
,
FileMetaData
*>
[
num_levels_
];
context_
->
table_cache
=
table_cache_
;
for
(
int
level
=
-
1
;
level
<
num_levels_
;
level
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录