Skip to content

Conversation

@zymap
Copy link
Member

@zymap zymap commented Oct 12, 2022


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.

---
*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.
@zymap zymap added this to the 4.16.0 milestone Oct 12, 2022
@zymap zymap self-assigned this Oct 12, 2022
@zymap
Copy link
Member Author

zymap commented Oct 12, 2022

I am trying to add a test to make sure it uses the right configuration.

Copy link
Contributor

@eolivelli eolivelli left a 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

@zymap
Copy link
Member Author

zymap commented Oct 13, 2022

@eolivelli Added tests and logs. PTAL

Copy link
Member

@StevenLuMT StevenLuMT left a 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?

@zymap
Copy link
Member Author

zymap commented Oct 13, 2022

@StevenLuMT We were using bk_server.conf to configure the rocksDB before, this change will make the existing configuration in bk_server.conf invalid.
Please see the discussion in the mailing list: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt

@StevenLuMT
Copy link
Member

StevenLuMT commented Oct 13, 2022

@StevenLuMT We were using bk_server.conf to configure the rocksDB before, this change will make the existing configuration in bk_server.conf invalid. Please see the discussion in the mailing list: https://lists.apache.org/thread/drh4p5prxbcs8gszhxnd1xsv0g48vvbt

have a look this mail reply, I think the implementation of the compatible scheme can have more @zymap @eolivelli
https://lists.apache.org/thread/xxtx9nsz07rywfbgw6rp15ljh6sw5jyw
image

@zymap
Copy link
Member Author

zymap commented Oct 13, 2022

have a look this mail reply, I think the implementation of the compatible scheme can have more

@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.

@zymap
Copy link
Member Author

zymap commented Oct 14, 2022

@eolivelli @StevenLuMT please take another look when you have time. Thanks

@zymap zymap requested review from StevenLuMT and eolivelli October 14, 2022 02:00
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nicoloboschi nicoloboschi left a 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!

Copy link
Member

@StevenLuMT StevenLuMT left a 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

@nicoloboschi nicoloboschi merged commit e313f60 into apache:master Oct 17, 2022
@zymap
Copy link
Member Author

zymap commented Oct 17, 2022

Thank you, guys!

nicoloboschi pushed a commit that referenced this pull request Oct 17, 2022
* 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)
nicoloboschi pushed a commit that referenced this pull request Oct 17, 2022
* 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)
zymap added a commit to zymap/bookkeeper that referenced this pull request Oct 17, 2022
---

*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
Copy link
Contributor

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?

Copy link
Member Author

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) {
Copy link
Contributor

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?

Copy link
Member Author

@zymap zymap Oct 17, 2022

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.

@hangc0276
Copy link
Contributor

In BookKeeper and Pulsar's conf folder, it already has default RocksDB configuration files. In this Pr, the loading order is RocksDB Configuration file > conf/bk_server.conf, which means it will still load the RocksDB configuration file by default and will cause a compatible issue in the BookKeeper version upgrade.

@zymap
Copy link
Member Author

zymap commented Oct 17, 2022

@hangc0276 We rename the configuration file in this PR #3540

zymap added a commit that referenced this pull request Oct 24, 2022
---

*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.
zymap added a commit that referenced this pull request Nov 3, 2022
---

*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)
dlg99 pushed a commit to datastax/bookkeeper that referenced this pull request Jun 28, 2024
…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)
dlg99 pushed a commit to datastax/bookkeeper that referenced this pull request Jul 2, 2024
…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)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
…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
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
---

*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.
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.

6 participants