-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
type/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug
Description
Search before reporting
- 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.
User environment
Pulsar Version = 4.0.3
OS = Linux
Java Version = 21
Client Library Version = 4.0.3 (Pulsar-Admin)
Client OS = Darwin (Mac)
Client Java Version = 21
Issue Description
I have a function to create topics and apply policies on that topic.
admin.topicPolicies().setInactiveTopicPolicies(pulsarTopic, policies.inactive_topic_policies);
admin.topics().setReplicationClusters(pulsarTopic, List.of("cluster-a", "cluster-b"));
admin.topicPolicies().setSubscriptionTypesEnabledAsync(pulsarTopic, Set.of(SubscriptionType.Shared));
admin.topics().updateProperties(pulsarTopic, policies.properties);However, after applying these, when I verify the results I get mismatching results:
- replication clusters is null (if I do with "applied"=true, I only get 1 cluster name)
- subscriptionTypesEnabled = [].
If I introduce a 1 second delay between each of the commands using Thread.sleep(1000), then I don't get these errors.
Also the following order of commands works as well :
admin.topics().setReplicationClusters(pulsarTopic, List.of("cluster-a", "cluster-b"));
admin.topicPolicies().setInactiveTopicPolicies(pulsarTopic, policies.inactive_topic_policies);
admin.topics().updateProperties(pulsarTopic, policies.properties);
admin.topicPolicies().setSubscriptionTypesEnabledAsync(pulsarTopic, Set.of(SubscriptionType.Shared));I believe this might be a result of Async policy application on the broker.
Error messages
No error messages are observed. Each POST call succeeds with a 204.
Reproducing the issue
You can run the two method call orderings and verify the results.
Additional information
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
Metadata
Metadata
Assignees
Labels
type/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug