-
Notifications
You must be signed in to change notification settings - Fork 963
Make the rocksDB configuration compatible with previous versions #3523
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
Conversation
--- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing.
|
I am trying to add a test to make sure it uses the right configuration. |
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support this patch.
I left one comment.
also we need to add some tests
...er-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java
Show resolved
Hide resolved
...er-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java
Show resolved
Hide resolved
...er-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java
Show resolved
Hide resolved
|
@eolivelli Added tests and logs. PTAL |
StevenLuMT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question why It would make the existing configuration doesn't work?
which config key causes some performance issues for the user's existing environment?
|
@StevenLuMT We were using bk_server.conf to configure the rocksDB before, this change will make the existing configuration in bk_server.conf invalid. |
have a look this mail reply, I think the implementation of the compatible scheme can have more @zymap @eolivelli |
@StevenLuMT Could you please talk more about this? I think I just want to bring the original way back. Let it doesn't affect any user who is using the bk_server.conf or entry_location_rocksDB.conf. |
|
@eolivelli @StevenLuMT please take another look when you have time. Thanks |
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
nicoloboschi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and great catch!
StevenLuMT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the implementation of the compatible scheme can have more
https://lists.apache.org/thread/xxtx9nsz07rywfbgw6rp15ljh6sw5jyw
we can merge this first, and I will mention a pr later to make this thing better
|
Thank you, guys! |
* Make the rocksDB configuration compatible with previous versions --- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing. * Add tests and logs (cherry picked from commit e313f60)
* Make the rocksDB configuration compatible with previous versions --- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing. * Add tests and logs (cherry picked from commit e313f60)
--- *Motivation* Related PR: apache#3523 Mailing discussion: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt We introduce the new way to configure the RocksDB but we haven't mentioned it in the website and release-note. This PR add the document for the RocksDB configuration updates. And rename the RocksDB configuration files with the suffix `.default` to avoid loading them by default. *Modification* - Add the configuration changes in the 4.15.0 release notes. - Add how to configure the RocksDB with the new file in the website. - Rename the file with `.default` suffix to avoid loading it by default.
|
|
||
|
|
||
| import static com.google.common.base.Preconditions.checkState; | ||
| //CHECKSTYLE.OFF: IllegalImport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add the checkstyle off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkstyle doesn't allow we use this imports io.netty.util.internal.PlatformDependent.maxDirectMemory. We disabled it before https://github.com/apache/bookkeeper/pull/3056/files#diff-cbb728e9ff8fae16673eb48455d2eebc18d12ed8fec6a93266bb9363527dad97L25
| if (cache != null) { | ||
| cache.close(); | ||
| } | ||
| if (options != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this options field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just for testing. I need to get configurations from the option to test if it is loading the right configuration.
|
In BookKeeper and Pulsar's conf folder, it already has default RocksDB configuration files. In this Pr, the loading order is |
|
@hangc0276 We rename the configuration file in this PR #3540 |
--- *Motivation* Related PR: #3523 Mailing discussion: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt We introduce the new way to configure the RocksDB but we haven't mentioned it in the website and release-note. This PR add the document for the RocksDB configuration updates. And rename the RocksDB configuration files with the suffix `.default` to avoid loading them by default. *Modification* - Add the configuration changes in the 4.15.0 release notes. - Add how to configure the RocksDB with the new file in the website. - Rename the file with `.default` suffix to avoid loading it by default.
--- *Motivation* Related PR: #3523 Mailing discussion: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt We introduce the new way to configure the RocksDB but we haven't mentioned it in the website and release-note. This PR add the document for the RocksDB configuration updates. And rename the RocksDB configuration files with the suffix `.default` to avoid loading them by default. *Modification* - Add the configuration changes in the 4.15.0 release notes. - Add how to configure the RocksDB with the new file in the website. - Rename the file with `.default` suffix to avoid loading it by default. (cherry picked from commit 1966512)
…che#3523) * Make the rocksDB configuration compatible with previous versions --- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing. * Add tests and logs (cherry picked from commit e313f60)
…che#3523) * Make the rocksDB configuration compatible with previous versions --- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing. * Add tests and logs (cherry picked from commit e313f60)
…che#3523) * Make the rocksDB configuration compatible with previous versions --- *Motivation* In the PR 3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment. This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing. * Add tests and logs
--- *Motivation* Related PR: apache#3523 Mailing discussion: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt We introduce the new way to configure the RocksDB but we haven't mentioned it in the website and release-note. This PR add the document for the RocksDB configuration updates. And rename the RocksDB configuration files with the suffix `.default` to avoid loading them by default. *Modification* - Add the configuration changes in the 4.15.0 release notes. - Add how to configure the RocksDB with the new file in the website. - Rename the file with `.default` suffix to avoid loading it by default.

Motivation
In PR #3056, we introduced using rocksDB configuration file to configure it. But it is not compatible with the previous versions of bookkeeper. We used to use the bookie configuration file to configure it. It would make the existing configuration doesn't work. Which causes some performance issues for the user's existing environment.
This PR adds the old configuration back. The new way only works if the rocksDB configuration file is existing.