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
6ed627f2
Commit
6ed627f2
authored
Jul 14, 2017
by
Cholerae Hu
Committed by
GitHub
Jul 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ingestoption: fix (#98)
parent
e28c5fe9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
rocksdb_options.rs
src/rocksdb_options.rs
+4
-8
test_ingest_external_file.rs
tests/test_ingest_external_file.rs
+1
-1
No files found.
src/rocksdb_options.rs
View file @
6ed627f2
...
...
@@ -985,41 +985,37 @@ impl IngestExternalFileOptions {
/// If set to false, an ingested file keys could appear in existing snapshots
/// that where created before the file was ingested.
pub
fn
snapshot_consistent
(
self
,
whether_consistent
:
bool
)
->
IngestExternalFileOptions
{
pub
fn
snapshot_consistent
(
&
mut
self
,
whether_consistent
:
bool
)
{
unsafe
{
crocksdb_ffi
::
crocksdb_ingestexternalfileoptions_set_snapshot_consistency
(
self
.inner
,
whether_consistent
);
}
self
}
/// If set to false, DB::ingest_external_file() will fail if the file key range
/// overlaps with existing keys or tombstones in the DB.
pub
fn
allow_global_seqno
(
self
,
whether_allow
:
bool
)
->
IngestExternalFileOptions
{
pub
fn
allow_global_seqno
(
&
mut
self
,
whether_allow
:
bool
)
{
unsafe
{
crocksdb_ffi
::
crocksdb_ingestexternalfileoptions_set_allow_global_seqno
(
self
.inner
,
whether_allow
);
}
self
}
/// If set to false and the file key range overlaps with the memtable key range
/// (memtable flush required), DB::ingest_external_file will fail.
pub
fn
allow_blocking_flush
(
self
,
whether_allow
:
bool
)
->
IngestExternalFileOptions
{
pub
fn
allow_blocking_flush
(
&
mut
self
,
whether_allow
:
bool
)
{
unsafe
{
crocksdb_ffi
::
crocksdb_ingestexternalfileoptions_set_allow_blocking_flush
(
self
.inner
,
whether_allow
);
}
self
}
/// Set to true to move the files instead of copying them.
pub
fn
move_files
(
self
,
whether_move
:
bool
)
->
IngestExternalFileOptions
{
pub
fn
move_files
(
&
mut
self
,
whether_move
:
bool
)
{
unsafe
{
crocksdb_ffi
::
crocksdb_ingestexternalfileoptions_set_move_files
(
self
.inner
,
whether_move
);
}
self
}
}
...
...
tests/test_ingest_external_file.rs
View file @
6ed627f2
...
...
@@ -76,7 +76,7 @@ fn test_ingest_external_file() {
None
,
test_sstfile_str
,
&
[(
b
"k2"
,
b
"v5"
),
(
b
"k3"
,
b
"v6"
)]);
ingest_opt
=
ingest_opt
.move_files
(
true
);
ingest_opt
.move_files
(
true
);
db
.ingest_external_file_cf
(
handle
,
&
ingest_opt
,
&
[
test_sstfile_str
])
.unwrap
();
...
...
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