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 #8058] Support for upgrading metadata in json to rocksdb (#8045) #8571

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

LetLetMe
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes #8058

Brief Description

How Did You Test This Change?

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 54.46009% with 97 lines in your changes missing coverage. Please review.

Project coverage is 47.27%. Comparing base (8859093) to head (0e29ea3).

Files Patch % Lines
...s/command/metadata/RocksDBConfigToJsonCommand.java 0.00% 30 Missing ⚠️
.../subscription/RocksDBSubscriptionGroupManager.java 68.35% 18 Missing and 7 partials ⚠️
...e/rocketmq/common/config/ConfigRocksDBStorage.java 0.00% 16 Missing ⚠️
...cketmq/broker/topic/RocksDBTopicConfigManager.java 71.42% 5 Missing and 5 partials ⚠️
...ache/rocketmq/broker/topic/TopicConfigManager.java 58.33% 5 Missing ⚠️
...g/apache/rocketmq/broker/RocksDBConfigManager.java 86.36% 2 Missing and 1 partial ⚠️
...ache/rocketmq/store/config/MessageStoreConfig.java 25.00% 3 Missing ⚠️
...mq/broker/offset/RocksDBConsumerOffsetManager.java 50.00% 1 Missing and 1 partial ⚠️
.../broker/subscription/SubscriptionGroupManager.java 80.00% 2 Missing ⚠️
.../apache/rocketmq/tools/command/MQAdminStartup.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8571      +/-   ##
=============================================
+ Coverage      47.18%   47.27%   +0.09%     
- Complexity     11409    11455      +46     
=============================================
  Files           1275     1275              
  Lines          89110    89242     +132     
  Branches       11468    11470       +2     
=============================================
+ Hits           42044    42192     +148     
+ Misses         41891    41856      -35     
- Partials        5175     5194      +19     

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

@@ -103,6 +123,20 @@ public void delete(final byte[] keyBytes) throws Exception {
this.configRocksDBStorage.delete(keyBytes);
}

public void updateKvDataVersion() throws Exception {
kvDataVersion.nextVersion();
this.configRocksDBStorage.updateKvDataVersion(JSON.toJSONString(kvDataVersion).getBytes(StandardCharsets.UTF_8));
Copy link
Member

Choose a reason for hiding this comment

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

JSON.toJSONBytes()


private boolean merge() {
if (!brokerController.getMessageStoreConfig().isTransferMetadataJsonToRocksdb()) {
log.info("The switch is off, no merge operation is needed.");
Copy link
Member

Choose a reason for hiding this comment

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

switch what?

Copy link
Contributor

@lollipopjin lollipopjin left a comment

Choose a reason for hiding this comment

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

LGTM

@lizhimins lizhimins changed the title [ISSUE #8058]Support for upgrading metadata in json to rocksdb (#8045) [ISSUE #8058] Support for upgrading metadata in json to rocksdb (#8045) Aug 23, 2024
@lizhimins lizhimins merged commit 2a938fb into apache:develop Aug 23, 2024
10 checks passed
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.

[Enhancement] Support for upgrading metadata in json to rocksdb
4 participants