Skip to content

Commit

Permalink
W-13897522: Fix dropped message metric value
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzxu committed Aug 21, 2023
1 parent 8763ce1 commit b42c5f0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ public boolean match(String name)
}

StringsCache.State state = StringsCache.getState(name);
boolean isBlackListed = false;
if (state != null && state.getBlackListed() != null) {
return state.getBlackListed();
isBlackListed = state.getBlackListed();
if (isBlackListed) {
droppedMetrics.inc();
}
return isBlackListed;
}

List<Pattern> currentPatterns = patterns; // copy so we don't keep hitting the volatile barrier
boolean isBlackListed = false;
for ( Pattern p : currentPatterns )
{
if( ".*".equals( p.pattern() ) )
Expand Down

0 comments on commit b42c5f0

Please sign in to comment.