Skip to content

Commit

Permalink
Supplementary dirctory metrics data push (#12539)
Browse files Browse the repository at this point in the history
* Supplementary dirctory metrics data push

* puplish after publish
  • Loading branch information
wxbty authored Jun 19, 2023
1 parent a4e9c9e commit 913e66e
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,21 @@ protected void destroyInvokers() {
}

private boolean addValidInvoker(Invoker<T> invoker) {
boolean result;
synchronized (this.validInvokers) {
return this.validInvokers.add(invoker);
result = this.validInvokers.add(invoker);
}
MetricsEventBus.publish(RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary()));
return result;
}

private boolean removeValidInvoker(Invoker<T> invoker) {
boolean result;
synchronized (this.validInvokers) {
return this.validInvokers.remove(invoker);
result = this.validInvokers.remove(invoker);
}
MetricsEventBus.publish(RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary()));
return result;
}

protected abstract List<Invoker<T>> doList(SingleRouterChain<T> singleRouterChain,
Expand Down

0 comments on commit 913e66e

Please sign in to comment.