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

Public ThreadMode trait #532

Closed
YjyJeff opened this issue Jun 17, 2021 · 5 comments
Closed

Public ThreadMode trait #532

YjyJeff opened this issue Jun 17, 2021 · 5 comments

Comments

@YjyJeff
Copy link

YjyJeff commented Jun 17, 2021

I want to write a function that accepts both DBWithThreadMode<MultiThreaded> and DBWithThreadMode<SingleThreaded> as parameter. However, because of ThreadMode trait is private, I can not do it. Any idea about how to achieve it? I think make the ThreadMode trait public can solve this problem.

@TsumiNa
Copy link

TsumiNa commented Jun 23, 2021

Exactly the same question.

@ghost
Copy link

ghost commented Jun 23, 2021

This would also help to reuse code that might sometimes need to operate on a snapshot. I'm using macros to duplicate the code because this trait isn't public.

@aleksuss
Copy link
Member

@ryoqun, could you add this request in PR #509 ?

@ryoqun
Copy link
Contributor

ryoqun commented Jun 29, 2021

sorry radio silence... I'll work on #509 and try to piggybuck this nice feedback there too, hopefully this weekend. :)

@ryoqun
Copy link
Contributor

ryoqun commented Jul 6, 2021

also, this is also done: https://github.com/rust-rocksdb/rust-rocksdb/pull/509/files#r664163946

hunterlxt pushed a commit to hunterlxt/rust-rocksdb that referenced this issue Jul 12, 2021
add `set_compression_options` for `ColumnFamilyOptions` so that we can set the `compression level` when generate sst files

Signed-off-by: glorv <glorvs@163.com>
@YjyJeff YjyJeff closed this as completed Aug 7, 2021
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

No branches or pull requests

4 participants