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

tools: use provided options instead of the default #4839

Closed
wants to merge 3 commits into from
Closed

tools: use provided options instead of the default #4839

wants to merge 3 commits into from

Conversation

huachaohuang
Copy link
Contributor

The current implementation hardcode the default options in different
places, which makes it impossible to support other environments (like
encrypted environment).

The current implementation hardcode the default options in different
places, which makes it impossible to support other environments (like
encrypted environment).
@siying
Copy link
Contributor

siying commented Jan 2, 2019

Great! Thank you for your contribution. Can you add coverage in unit tests?

@huachaohuang
Copy link
Contributor Author

Added some tests, PTAL.

Copy link
Contributor

@sagar0 sagar0 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. lgtm!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@sagar0 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@huachaohuang huachaohuang deleted the ldb-env branch January 4, 2019 02:07
DorianZheng pushed a commit to tikv/rocksdb that referenced this pull request Jan 4, 2019
* tools: use provided options instead of the default (facebook#4839)

Summary:
The current implementation hardcode the default options in different
places, which makes it impossible to support other environments (like
encrypted environment).
Pull Request resolved: facebook#4839

Differential Revision: D13573578

Pulled By: sagar0

fbshipit-source-id: 76b58b4b758902798d10ff2f52d9f39abff015e7

* Fix skip WAL for whole write_group when leader's callback fail (facebook#4838)

Summary:
The original implementation has two problems:

1. https://github.com/facebook/rocksdb/blob/f0dda35d7de1fd56e0b7c96376ca8aff2a6364fd/db/db_impl_write.cc#L478
https://github.com/facebook/rocksdb/blob/f0dda35d7de1fd56e0b7c96376ca8aff2a6364fd/db/write_thread.h#L231

If the callback status of leader of the write_group fails, then the whole write_group will not write to WAL, this may cause data loss.

2. https://github.com/facebook/rocksdb/blob/f0dda35d7de1fd56e0b7c96376ca8aff2a6364fd/db/write_thread.h#L130
The annotation says that Writer.status is the status of memtable inserter, but the original implementation use it for another case which is not consistent with the original design. Looks like we can still reuse Writer.status, but we should modify the annotation, so Writer.status is not only the status of memtable inserter.
Pull Request resolved: facebook#4838

Differential Revision: D13574070

Pulled By: yiwu-arbug

fbshipit-source-id: a2a2aefcfd329c4c6a91652bf090aaf1ce119c4b
yiwu-arbug pushed a commit to tikv/rocksdb that referenced this pull request Mar 20, 2019
Summary:
The current implementation hardcode the default options in different
places, which makes it impossible to support other environments (like
encrypted environment).
Pull Request resolved: facebook#4839

Differential Revision: D13573578

Pulled By: sagar0

fbshipit-source-id: 76b58b4b758902798d10ff2f52d9f39abff015e7
yiwu-arbug pushed a commit to tikv/rocksdb that referenced this pull request Mar 20, 2019
Summary:
The current implementation hardcode the default options in different
places, which makes it impossible to support other environments (like
encrypted environment).
Pull Request resolved: facebook#4839

Differential Revision: D13573578

Pulled By: sagar0

fbshipit-source-id: 76b58b4b758902798d10ff2f52d9f39abff015e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants