Skip to content

Commit

Permalink
Fix when push fail the totalPush variable count cannot increase (alib…
Browse files Browse the repository at this point in the history
  • Loading branch information
peachisai committed Jan 31, 2024
1 parent 9d473ef commit 1b9a22c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void pushSuccess(PushResult result) {

@Override
public void pushFailed(PushResult result) {
MetricsMonitor.incrementPush();
MetricsMonitor.incrementFailPush();
if (isRpc(result.getSubscriber())) {
NamingTpsMonitor.rpcPushFail(result.getSubscribeClientId(), result.getSubscriber().getIp());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@ public void testPushSuccessForNoEmptyPush() {
public void testPushFailed() {
new NacosMonitorPushResultHook().pushFailed(pushResult);
assertEquals(1, MetricsMonitor.getFailedPushMonitor().get());
assertEquals(1, MetricsMonitor.getTotalPushMonitor().get());
}
}

0 comments on commit 1b9a22c

Please sign in to comment.