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

[Bug] [Non-persistent topic] Pulsar broker delete the whole subscription after trigger delete only one consumer from that subscription for the non-persistent topic #23993

Open
2 of 3 tasks
mrd09 opened this issue Feb 17, 2025 · 0 comments
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@mrd09
Copy link

mrd09 commented Feb 17, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

apachepulsar/pulsar-all:3.0.2
apachepulsar/pulsar-all:3.0.9

java pulsar client app 3.2.2 run in k8s

Minimal reproduce step

  • start app with 1 replicas in k8s, cover this logic:
  1. create non-persistent topic or use allowAutoTopicCreation: "true" and allowAutoTopicCreationType: "non-partitioned"
  2. create subscription Shared type
  3. create consumer in the sub
  • scale app to 2 replicas => there 2 consumer create:
# pulsarctl $TLS_OPTS topics stats non-persistent://public/Test/TestRequest
"subscriptions": {
    "TestRequest": {
     ....
      "type": "Shared",
      "consumers": [
        {
          "availablePermits": 1000,
          "unackedMessages": 0,
          "msgRateOut": 0,
          "msgThroughputOut": 0,
          "msgRateRedeliver": 0,
          "consumerName": "8420b7f1",
          "metadata": {}
        },
        {
          "availablePermits": 1000,
          "unackedMessages": 0,
          "msgRateOut": 0,
          "msgThroughputOut": 0,
          "msgRateRedeliver": 0,
          "consumerName": "dd825dce",
          "metadata": {}
        }
      ]
    }
  • scale down app to 1 replicas => from broker logs, the scale down replicas consumer is removed from subscription
  • then do recheck the broker non-persistent topic see that the subscription is gone as soon as the replica is scale down:
# pulsarctl $TLS_OPTS topics stats non-persistent://public/Test/TestRequest
  "subscriptions": {},

What did you expect to see?

I expected

  • the subscription still there
  • only one of the consumer in the subscription is removed from the non-persistent topic as 1 replicas from app is scale down

What did you see instead?

I see:

  • the subscription from the non-persistent topic is gone
  • so the left up running replicas falling into fail state when the sub and consumer is gone

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@mrd09 mrd09 added the type/bug The PR fixed a bug or issue reported a bug label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

1 participant