Skip to content
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

Support custom compactionFilter and mergeOperator in rocksdb engine #75

Merged
merged 4 commits into from
Jan 16, 2019
Merged

Support custom compactionFilter and mergeOperator in rocksdb engine #75

merged 4 commits into from
Jan 16, 2019

Conversation

dangleptr
Copy link
Contributor

Patch for issue #64

@nebula-community-bot
Copy link
Member

Build succeeded.

KVOptions options;
options.local_ = HostAddr(0, 0);
options.dataPaths_ = std::move(paths);
KVStoreImpl* kv = reinterpret_cast<KVStoreImpl*>(KVStore::instance(std::move(options)));
Copy link
Contributor

@dutor dutor Jan 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI. This is not the case where reinterpret_cast should be used. In principle, dynamic_cast is the right choice. While if you know the exact type, you could use static_cast for the sake of performance.

The same to other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. static_cast will be better here.

KVStore* KVStore::instance(HostAddr local, std::vector<std::string> paths) {
auto* instance = new KVStoreImpl(local, std::move(paths));
KVStore* KVStore::instance(KVOptions options) {
auto* instance = new KVStoreImpl(options);
reinterpret_cast<KVStoreImpl*>(instance)->init();
Copy link
Contributor

@dutor dutor Jan 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instance IS of type KVStoreImpl*, right?

The same to other places.

@nebula-community-bot
Copy link
Member

Build failed.

1 similar comment
@nebula-community-bot
Copy link
Member

Build failed.

@nebula-community-bot
Copy link
Member

Build succeeded.

@nebula-community-bot
Copy link
Member

Build succeeded.

@dutor dutor merged commit 8f3a547 into vesoft-inc:master Jan 16, 2019
@dutor dutor deleted the compaction branch January 16, 2019 07:16
yixinglu added a commit to yixinglu/nebula that referenced this pull request Mar 21, 2022
…soft-inc#75)

This reverts commit b82b870.

Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants