Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

to #9692 Support async delete for topics#9697

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
fuyou001 wants to merge1 commit intodevelop
base:develop
Choose a base branch
Loading
fromenh-9692-1

Conversation

@fuyou001
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes#9692

Brief Description

Support asynchronous deletion of topics to improve performance

How Did You Test This Change?

Signed-off-by: fuchong <yubao.fyb@alibaba-inc.com>Signed-off-by: fuchong <yubao.fyb@alibaba-inc.com>Signed-off-by: fuchong <yubao.fyb@alibaba-inc.com>
@ankit-kumarz
Copy link

The main cause of failure in job 50213573092 is repeated errors related to decoding the custom field , specifically:

org.apache.rocketmq.remoting.exception.RemotingCommandException: the custom field <defaultTopic> is nullat org.apache.rocketmq.remoting.protocol.RemotingCommand.decodeCommandCustomHeaderDirectly(RemotingCommand.java:307)

This error occurs multiple times during topic creation and update operations, indicating that the fielddefaultTopic is expected but not set or is being passed as null in requests to the broker.

Solution:

  1. EnsuredefaultTopic Is Set in Requests**
  • Check all places where requests are made to create or update topics, especially in tests and any client code.
  • Make sure the request header includes a non-null value fordefaultTopic where it's required.

Example Fix in Java:
If you are constructing a request using a command header, ensure you setdefaultTopic:

java:-
YourCustomHeader header = new YourCustomHeader();
header.setDefaultTopic("YOUR_TOPIC_NAME"); // Set to an appropriate topic name
remotingCommand.setCustomHeader(header);

2. Add Null Checks in Broker/Processor Code- In `RemotingCommand.decodeCommandCustomHeaderDirectly`, add a null check and handle missing fields more gracefully, possibly with a default value or clear error message.Example Defensive Code:```javaif (customHeader.getDefaultTopic() == null) {    throw new RemotingCommandException("The custom field <defaultTopic> must not be null");}

But ideally, the fix should be at the source (where the request is constructed), not just error handling.

  1. Review Test Definitions**

Several log entries suggest the issue may be in the integration tests for topic creation. Check test files for topic creation requests, and verify thatdefaultTopic is set.

Additional Error: NullPointerException insetCommitLogReadaheadMode

java.lang.NullPointerException: null
at org.apache.rocketmq.broker.processor.AdminBrokerProcessor.setCommitLogReadaheadMode(AdminBrokerProcessor.java:1050)

Solution: Add null checks for the objects used insidesetCommitLogReadaheadMode. Ensure all required arguments are initialized before use.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Enhancement] Support async delete for topics

2 participants

@fuyou001@ankit-kumarz

[8]ページ先頭

©2009-2025 Movatter.jp