You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/12/20 10:07:05 UTC
[GitHub] [rocketmq] xiaoyifang commented on a diff in pull request #5739: [ISSUE #5738] remove uselesscode in updateFaultItem
xiaoyifang commented on code in PR #5739:
URL: https://github.com/apache/rocketmq/pull/5739#discussion_r1053137247
##########
client/src/main/java/org/apache/rocketmq/client/latency/LatencyFaultToleranceImpl.java:
##########
@@ -37,11 +37,7 @@ public void updateFaultItem(final String name, final long currentLatency, final
faultItem.setCurrentLatency(currentLatency);
faultItem.setStartTimestamp(System.currentTimeMillis() + notAvailableDuration);
- old = this.faultItemTable.putIfAbsent(name, faultItem);
- if (old != null) {
- old.setCurrentLatency(currentLatency);
- old.setStartTimestamp(System.currentTimeMillis() + notAvailableDuration);
- }
+ this.faultItemTable.putIfAbsent(name, faultItem);
Review Comment:
you are right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org