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

[ISSUE #7064] [RIP-66-1] Support KV(RocksDB) Storage for Metadata #7092

Merged
merged 33 commits into from
Aug 4, 2023

Conversation

fujian-zfj
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes #7064

Brief Description

This proposal mainly optimizes and solves the existing perfermance problems in the million-topic scenario :

  1. Metadata like topic, subscription, consumerOffset implement kv storage

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2023

Codecov Report

Attention: Patch coverage is 21.78344% with 614 lines in your changes missing coverage. Please review.

Project coverage is 42.54%. Comparing base (d429bd7) to head (26eec8f).
Report is 432 commits behind head on develop.

Files with missing lines Patch % Lines
...rocketmq/common/config/AbstractRocksDBStorage.java 0.00% 305 Missing ⚠️
...e/rocketmq/common/config/ConfigRocksDBStorage.java 0.00% 128 Missing ⚠️
...e/rocketmq/common/config/RocksDBConfigManager.java 0.00% 47 Missing ⚠️
...broker/offset/RocksDBLmqConsumerOffsetManager.java 0.00% 35 Missing ⚠️
.../subscription/RocksDBSubscriptionGroupManager.java 59.52% 15 Missing and 2 partials ⚠️
...tmq/broker/topic/RocksDBLmqTopicConfigManager.java 0.00% 13 Missing ⚠️
...ache/rocketmq/store/config/MessageStoreConfig.java 29.41% 12 Missing ⚠️
...bscription/RocksDBLmqSubscriptionGroupManager.java 0.00% 11 Missing ⚠️
...a/org/apache/rocketmq/broker/BrokerController.java 41.17% 3 Missing and 7 partials ⚠️
...ache/rocketmq/broker/topic/TopicConfigManager.java 78.72% 10 Missing ⚠️
... and 5 more
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #7092      +/-   ##
=============================================
- Coverage      42.73%   42.54%   -0.19%     
- Complexity      9295     9364      +69     
=============================================
  Files           1138     1150      +12     
  Lines          81254    81975     +721     
  Branches       10637    10688      +51     
=============================================
+ Hits           34721    34876     +155     
- Misses         42190    42752     +562     
- Partials        4343     4347       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +65 to +67
protected void removeConsumerOffset(String topicAtGroup) {

}
Copy link
Contributor

Choose a reason for hiding this comment

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

When was the method called?

Copy link
Contributor Author

@fujian-zfj fujian-zfj Jul 30, 2023

Choose a reason for hiding this comment

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

This interface is mainly to let RocksDBConsumeOffsetManager to override and delete the data in rocksdb, you can see the overridden method in RocksDBConsumeOffsetManager.

* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.rocketmq.client.consumer.store;
Copy link
Contributor

Choose a reason for hiding this comment

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

Putting this class in the client module is a bit strange

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I found OffsetSerializeWrapper under the client moudle, so I put RocksDBOffsetSerializeWrapper in this directory as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

OffsetSerializeWrapper is used in client module, RocksDBOffsetSerializeWrapper is used in broker module instead of client module, so I think this is not appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@@ -50,7 +50,7 @@ public static void main(String[] args) throws MQClientException {
* </pre>
*/
// Uncomment the following line while debugging, namesrvAddr should be set to your local address
// consumer.setNamesrvAddr(DEFAULT_NAMESRVADDR);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better not to modify this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to modify this, please also modify the comments above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@lizhanhui
Copy link
Contributor

@fujian-zfj Fixed bazel build scripts for you

@fujian-zfj
Copy link
Contributor Author

@fujian-zfj Fixed bazel build scripts for you

OK,thank you

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

Successfully merging this pull request may close these issues.

[RIP-66] Support KV(Rocksdb) Storage
4 participants