Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
indiff7643
Terarkdb
提交
5f2c136c
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,发现更多精彩内容 >>
提交
5f2c136c
编写于
9月 15, 2013
作者:
R
Rajat Goel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor fixes found while trying to compile it using clang on Mac OS X
上级
88664480
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
22 addition
and
24 deletion
+22
-24
db/builder.h
db/builder.h
+1
-1
db/db_bench.cc
db/db_bench.cc
+0
-12
db/merge_helper.h
db/merge_helper.h
+0
-1
db/repair.cc
db/repair.cc
+0
-1
include/rocksdb/env.h
include/rocksdb/env.h
+6
-1
util/cache.cc
util/cache.cc
+2
-4
util/env_posix.cc
util/env_posix.cc
+12
-1
utilities/ttl/db_ttl.cc
utilities/ttl/db_ttl.cc
+1
-2
utilities/ttl/db_ttl.h
utilities/ttl/db_ttl.h
+0
-1
未找到文件。
db/builder.h
浏览文件 @
5f2c136c
...
...
@@ -15,7 +15,7 @@ struct Options;
struct
FileMetaData
;
class
Env
;
class
EnvOptions
;
struct
EnvOptions
;
class
Iterator
;
class
TableCache
;
class
VersionEdit
;
...
...
db/db_bench.cc
浏览文件 @
5f2c136c
...
...
@@ -421,18 +421,6 @@ class RandomGenerator {
}
};
static
Slice
TrimSpace
(
Slice
s
)
{
unsigned
int
start
=
0
;
while
(
start
<
s
.
size
()
&&
isspace
(
s
[
start
]))
{
start
++
;
}
unsigned
int
limit
=
s
.
size
();
while
(
limit
>
start
&&
isspace
(
s
[
limit
-
1
]))
{
limit
--
;
}
return
Slice
(
s
.
data
()
+
start
,
limit
-
start
);
}
static
void
AppendWithSpace
(
std
::
string
*
str
,
Slice
msg
)
{
if
(
msg
.
empty
())
return
;
if
(
!
str
->
empty
())
{
...
...
db/merge_helper.h
浏览文件 @
5f2c136c
...
...
@@ -83,7 +83,6 @@ class MergeHelper {
const
Comparator
*
user_comparator_
;
const
MergeOperator
*
user_merge_operator_
;
Logger
*
logger_
;
Iterator
*
iter_
;
// in: the internal iterator, positioned at the first merge entry
bool
assert_valid_internal_key_
;
// enforce no internal key corruption?
// the scratch area that holds the result of MergeUntil
...
...
db/repair.cc
浏览文件 @
5f2c136c
...
...
@@ -97,7 +97,6 @@ class Repairer {
InternalKeyComparator
const
icmp_
;
InternalFilterPolicy
const
ipolicy_
;
Options
const
options_
;
bool
owns_cache_
;
TableCache
*
table_cache_
;
VersionEdit
*
edit_
;
...
...
include/rocksdb/env.h
浏览文件 @
5f2c136c
...
...
@@ -18,8 +18,13 @@
#include <memory>
#include <vector>
#include <stdint.h>
#include <sys/types.h>
#include "rocksdb/status.h"
#ifdef __APPLE__
typedef
off_t
off64_t
;
#endif
namespace
leveldb
{
class
FileLock
;
...
...
@@ -28,7 +33,7 @@ class RandomAccessFile;
class
SequentialFile
;
class
Slice
;
class
WritableFile
;
class
Options
;
struct
Options
;
using
std
::
unique_ptr
;
using
std
::
shared_ptr
;
...
...
util/cache.cc
浏览文件 @
5f2c136c
...
...
@@ -159,7 +159,6 @@ class LRUCache {
// mutex_ protects the following state.
port
::
Mutex
mutex_
;
size_t
usage_
;
uint64_t
last_id_
;
// Dummy head of LRU list.
// lru.prev is newest entry, lru.next is oldest entry.
...
...
@@ -169,8 +168,7 @@ class LRUCache {
};
LRUCache
::
LRUCache
()
:
usage_
(
0
),
last_id_
(
0
)
{
:
usage_
(
0
)
{
// Make empty circular linked list
lru_
.
next
=
&
lru_
;
lru_
.
prev
=
&
lru_
;
...
...
@@ -333,7 +331,7 @@ class ShardedLRUCache : public Cache {
MutexLock
l
(
&
id_mutex_
);
return
++
(
last_id_
);
}
virtual
uint64
_t
GetCapacity
()
{
virtual
size
_t
GetCapacity
()
{
return
capacity_
;
}
};
...
...
util/env_posix.cc
浏览文件 @
5f2c136c
...
...
@@ -14,10 +14,15 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#ifdef __APPLE__
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/statfs.h>
#include <sys/vfs.h>
#endif
#include <sys/time.h>
#include <sys/types.h>
#include <sys/vfs.h>
#include <time.h>
#include <unistd.h>
#if defined(OS_LINUX)
...
...
@@ -126,7 +131,9 @@ class PosixSequentialFile: public SequentialFile {
if
(
!
use_os_buffer_
)
{
// we need to fadvise away the entire range of pages because
// we do not want readahead pages to be cached.
#ifndef __APPLE__
posix_fadvise
(
fd_
,
0
,
0
,
POSIX_FADV_DONTNEED
);
// free OS pages
#endif
}
return
s
;
}
...
...
@@ -166,7 +173,9 @@ class PosixRandomAccessFile: public RandomAccessFile {
if
(
!
use_os_buffer_
)
{
// we need to fadvise away the entire range of pages because
// we do not want readahead pages to be cached.
#ifndef __APPLE__
posix_fadvise
(
fd_
,
0
,
0
,
POSIX_FADV_DONTNEED
);
// free OS pages
#endif
}
return
s
;
}
...
...
@@ -201,6 +210,7 @@ class PosixRandomAccessFile: public RandomAccessFile {
#endif
virtual
void
Hint
(
AccessPattern
pattern
)
{
#ifndef __APPLE__
switch
(
pattern
)
{
case
NORMAL
:
posix_fadvise
(
fd_
,
0
,
0
,
POSIX_FADV_NORMAL
);
...
...
@@ -221,6 +231,7 @@ class PosixRandomAccessFile: public RandomAccessFile {
assert
(
false
);
break
;
}
#endif
}
};
...
...
utilities/ttl/db_ttl.cc
浏览文件 @
5f2c136c
...
...
@@ -16,8 +16,7 @@ DBWithTTL::DBWithTTL(const int32_t ttl,
const
std
::
string
&
dbname
,
Status
&
st
,
bool
read_only
)
:
StackableDB
(
nullptr
),
ttl_
(
ttl
)
{
:
StackableDB
(
nullptr
)
{
Options
options_to_open
=
options
;
if
(
options
.
compaction_filter
)
{
...
...
utilities/ttl/db_ttl.h
浏览文件 @
5f2c136c
...
...
@@ -111,7 +111,6 @@ class DBWithTTL : public StackableDB {
private:
DB
*
db_
;
int32_t
ttl_
;
unique_ptr
<
CompactionFilter
>
ttl_comp_filter_
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录