Skip to content

[Broker] Fix call sync method in async rest api for internalDeletePartitionedTopic - #13805

Merged
codelipenghui merged 22 commits into
apache:masterfrom
mattisonchao:internalDeletePartitionedTopic_async_call_sync
Jan 26, 2022
Merged

[Broker] Fix call sync method in async rest api for internalDeletePartitionedTopic#13805
codelipenghui merged 22 commits into
apache:masterfrom
mattisonchao:internalDeletePartitionedTopic_async_call_sync

Conversation

@mattisonchao

Copy link
Copy Markdown
Member

Motivation

Avoid call sync method in async rest API for PersistentTopicsBase#internalDeletePartitionedTopic.

Modifications

  • Use async instead of sync method.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: ( no)
  • The schema: ( no )
  • The default values of configurations: ( no)
  • The wire protocol: ( no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • no-need-doc

@mattisonchao mattisonchao changed the title [Broker] Fix call sync method in async rest api for ``internalDeleteP… [Broker] Fix call sync method in async rest api for ``internalDeletePartitionedTopic Jan 18, 2022
@mattisonchao mattisonchao changed the title [Broker] Fix call sync method in async rest api for ``internalDeletePartitionedTopic [Broker] Fix call sync method in async rest api for internalDeletePartitionedTopic Jan 18, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jan 18, 2022
@mattisonchao

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@mattisonchao

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java Outdated
@mattisonchao

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java Outdated
Comment thread pulsar-common/src/main/java/org/apache/pulsar/common/util/FutureUtil.java Outdated
mattisonchao and others added 2 commits January 21, 2022 21:11
…l/PersistentTopicsBase.java

Co-authored-by: lipenghui <penghui@apache.org>
…reUtil.java

Co-authored-by: lipenghui <penghui@apache.org>
@mattisonchao

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@mattisonchao

Copy link
Copy Markdown
Member Author

@codelipenghui @Technoboy- PTAL :-)

@Technoboy- Technoboy- left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment on lines +170 to +173
if (ex instanceof CompletionException) {
return ex.getCause();
} else if (ex instanceof ExecutionException) {
return ex.getCause();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why cancel recursion?

@mattisonchao mattisonchao Jan 26, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants