apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.17k stars 3.57k forks source link

[Bug] PatternMultiTopicsConsumerImpl cannot run timer to update topic list with HashedWheelTimer #21198

Open lionMonkey opened 1 year ago

lionMonkey commented 1 year ago

Search before asking

Version

pulsarClient:

org.apache.pulsar pulsar-client-all 2.10.2

Minimal reproduce step

Reproduce need a Long time!So I offer some content what i see。 PatternMultiTopicsConsumerImpl recheckPatternTimeout is 60s; I can see patternMultiTopicsConsumerImpl consumer named iot-store by arthas [arthas@1]$ ognl -c 255316f2 -x 1 "@com.*****.utils.SpringUtils@getBean('initConsumers').consumers" @ArrayList[ @PatternMultiTopicsConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='PulsarPropertyConsumerImplShared0', topic='MultiTopicsConsumer-6f265'}], @ConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='ProductEventConsumerShared0', topic='persistent://t7011854583792645/iot_S1894cf4ecaf/v1-business-iot-product'}], @ConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='DeviceEventConsumerShared0', topic='persistent://t7011854583792645/iot_S1894cf4ecaf/v1-business-iot-device'}], @PatternMultiTopicsConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='PulsarEventConsumerImplShared0', topic='MultiTopicsConsumer-3869d'}], @PatternMultiTopicsConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='PulsarServiceUpConsumerImplShared0', topic='MultiTopicsConsumer-f375b'}], @PatternMultiTopicsConsumerImpl[ConsumerBase{subscription='iot-store', consumerName='PulsarServiceDownConsumerImplShared0', topic='MultiTopicsConsumer-88e4c'}], ]

But HashedWheelTimer wheel don't have it,Maybe this method is error to watch timing work 。But PatternMultiTopicsConsumerImpl RecheckPatternTimeout timing work must not exec;

[arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl [arthas@1]$ ognl -c 255316f2 -x 4 "@com.das.libcore.web.utils.SpringUtils@getBean('pulsarClient').timer.wheel" | grep task=@PatternMultiTopicsConsumerImpl

What did you expect to see?

PatternMultiTopicsConsumerImpl recheckPatternTimeout can exec Regularly;

What did you see instead?

PatternMultiTopicsConsumerImpl recheckPatternTimeout can’t exec Regularly;

Anything else?

No response

Are you willing to submit a PR?

github-actions[bot] commented 11 months ago

The issue had no activity for 30 days, mark with Stale label.