Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
indiff7643
Terarkdb
提交
328ac7ee
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,发现更多精彩内容 >>
提交
328ac7ee
编写于
2月 05, 2014
作者:
I
Igor Canadi
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into columnfamilies
上级
c24d8c4e
183ba01a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
18 deletion
+11
-18
db/memtable.cc
db/memtable.cc
+4
-8
include/rocksdb/env.h
include/rocksdb/env.h
+1
-1
table/filter_block.cc
table/filter_block.cc
+1
-1
tools/db_repl_stress.cc
tools/db_repl_stress.cc
+2
-2
util/crc32c.cc
util/crc32c.cc
+2
-5
util/ldb_cmd.cc
util/ldb_cmd.cc
+1
-1
未找到文件。
db/memtable.cc
浏览文件 @
328ac7ee
...
...
@@ -149,7 +149,7 @@ void MemTable::Add(SequenceNumber s, ValueType type,
p
+=
8
;
p
=
EncodeVarint32
(
p
,
val_size
);
memcpy
(
p
,
value
.
data
(),
val_size
);
assert
((
p
+
val_size
)
-
buf
==
(
unsigned
)
encoded_len
);
assert
((
unsigned
)(
p
+
val_size
-
buf
)
==
(
unsigned
)
encoded_len
);
table_
->
Insert
(
buf
);
// The first sequence number inserted into the memtable
...
...
@@ -303,13 +303,9 @@ bool MemTable::Update(SequenceNumber seq, ValueType type,
value
.
size
());
WriteLock
wl
(
GetLock
(
lkey
.
user_key
()));
memcpy
(
p
,
value
.
data
(),
value
.
size
());
assert
(
(
p
+
value
.
size
())
-
entry
==
(
unsigned
)
(
VarintLength
(
key_length
)
+
key_length
+
VarintLength
(
value
.
size
())
+
value
.
size
())
);
assert
((
unsigned
)((
p
+
value
.
size
())
-
entry
)
==
(
unsigned
)(
VarintLength
(
key_length
)
+
key_length
+
VarintLength
(
value
.
size
())
+
value
.
size
()));
return
true
;
}
}
...
...
include/rocksdb/env.h
浏览文件 @
328ac7ee
...
...
@@ -438,7 +438,7 @@ class WritableFile {
// This asks the OS to initiate flushing the cached data to disk,
// without waiting for completion.
// Default implementation does nothing.
virtual
Status
RangeSync
(
off
_t
offset
,
off
_t
nbytes
)
{
virtual
Status
RangeSync
(
off
64_t
offset
,
off64
_t
nbytes
)
{
return
Status
::
OK
();
}
...
...
table/filter_block.cc
浏览文件 @
328ac7ee
...
...
@@ -173,7 +173,7 @@ bool FilterBlockReader::MayMatch(uint64_t block_offset, const Slice& entry) {
if
(
index
<
num_
)
{
uint32_t
start
=
DecodeFixed32
(
offset_
+
index
*
4
);
uint32_t
limit
=
DecodeFixed32
(
offset_
+
index
*
4
+
4
);
if
(
start
<=
limit
&&
limit
<=
(
offset_
-
data_
))
{
if
(
start
<=
limit
&&
limit
<=
(
uint32_t
)(
offset_
-
data_
))
{
Slice
filter
=
Slice
(
data_
+
start
,
limit
-
start
);
return
policy_
->
KeyMayMatch
(
entry
,
filter
);
}
else
if
(
start
==
limit
)
{
...
...
tools/db_repl_stress.cc
浏览文件 @
328ac7ee
...
...
@@ -125,8 +125,8 @@ int main(int argc, const char** argv) {
replThread
.
stop
.
Release_Store
(
nullptr
);
if
(
replThread
.
no_read
<
dataPump
.
no_records
)
{
// no. read should be => than inserted.
fprintf
(
stderr
,
"No. of Record's written and read not same
\n
Read : %
ld
"
" Written : %
ld
\n
"
,
replThread
.
no_read
,
dataPump
.
no_records
);
fprintf
(
stderr
,
"No. of Record's written and read not same
\n
Read : %
zu
"
" Written : %
zu
\n
"
,
replThread
.
no_read
,
dataPump
.
no_records
);
exit
(
1
);
}
fprintf
(
stderr
,
"Successful!
\n
"
);
...
...
util/crc32c.cc
浏览文件 @
328ac7ee
...
...
@@ -333,17 +333,14 @@ static bool isSSE42() {
}
typedef
void
(
*
Function
)(
uint64_t
*
,
uint8_t
const
**
);
static
Function
func
=
nullptr
;
static
inline
Function
Choose_CRC32
()
{
return
isSSE42
()
?
Fast_CRC32
:
Slow_CRC32
;
}
static
Function
func
=
Choose_CRC32
();
static
inline
void
CRC32
(
uint64_t
*
l
,
uint8_t
const
**
p
)
{
if
(
func
!=
nullptr
)
{
return
func
(
l
,
p
);
}
func
=
Choose_CRC32
();
func
(
l
,
p
);
}
...
...
util/ldb_cmd.cc
浏览文件 @
328ac7ee
...
...
@@ -1004,7 +1004,7 @@ Options ReduceDBLevelsCommand::PrepareOptionsForOpenDB() {
opt
.
num_levels
=
old_levels_
;
opt
.
max_bytes_for_level_multiplier_additional
.
resize
(
opt
.
num_levels
,
1
);
// Disable size compaction
opt
.
max_bytes_for_level_base
=
1UL
<<
50
;
opt
.
max_bytes_for_level_base
=
1UL
L
<<
50
;
opt
.
max_bytes_for_level_multiplier
=
1
;
opt
.
max_mem_compaction_level
=
0
;
return
opt
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录