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

write_opt consumes WriteBatch #843

Open
cvijdea-bd opened this issue Dec 7, 2023 · 0 comments
Open

write_opt consumes WriteBatch #843

cvijdea-bd opened this issue Dec 7, 2023 · 0 comments

Comments

@cvijdea-bd
Copy link

Is there any reason why pub fn write_opt(&self, batch: WriteBatch, writeopts: &WriteOptions) takes WriteBatch by value instead of by reference? I could find no references to such a requirement (i.e. write batch becoming invalid after call to write) in the RocksDB documentation.

One use-case for keeping the WriteBatch would be when using opts.set_no_slowdown(true) combined with retries.

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

1 participant