Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-15996: [bug][java-client] Client creation fails with enableTransactions=true if topic transaction_coordinator_assign has not been created yet #4354

Open
sijie opened this issue Jun 9, 2022 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Jun 9, 2022

Original Issue: apache#15996


Describe the bug
Client creation fails with enableTransactions=true if topic transaction_coordinator_assign has not been created yet

Caused by: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.client.api.PulsarClientException$BrokerMetadataException: {"errorMsg":"Namespace not found","reqId":3642126209754600375, "remote":"localhost/127.0.0.1:54629", "local":"/127.0.0.1:54823"}
	at app//org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:131)
	at app//org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:129)
	at app//org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.start(TransactionCoordinatorClientImpl.java:70)
	at app//org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:204)
	... 47 more

I found this while enabling transactions on Pulsar standalone but it could apply also in a real cluster.

To Reproduce

  • Start Pulsar standalone with transactions enabled (see this pull for reference
  • Create a client suddenly after Pulsar is ready (but the topic doesn't exist yet)

Expected behavior
The client should work out of the box without throwing exceptions.
Perhaps an infinite backoff retry with severe logging could be a good solution.

Additional context
All the Pulsar versions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant