-
Bug
-
Resolution: Done
-
Major
-
4.0.35.Final
-
None
EJBCLIENT-361 , the blacklist timeout check is backwards in the getBlacklist method. The isBlackListed is correct, it removes from the blacklist if delta > BLACKLIST_TIMEOUT , whereas getBlacklist is removing if delta < BLACKLIST_TIMEOUT :
74 public final class DiscoveryEJBClientInterceptor implements EJBClientInterceptor { 91 private static final long BLACKLIST_TIMEOUT = 92 AccessController.doPrivileged((PrivilegedAction<Long>) () -> { 93 String val = System.getProperty("org.jboss.ejb.client.discovery.blacklist.timeout"); 94 try { 95 return TimeUnit.MILLISECONDS.toNanos(Long.valueOf(val)); 96 } catch (NumberFormatException e) { 97 return TimeUnit.MILLISECONDS.toNanos(5000L); 98 } 99 }); 311 static boolean isBlackListed(AbstractInvocationContext context, URI destination) { 312 final Set<URI> invocationBlacklist = context.getAttachment(BL_KEY); 313 if (invocationBlacklist != null && invocationBlacklist.contains(destination)) { 314 return true; 315 } 316 if (!blacklist.containsKey(destination)) { 317 return false; 318 } 319 final long blacklistedTimestamp = blacklist.get(destination); 320 final long delta = System.nanoTime() - blacklistedTimestamp; 321 if (delta < BLACKLIST_TIMEOUT) { 322 return true; 323 } else { 324 blacklist.remove(destination); 325 return false; 326 } 327 } 328 329 private static Set<URI> getBlacklist(){ 330 blacklist.entrySet().removeIf(e -> 331 { 332 final long delta = System.nanoTime() - e.getValue(); 333 return delta < BLACKLIST_TIMEOUT; 334 }); 335 return blacklist.keySet(); 336 }
- is caused by
-
EJBCLIENT-361 DiscoveryEJBClientInterceptor: static blacklist
- Resolved
- is cloned by
-
JBEAP-20340 [GSS](7.3.z) EJBCLIENT-386 - discovery.blacklist.timeout getBlacklist check is incorrect
- Closed
- is incorporated by
-
JBEAP-20340 [GSS](7.3.z) EJBCLIENT-386 - discovery.blacklist.timeout getBlacklist check is incorrect
- Closed