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
43393ed5
Commit
43393ed5
authored
Dec 14, 2018
by
zhangjinpeng1987
Committed by
Huachao Huang
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get env from DB (#252)
Signed-off-by:
zhangjinpeng1987
<
zhangjinpeng@pingcap.com
>
parent
6ec6c6db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
rocksdb.rs
src/rocksdb.rs
+5
-1
rocksdb_options.rs
src/rocksdb_options.rs
+4
-0
No files found.
src/rocksdb.rs
View file @
43393ed5
...
@@ -31,6 +31,7 @@ use std::io;
...
@@ -31,6 +31,7 @@ use std::io;
use
std
::
ops
::
Deref
;
use
std
::
ops
::
Deref
;
use
std
::
path
::{
Path
,
PathBuf
};
use
std
::
path
::{
Path
,
PathBuf
};
use
std
::
str
::
from_utf8
;
use
std
::
str
::
from_utf8
;
use
std
::
sync
::
Arc
;
use
std
::{
fs
,
ptr
,
slice
};
use
std
::{
fs
,
ptr
,
slice
};
use
table_properties
::
TablePropertiesCollection
;
use
table_properties
::
TablePropertiesCollection
;
...
@@ -602,6 +603,10 @@ impl DB {
...
@@ -602,6 +603,10 @@ impl DB {
Ok
(
cfs
)
Ok
(
cfs
)
}
}
pub
fn
env
(
&
self
)
->
Option
<
Arc
<
Env
>>
{
self
.opts
.env
()
}
pub
fn
pause_bg_work
(
&
self
)
{
pub
fn
pause_bg_work
(
&
self
)
{
unsafe
{
unsafe
{
crocksdb_ffi
::
crocksdb_pause_bg_work
(
self
.inner
);
crocksdb_ffi
::
crocksdb_pause_bg_work
(
self
.inner
);
...
@@ -2262,7 +2267,6 @@ mod test {
...
@@ -2262,7 +2267,6 @@ mod test {
use
std
::
path
::
Path
;
use
std
::
path
::
Path
;
use
std
::
str
;
use
std
::
str
;
use
std
::
string
::
String
;
use
std
::
string
::
String
;
use
std
::
sync
::
*
;
use
std
::
thread
;
use
std
::
thread
;
use
tempdir
::
TempDir
;
use
tempdir
::
TempDir
;
...
...
src/rocksdb_options.rs
View file @
43393ed5
...
@@ -589,6 +589,10 @@ impl DBOptions {
...
@@ -589,6 +589,10 @@ impl DBOptions {
DBOptions
::
default
()
DBOptions
::
default
()
}
}
pub
fn
env
(
&
self
)
->
Option
<
Arc
<
Env
>>
{
self
.env
.clone
()
}
pub
unsafe
fn
from_raw
(
inner
:
*
mut
Options
)
->
DBOptions
{
pub
unsafe
fn
from_raw
(
inner
:
*
mut
Options
)
->
DBOptions
{
DBOptions
{
DBOptions
{
inner
:
inner
,
inner
:
inner
,
...
...
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