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

[fix] [client] Do no retrying for error subscription not found when disabled allowAutoSubscriptionCreation #22078

Merged

Conversation

zifengmo
Copy link
Contributor

@zifengmo zifengmo commented Feb 20, 2024

Fixes #21839

Motivation

In scenarios where subscriptions are made via WebSockets and are proxied through a proxy, addressing the issue of non-existent subscriptions causing consumer clients to continuously retry and not being restricted by the number of subscription consumers, can result in excessive consumption of CPU and memory resources by the proxy.

Modifications

When the subscription does not exist and automatic creation is not permitted, no retries are attempted.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

Copy link

@zifengmo Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

Copy link
Contributor

@Technoboy- Technoboy- left a comment

Choose a reason for hiding this comment

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

Please add a test for this

@dao-jun dao-jun added the doc-not-needed Your PR changes do not impact docs label Feb 20, 2024
@poorbarcode poorbarcode added this to the 3.3.0 milestone Feb 24, 2024
@poorbarcode poorbarcode changed the title no retrying when subscription not found [fix] [client] Do no retrying for error subscription not found when disabled allowAutoSubscriptionCreation Feb 24, 2024
@Technoboy- Technoboy- merged commit bbf6ddf into apache:branch-3.0 Feb 26, 2024
39 of 44 checks passed
@Technoboy-
Copy link
Contributor

Ah, @zifengmo Could you push a new patch for the master branch ?

@poorbarcode
Copy link
Contributor

Ah, @zifengmo Could you push a new patch for the master branch ?

+1

Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Feb 29, 2024
gaoran10 pushed a commit to gaoran10/pulsar that referenced this pull request Mar 4, 2024
…isabled allowAutoSubscriptionCreation (apache#22078)

(cherry picked from commit bbf6ddf)
gaoran10 pushed a commit that referenced this pull request Mar 4, 2024
…isabled allowAutoSubscriptionCreation (#22078)

(cherry picked from commit bbf6ddf)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 4, 2024
…isabled allowAutoSubscriptionCreation (apache#22078)

(cherry picked from commit bbf6ddf)
(cherry picked from commit 7eec36e)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
…isabled allowAutoSubscriptionCreation (apache#22078)

(cherry picked from commit bbf6ddf)
(cherry picked from commit 7eec36e)
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 ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants