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
8dc64d85
Unverified
Commit
8dc64d85
authored
Jun 03, 2020
by
qupeng
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compaction filter: add bottommost level (#494)
Signed-off-by:
qupeng
<
qupeng@pingcap.com
>
parent
ca985cef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
c.cc
librocksdb_sys/crocksdb/c.cc
+5
-0
c.h
librocksdb_sys/crocksdb/crocksdb/c.h
+4
-0
lib.rs
librocksdb_sys/src/lib.rs
+3
-0
compaction_filter.rs
src/compaction_filter.rs
+5
-0
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
8dc64d85
...
...
@@ -3151,6 +3151,11 @@ unsigned char crocksdb_compactionfiltercontext_is_manual_compaction(
return
context
->
rep
.
is_manual_compaction
;
}
unsigned
char
crocksdb_compactionfiltercontext_is_bottommost_level
(
crocksdb_compactionfiltercontext_t
*
context
)
{
return
context
->
rep
.
is_bottommost_level
;
}
crocksdb_compactionfilterfactory_t
*
crocksdb_compactionfilterfactory_create
(
void
*
state
,
void
(
*
destructor
)(
void
*
),
crocksdb_compactionfilter_t
*
(
*
create_compaction_filter
)(
...
...
librocksdb_sys/crocksdb/crocksdb/c.h
View file @
8dc64d85
...
...
@@ -1248,6 +1248,10 @@ extern C_ROCKSDB_LIBRARY_API unsigned char
crocksdb_compactionfiltercontext_is_manual_compaction
(
crocksdb_compactionfiltercontext_t
*
context
);
extern
C_ROCKSDB_LIBRARY_API
unsigned
char
crocksdb_compactionfiltercontext_is_bottommost_level
(
crocksdb_compactionfiltercontext_t
*
context
);
/* Compaction Filter Factory */
extern
C_ROCKSDB_LIBRARY_API
crocksdb_compactionfilterfactory_t
*
...
...
librocksdb_sys/src/lib.rs
View file @
8dc64d85
...
...
@@ -1397,6 +1397,9 @@ extern "C" {
pub
fn
crocksdb_compactionfiltercontext_is_manual_compaction
(
context
:
*
const
DBCompactionFilterContext
,
)
->
bool
;
pub
fn
crocksdb_compactionfiltercontext_is_bottommost_level
(
context
:
*
const
DBCompactionFilterContext
,
)
->
bool
;
// Compaction filter factory
pub
fn
crocksdb_compactionfilterfactory_create
(
...
...
src/compaction_filter.rs
View file @
8dc64d85
...
...
@@ -127,6 +127,11 @@ impl CompactionFilterContext {
let
ctx
=
&
self
.
0
as
*
const
DBCompactionFilterContext
;
unsafe
{
crocksdb_ffi
::
crocksdb_compactionfiltercontext_is_manual_compaction
(
ctx
)
}
}
pub
fn
is_bottommost_level
(
&
self
)
->
bool
{
let
ctx
=
&
self
.
0
as
*
const
DBCompactionFilterContext
;
unsafe
{
crocksdb_ffi
::
crocksdb_compactionfiltercontext_is_bottommost_level
(
ctx
)
}
}
}
pub
trait
CompactionFilterFactory
{
...
...
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