pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Bug] TransactionCoordinatorClientImpl.start() hangs forever

Open syhily opened this issue 3 years ago • 8 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Version

Pulsar Java Client 2.10.0 Pulsar 2.10.0

Minimal reproduce step

Enable the transaction in Pulsar 2.10.0 docker. Create a PulsarClient. Then we may see the TransactionCoordinatorClientImpl.start() hangs and block the whole process.

What did you expect to see?

TransactionCoordinatorClientImpl.start() shouldn't wait for a long time.

What did you see instead?

TransactionCoordinatorClientImpl.start() block the execution and nothing has showed.

image

Anything else?

The jstack file. 195.log

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

syhily avatar Sep 28 '22 17:09 syhily

Another jstack file. 210.log

syhily avatar Sep 29 '22 04:09 syhily

@congbobo184 Can you help me find out the real cause.

syhily avatar Sep 29 '22 04:09 syhily

The detailed test log is here: mvn-1.log.

syhily avatar Sep 29 '22 08:09 syhily

Hi @syhily TransactionCoordinator loadBalance base on partition topic persistent://pulsar/system/transaction_coordinator_assign , so when starting transaction client, make sure that partition topic persistent://pulsar/system/transaction_coordinator_assign has been created. Otherwise persistent://pulsar/system/transaction_coordinator_assign will be automatically created as Non-partition topic, Pulsar Transaction dnot support Non-partition persistent://pulsar/system/transaction_coordinator_assign

congbobo184 avatar Sep 29 '22 14:09 congbobo184

I don't think the end user should care about these system topic design. This should be a system topic initialization issue.

syhily avatar Sep 29 '22 18:09 syhily

@syhily What users should care about is whether the transaction is fully enabled, rather than using it when it is not fully enabled, isn't it? If there are no other issues, I will close this issue

congbobo184 avatar Sep 30 '22 02:09 congbobo184

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

github-actions[bot] avatar Oct 31 '22 02:10 github-actions[bot]

@congbobo184 I think we should provide clear information while the transaction coordinator does not enable it on the broker side. It will help users to understand the problem quickly.

codelipenghui avatar Oct 31 '22 04:10 codelipenghui

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

github-actions[bot] avatar Dec 02 '22 02:12 github-actions[bot]

https://github.com/apache/pulsar/pull/18276 fix this problem, so close this issue

congbobo184 avatar Dec 02 '22 13:12 congbobo184