Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
indiff7643
Terarkdb
提交
02e62ebb
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,发现更多精彩内容 >>
提交
02e62ebb
编写于
3月 16, 2016
作者:
E
Edouard A
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes warnings and ensure correct int behavior on 32-bit platforms.
上级
3d29f914
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
13 addition
and
12 deletion
+13
-12
db/managed_iterator.cc
db/managed_iterator.cc
+3
-2
db/memtable_list.cc
db/memtable_list.cc
+2
-2
db/version_set.cc
db/version_set.cc
+2
-2
table/block_based_table_factory.cc
table/block_based_table_factory.cc
+3
-3
util/arena.cc
util/arena.cc
+1
-1
util/random.h
util/random.h
+1
-1
util/testutil.cc
util/testutil.cc
+1
-1
未找到文件。
db/managed_iterator.cc
浏览文件 @
02e62ebb
...
...
@@ -79,7 +79,7 @@ ManagedIterator::ManagedIterator(DBImpl* db, const ReadOptions& read_options,
release_supported_
(
true
)
{
read_options_
.
managed
=
false
;
if
((
!
read_options_
.
tailing
)
&&
(
read_options_
.
snapshot
==
nullptr
))
{
assert
(
read_options_
.
snapshot
=
db_
->
GetSnapshot
(
));
assert
(
nullptr
!=
(
read_options_
.
snapshot
=
db_
->
GetSnapshot
()
));
snapshot_created_
=
true
;
}
cfh_
.
SetCFD
(
cfd
);
...
...
@@ -210,7 +210,8 @@ void ManagedIterator::RebuildIterator() {
void
ManagedIterator
::
UpdateCurrent
()
{
assert
(
mutable_iter_
!=
nullptr
);
if
(
!
(
valid_
=
mutable_iter_
->
Valid
()))
{
valid_
=
mutable_iter_
->
Valid
();
if
(
!
valid_
)
{
status_
=
mutable_iter_
->
status
();
return
;
}
...
...
db/memtable_list.cc
浏览文件 @
02e62ebb
...
...
@@ -345,8 +345,8 @@ Status MemTableList::InstallMemtableFlushResults(
imm_flush_needed
.
store
(
true
,
std
::
memory_order_release
);
}
++
mem_id
;
}
while
(
!
current_
->
memlist_
.
empty
()
&&
(
m
=
current_
->
memlist_
.
back
(
))
&&
m
->
file_number_
==
file_number
);
}
while
(
!
current_
->
memlist_
.
empty
()
&&
(
nullptr
!=
(
m
=
current_
->
memlist_
.
back
()
))
&&
(
m
->
file_number_
==
file_number
)
);
}
commit_in_progress_
=
false
;
return
s
;
...
...
db/version_set.cc
浏览文件 @
02e62ebb
...
...
@@ -90,8 +90,8 @@ class FilePicker {
const
Comparator
*
user_comparator
,
const
InternalKeyComparator
*
internal_comparator
)
:
num_levels_
(
num_levels
),
curr_level_
(
-
1
),
hit_file_level_
(
-
1
),
curr_level_
(
static_cast
<
unsigned
int
>
(
-
1
)
),
hit_file_level_
(
static_cast
<
unsigned
int
>
(
-
1
)
),
search_left_bound_
(
0
),
search_right_bound_
(
FileIndexer
::
kLevelMaxIndex
),
#ifndef NDEBUG
...
...
table/block_based_table_factory.cc
浏览文件 @
02e62ebb
...
...
@@ -110,7 +110,7 @@ std::string BlockBasedTableFactory::GetPrintableTableOptions() const {
snprintf
(
buffer
,
kBufferSize
,
" flush_block_policy_factory: %s (%p)
\n
"
,
table_options_
.
flush_block_policy_factory
->
Name
(),
table_options_
.
flush_block_policy_factory
.
get
(
));
static_cast
<
void
*>
(
table_options_
.
flush_block_policy_factory
.
get
()
));
ret
.
append
(
buffer
);
snprintf
(
buffer
,
kBufferSize
,
" cache_index_and_filter_blocks: %d
\n
"
,
table_options_
.
cache_index_and_filter_blocks
);
...
...
@@ -128,7 +128,7 @@ std::string BlockBasedTableFactory::GetPrintableTableOptions() const {
table_options_
.
no_block_cache
);
ret
.
append
(
buffer
);
snprintf
(
buffer
,
kBufferSize
,
" block_cache: %p
\n
"
,
table_options_
.
block_cache
.
get
(
));
static_cast
<
void
*>
(
table_options_
.
block_cache
.
get
()
));
ret
.
append
(
buffer
);
if
(
table_options_
.
block_cache
)
{
snprintf
(
buffer
,
kBufferSize
,
" block_cache_size: %"
ROCKSDB_PRIszt
"
\n
"
,
...
...
@@ -136,7 +136,7 @@ std::string BlockBasedTableFactory::GetPrintableTableOptions() const {
ret
.
append
(
buffer
);
}
snprintf
(
buffer
,
kBufferSize
,
" block_cache_compressed: %p
\n
"
,
table_options_
.
block_cache_compressed
.
get
(
));
static_cast
<
void
*>
(
table_options_
.
block_cache_compressed
.
get
()
));
ret
.
append
(
buffer
);
if
(
table_options_
.
block_cache_compressed
)
{
snprintf
(
buffer
,
kBufferSize
,
...
...
util/arena.cc
浏览文件 @
02e62ebb
...
...
@@ -26,7 +26,7 @@ const size_t Arena::kInlineSize;
#endif
const
size_t
Arena
::
kMinBlockSize
=
4096
;
const
size_t
Arena
::
kMaxBlockSize
=
2
<<
30
;
const
size_t
Arena
::
kMaxBlockSize
=
2
u
<<
30
;
static
const
int
kAlignUnit
=
sizeof
(
void
*
);
size_t
OptimizeBlockSize
(
size_t
block_size
)
{
...
...
util/random.h
浏览文件 @
02e62ebb
...
...
@@ -102,7 +102,7 @@ class Random64 {
// return "base" random bits. The effect is to pick a number in the
// range [0,2^max_log-1] with exponential bias towards smaller numbers.
uint64_t
Skewed
(
int
max_log
)
{
return
Uniform
(
1
<<
Uniform
(
max_log
+
1
));
return
Uniform
(
uint64_t
(
1
)
<<
Uniform
(
max_log
+
1
));
}
};
...
...
util/testutil.cc
浏览文件 @
02e62ebb
...
...
@@ -113,7 +113,7 @@ class Uint64ComparatorImpl : public Comparator {
};
}
// namespace
static
port
::
OnceType
once
=
LEVELDB_ONCE_INIT
;
static
port
::
OnceType
once
;
static
const
Comparator
*
uint64comp
;
static
void
InitModule
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录