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][java-client] Client creation fails with enableTransactions=true if topic transaction_coordinator_assign has not been created yet #15996

Open
nicoloboschi opened this issue Jun 9, 2022 · 1 comment
Labels
area/transaction Stale type/bug The PR fixed a bug or issue reported a bug

Comments

@nicoloboschi
Copy link
Contributor

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

@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/transaction Stale type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

2 participants