You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuz10 (via GitHub)" <gi...@apache.org> on 2024/05/13 15:02:20 UTC
[PR] [ISSUE #8129] support update topic reserved time for topic in tiered storage [rocketmq]
yuz10 opened a new pull request, #8130:
URL: https://github.com/apache/rocketmq/pull/8130
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
Fixes #8129
### Brief Description
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### How Did You Test This Change?
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] Support topic reserved time in tiered storage [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on code in PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#discussion_r1606282322
##########
broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:
##########
@@ -515,6 +519,33 @@ public void updateTopicConfig(final TopicConfig topicConfig) {
this.persist(topicConfig.getTopicName(), topicConfig);
}
+ private synchronized void updateTieredStoreTopicMetadata(final TopicConfig topicConfig, Map<String, String> newAttributes) {
+ if (!(brokerController.getMessageStore() instanceof TieredMessageStore)) {
+ if (newAttributes.get(TopicAttributes.TOPIC_RESERVE_TIME_ATTRIBUTE.getName()) != null) {
+ throw new IllegalArgumentException("Update topic reserveTime not supported");
Review Comment:
tiered storage feature is optional, should not throw exception here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] support update topic reserved time for topic in tiered storage [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#issuecomment-2109425234
There is a suggestion in https://github.com/apache/rocketmq/issues/8129
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] support update topic reserved time for topic in tiered storage [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#issuecomment-2108002238
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/8130?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `0%` with `108 lines` in your changes are missing coverage. Please review.
> Project coverage is 42.85%. Comparing base [(`159a603`)](https://app.codecov.io/gh/apache/rocketmq/commit/159a603219e363e5f991a0c85213f6dc13f0a9be?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`675abdf`)](https://app.codecov.io/gh/apache/rocketmq/pull/8130?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 1 commits behind head on develop.
| [Files](https://app.codecov.io/gh/apache/rocketmq/pull/8130?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...edstore/TieredStoreUpdateTopicMetadataCommand.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tools%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftools%2Fcommand%2Ftieredstore%2FTieredStoreUpdateTopicMetadataCommand.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2NvbW1hbmQvdGllcmVkc3RvcmUvVGllcmVkU3RvcmVVcGRhdGVUb3BpY01ldGFkYXRhQ29tbWFuZC5qYXZh) | 0.00% | [44 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ocketmq/broker/processor/AdminBrokerProcessor.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fbroker%2Fprocessor%2FAdminBrokerProcessor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0FkbWluQnJva2VyUHJvY2Vzc29yLmphdmE=) | 0.00% | [29 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...r/TieredStoreUpdateTopicMetadataRequestHeader.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=remoting%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fremoting%2Fprotocol%2Fheader%2FTieredStoreUpdateTopicMetadataRequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL2hlYWRlci9UaWVyZWRTdG9yZVVwZGF0ZVRvcGljTWV0YWRhdGFSZXF1ZXN0SGVhZGVyLmphdmE=) | 0.00% | [14 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...g/apache/rocketmq/client/impl/MQClientAPIImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Fimpl%2FMQClientAPIImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9NUUNsaWVudEFQSUltcGwuamF2YQ==) | 0.00% | [9 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...che/rocketmq/tieredstore/file/FlatMessageFile.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2Ffile%2FFlatMessageFile.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL2ZpbGUvRmxhdE1lc3NhZ2VGaWxlLmphdmE=) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...pache/rocketmq/tieredstore/file/FlatFileStore.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2Ffile%2FFlatFileStore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL2ZpbGUvRmxhdEZpbGVTdG9yZS5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...tieredstore/metrics/TieredStoreMetricsManager.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tieredstore%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftieredstore%2Fmetrics%2FTieredStoreMetricsManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dGllcmVkc3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3RpZXJlZHN0b3JlL21ldHJpY3MvVGllcmVkU3RvcmVNZXRyaWNzTWFuYWdlci5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...apache/rocketmq/tools/admin/DefaultMQAdminExt.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tools%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftools%2Fadmin%2FDefaultMQAdminExt.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2FkbWluL0RlZmF1bHRNUUFkbWluRXh0LmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...he/rocketmq/tools/admin/DefaultMQAdminExtImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tools%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftools%2Fadmin%2FDefaultMQAdminExtImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2FkbWluL0RlZmF1bHRNUUFkbWluRXh0SW1wbC5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../apache/rocketmq/tools/command/MQAdminStartup.java](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&filepath=tools%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Ftools%2Fcommand%2FMQAdminStartup.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2NvbW1hbmQvTVFBZG1pblN0YXJ0dXAuamF2YQ==) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8130?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #8130 +/- ##
=============================================
- Coverage 42.94% 42.85% -0.10%
+ Complexity 10387 10376 -11
=============================================
Files 1270 1272 +2
Lines 88694 88798 +104
Branches 11401 11409 +8
=============================================
- Hits 38092 38054 -38
- Misses 45914 46050 +136
- Partials 4688 4694 +6
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/8130?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] support update topic reserved time for topic in tiered storage [rocketmq]
Posted by "yuz10 (via GitHub)" <gi...@apache.org>.
yuz10 commented on PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#issuecomment-2111495742
> There is a suggestion in #8129
thanks for your suggestion, I will modify soon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] Support topic reserved time in tiered storage [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] Support topic reserved time in tiered storage [rocketmq]
Posted by "yuz10 (via GitHub)" <gi...@apache.org>.
yuz10 commented on code in PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#discussion_r1609135617
##########
broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:
##########
@@ -515,6 +519,33 @@ public void updateTopicConfig(final TopicConfig topicConfig) {
this.persist(topicConfig.getTopicName(), topicConfig);
}
+ private synchronized void updateTieredStoreTopicMetadata(final TopicConfig topicConfig, Map<String, String> newAttributes) {
+ if (!(brokerController.getMessageStore() instanceof TieredMessageStore)) {
+ if (newAttributes.get(TopicAttributes.TOPIC_RESERVE_TIME_ATTRIBUTE.getName()) != null) {
+ throw new IllegalArgumentException("Update topic reserveTime not supported");
Review Comment:
这个是参数检查,更新或创建topic会失败。关闭分级存储之后,只要不传入reserveTIme就不会报错
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #8129] Support topic reserved time in tiered storage [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on code in PR #8130:
URL: https://github.com/apache/rocketmq/pull/8130#discussion_r1606283729
##########
broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:
##########
@@ -515,6 +519,33 @@ public void updateTopicConfig(final TopicConfig topicConfig) {
this.persist(topicConfig.getTopicName(), topicConfig);
}
+ private synchronized void updateTieredStoreTopicMetadata(final TopicConfig topicConfig, Map<String, String> newAttributes) {
+ if (!(brokerController.getMessageStore() instanceof TieredMessageStore)) {
+ if (newAttributes.get(TopicAttributes.TOPIC_RESERVE_TIME_ATTRIBUTE.getName()) != null) {
+ throw new IllegalArgumentException("Update topic reserveTime not supported");
Review Comment:
如果没开启这个功能的时候更新了 topic config, 会抛异常?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org