Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use logger.isDebugEnabled to avoid unnecessary String concatenation i…

…n non-debug code path.
  • Loading branch information...
commit 14bd90eb52fa56d4fbbddcfb5a719d9b48af4a35 1 parent 8edd688
@ijuma ijuma authored
Showing with 13 additions and 7 deletions.
  1. +13 −7 src/java/voldemort/store/routed/RoutedStore.java
View
20 src/java/voldemort/store/routed/RoutedStore.java
@@ -349,15 +349,21 @@ public void run() {
public void run() {
for(NodeValue<ByteArray, byte[]> v: readRepairer.getRepairs(nodeValues)) {
try {
- logger.debug("Doing read repair on node " + v.getNodeId()
- + " for key '" + v.getKey() + "' with version "
- + v.getVersion() + ".");
+ if(logger.isDebugEnabled())
+ logger.debug("Doing read repair on node " + v.getNodeId()
+ + " for key '" + v.getKey() + "' with version "
+ + v.getVersion() + ".");
innerStores.get(v.getNodeId()).put(v.getKey(), v.getVersioned());
} catch(ObsoleteVersionException e) {
- logger.debug("Read repair cancelled due to obsolete version on node "
- + v.getNodeId() + " for key '" + v.getKey()
- + "' with version " + v.getVersion() + ": "
- + e.getMessage());
+ if(logger.isDebugEnabled())
+ logger.debug("Read repair cancelled due to obsolete version on node "
+ + v.getNodeId()
+ + " for key '"
+ + v.getKey()
+ + "' with version "
+ + v.getVersion()
+ + ": "
+ + e.getMessage());
} catch(Exception e) {
logger.debug("Read repair failed: ", e);
}
Please sign in to comment.
Something went wrong with that request. Please try again.