Jason918 commented on code in PR #17035:
URL: https://github.com/apache/pulsar/pull/17035#discussion_r963315461
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2113,33 +2114,44 @@ private void handlePoliciesUpdates(NamespaceName
namespace) {
}
private void handleDynamicConfigurationUpdates() {
-
pulsar().getPulsarResources().getDynamicConfigResources().getDynamicConfigurationAsync()
- .thenAccept(optMap -> {
- if (!optMap.isPresent()) {
- return;
- }
- Map<String, String> data = optMap.get();
- data.forEach((configKey, value) -> {
- Field configField =
dynamicConfigurationMap.get(configKey).field;
- Object newValue =
FieldParser.value(data.get(configKey), configField);
- if (configField != null) {
- Consumer listener =
configRegisteredListeners.get(configKey);
- try {
- Object existingValue =
configField.get(pulsar.getConfiguration());
- configField.set(pulsar.getConfiguration(),
newValue);
- log.info("Successfully updated configuration
{}/{}", configKey,
- data.get(configKey));
- if (listener != null &&
!existingValue.equals(newValue)) {
- listener.accept(newValue);
+ DynamicConfigurationResources dynamicConfigResources = null;
+ try {
+ dynamicConfigResources = pulsar()
+ .getPulsarResources()
+ .getDynamicConfigResources();
Review Comment:
We are changing the async call to sync. Which thread is this method called?
Is it possible to cause some dead lock to blocking request response thread?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]