Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
82e918a7
Unverified
Commit
82e918a7
authored
Mar 11, 2020
by
Wallace
Committed by
GitHub
Mar 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add merge operator config (#446)
Signed-off-by:
Little-Wallace
<
bupt2013211450@gmail.com
>
parent
f6c5af65
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
0 deletions
+26
-0
c.cc
librocksdb_sys/crocksdb/c.cc
+9
-0
c.h
librocksdb_sys/crocksdb/crocksdb/c.h
+5
-0
lib.rs
librocksdb_sys/src/lib.rs
+2
-0
rocksdb_options.rs
src/rocksdb_options.rs
+4
-0
titan.rs
src/titan.rs
+6
-0
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
82e918a7
...
...
@@ -2621,6 +2621,10 @@ void crocksdb_options_set_enable_multi_batch_write(crocksdb_options_t *opt,
opt
->
rep
.
enable_multi_thread_write
=
v
;
}
unsigned
char
crocksdb_options_is_enable_multi_batch_write
(
crocksdb_options_t
*
opt
)
{
return
opt
->
rep
.
enable_multi_thread_write
;
}
void
crocksdb_options_set_unordered_write
(
crocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
unordered_write
=
v
;
...
...
@@ -5279,6 +5283,11 @@ void ctitandb_options_set_blob_file_compression(ctitandb_options_t* opts,
opts
->
rep
.
blob_file_compression
=
static_cast
<
CompressionType
>
(
type
);
}
void
ctitandb_options_set_gc_merge_rewrite
(
ctitandb_options_t
*
opts
,
unsigned
char
enable
)
{
opts
->
rep
.
gc_merge_rewrite
=
enable
;
}
void
ctitandb_decode_blob_index
(
const
char
*
value
,
size_t
value_size
,
ctitandb_blob_index_t
*
index
,
char
**
errptr
)
{
Slice
v
(
value
,
value_size
);
...
...
librocksdb_sys/crocksdb/crocksdb/c.h
View file @
82e918a7
...
...
@@ -1057,6 +1057,8 @@ crocksdb_options_set_enable_pipelined_write(crocksdb_options_t *, unsigned char)
extern
C_ROCKSDB_LIBRARY_API
void
crocksdb_options_set_enable_multi_batch_write
(
crocksdb_options_t
*
opt
,
unsigned
char
v
);
extern
C_ROCKSDB_LIBRARY_API
unsigned
char
crocksdb_options_is_enable_multi_batch_write
(
crocksdb_options_t
*
opt
);
extern
C_ROCKSDB_LIBRARY_API
void
crocksdb_options_set_unordered_write
(
crocksdb_options_t
*
,
unsigned
char
);
extern
C_ROCKSDB_LIBRARY_API
void
...
...
@@ -2103,6 +2105,9 @@ extern C_ROCKSDB_LIBRARY_API void ctitandb_options_set_min_blob_size(
extern
C_ROCKSDB_LIBRARY_API
int
ctitandb_options_blob_file_compression
(
ctitandb_options_t
*
);
extern
C_ROCKSDB_LIBRARY_API
void
ctitandb_options_set_gc_merge_rewrite
(
ctitandb_options_t
*
,
unsigned
char
);
extern
C_ROCKSDB_LIBRARY_API
void
ctitandb_options_set_blob_file_compression
(
ctitandb_options_t
*
,
int
type
);
...
...
librocksdb_sys/src/lib.rs
View file @
82e918a7
...
...
@@ -574,6 +574,7 @@ extern "C" {
pub
fn
crocksdb_options_set_bytes_per_sync
(
options
:
*
mut
Options
,
bytes
:
u64
);
pub
fn
crocksdb_options_set_enable_pipelined_write
(
options
:
*
mut
Options
,
v
:
bool
);
pub
fn
crocksdb_options_set_enable_multi_batch_write
(
options
:
*
mut
Options
,
v
:
bool
);
pub
fn
crocksdb_options_is_enable_multi_batch_write
(
options
:
*
mut
Options
)
->
bool
;
pub
fn
crocksdb_options_set_unordered_write
(
options
:
*
mut
Options
,
v
:
bool
);
pub
fn
crocksdb_options_set_allow_concurrent_memtable_write
(
options
:
*
mut
Options
,
v
:
bool
);
pub
fn
crocksdb_options_set_manual_wal_flush
(
options
:
*
mut
Options
,
v
:
bool
);
...
...
@@ -2072,6 +2073,7 @@ extern "C" {
pub
fn
ctitandb_options_set_min_blob_size
(
opts
:
*
mut
DBTitanDBOptions
,
size
:
u64
);
pub
fn
ctitandb_options_blob_file_compression
(
opts
:
*
mut
DBTitanDBOptions
)
->
DBCompressionType
;
pub
fn
ctitandb_options_set_gc_merge_rewrite
(
opts
:
*
mut
DBTitanDBOptions
,
enable
:
bool
);
pub
fn
ctitandb_options_set_blob_file_compression
(
opts
:
*
mut
DBTitanDBOptions
,
t
:
DBCompressionType
,
...
...
src/rocksdb_options.rs
View file @
82e918a7
...
...
@@ -1037,6 +1037,10 @@ impl DBOptions {
}
}
pub
fn
is_enable_multi_batch_write
(
&
self
)
->
bool
{
unsafe
{
crocksdb_ffi
::
crocksdb_options_is_enable_multi_batch_write
(
self
.inner
)
}
}
pub
fn
enable_unordered_write
(
&
self
,
v
:
bool
)
{
unsafe
{
crocksdb_ffi
::
crocksdb_options_set_unordered_write
(
self
.inner
,
v
);
...
...
src/titan.rs
View file @
82e918a7
...
...
@@ -149,6 +149,12 @@ impl TitanDBOptions {
crocksdb_ffi
::
ctitandb_options_set_blob_run_mode
(
self
.inner
,
t
);
}
}
pub
fn
set_gc_merge_rewrite
(
&
mut
self
,
enable
:
bool
)
{
unsafe
{
crocksdb_ffi
::
ctitandb_options_set_gc_merge_rewrite
(
self
.inner
,
enable
);
}
}
}
impl
Drop
for
TitanDBOptions
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment