Skip to content

Commit

Permalink
Avoid using Completable#join long wait for results. (#14691)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao authored Mar 16, 2022
1 parent b741aa3 commit b5535f9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ private void reapDeadBrokerPreallocations(List<String> aliveBrokers) {
@Override
public Set<String> getAvailableBrokers() {
try {
return new HashSet<>(brokersData.listLocks(LoadManager.LOADBALANCE_BROKERS_ROOT).join());
return new HashSet<>(brokersData.listLocks(LoadManager.LOADBALANCE_BROKERS_ROOT)
.get(conf.getMetadataStoreOperationTimeoutSeconds(), TimeUnit.SECONDS));
} catch (Exception e) {
log.warn("Error when trying to get active brokers", e);
return loadData.getBrokerData().keySet();
Expand Down

0 comments on commit b5535f9

Please sign in to comment.