forked from rust-rocksdb/rust-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce boxing in callback structs #513
Labels
difficulty/medium
Medium task.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
sig/engine
SIG: Engine
Comments
yiwu-arbug
added
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
sig/engine
SIG: Engine
difficulty/easy
Easy task.
difficulty/medium
Medium task.
and removed
difficulty/easy
Easy task.
labels
Jun 21, 2020
tabokie
pushed a commit
that referenced
this issue
Sep 16, 2021
Close #513. Signed-off-by: yuqi1129 <yuqi4733@gmail.com>
Reopen this, #663 missed the following types:
|
JayiceZ
added a commit
to JayiceZ/rust-rocksdb
that referenced
this issue
Dec 11, 2021
close tikv#513 Signed-off-by: Jayice <1185430411@qq.com>
JayiceZ
added a commit
to JayiceZ/rust-rocksdb
that referenced
this issue
Dec 11, 2021
close tikv#513 Signed-off-by: Jayice <1185430411@qq.com>
JayiceZ
added a commit
to JayiceZ/rust-rocksdb
that referenced
this issue
Dec 11, 2021
close tikv#513 Signed-off-by: Jayice <1185430411@qq.com>
tabokie
pushed a commit
that referenced
this issue
Dec 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
difficulty/medium
Medium task.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
sig/engine
SIG: Engine
RocksDB expose several APIs to allow client code to inject custom logic, such as compaction filter and table properties collector. rust-rocksdb usually implement such APIs in the follow way.
Assume rocksdb expose such a struct for callback
rust-rocksdb usually provide the API in the following way:
Note here
ctx
is aBox<Box<dyn Callback>>
. The inner box is to hold the trait object. The outer box is needed since C code cannot hold the raw pointer ofBox<dyn Callback>
natively since the pointer is of 128-bits. However, the extra boxing can be reduced by using generic.The following APIs need to be updated:
The text was updated successfully, but these errors were encountered: