-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add backoff for setting for getting topic policies. #11487
Add backoff for setting for getting topic policies. #11487
Conversation
Currently, if we start a new broker which does not owned any namepsaces bundles. Then when use the pulsar-admin to setting or getting topic policies, we will get `topic policies have not been initialized yet` error log and the admin operation will get failed. The root cause is we are failed immediately without any retry while the topic polices cache have not init yet. So the PR to introduce the backoff for setting or getting the topic policy if encounter the topic policies cache not init exception
* @param topicName | ||
* @return | ||
*/ | ||
boolean cacheIsInitialized(TopicName topicName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface mark as Deprecated instead of directly delete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method does not been used by the client-side, after checking the reference to this method, all of them are from the test class, I think we can delete it directly since we are not exposing the interface for users to implement their own topic policies service implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Good job! |
Currently, if we start a new broker which does not owned any namepsaces bundles. Then when use the pulsar-admin to setting or getting topic policies, we will get `topic policies have not been initialized yet` error log and the admin operation will get failed. The root cause is we are failed immediately without any retry while the topic polices cache have not init yet. So the PR to introduce the backoff for setting or getting the topic policy if encounter the topic policies cache not init exception Remove the cache init check for the tests. (cherry picked from commit bebaadf)
* Fix some topic policy operation without backoff Related to #11487
* Fix some topic policy operation without backoff Related to apache#11487
### Motivation Currently, if we start a new broker which does not owned any namepsaces bundles. Then when use the pulsar-admin to setting or getting topic policies, we will get `topic policies have not been initialized yet` error log and the admin operation will get failed. The root cause is we are failed immediately without any retry while the topic polices cache have not init yet. So the PR to introduce the backoff for setting or getting the topic policy if encounter the topic policies cache not init exception ### Verifying this change Remove the cache init check for the tests.
* Fix some topic policy operation without backoff Related to apache#11487
Motivation
Currently, if we start a new broker which does not owned any namepsaces bundles.
Then when use the pulsar-admin to setting or getting topic policies, we will get
topic policies have not been initialized yet
error log and the admin operation willget failed.
The root cause is we are failed immediately without any retry while the topic polices
cache have not init yet. So the PR to introduce the backoff for setting or getting
the topic policy if encounter the topic policies cache not init exception
Verifying this change
Remove the cache init check for the tests.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changes