HDFS-16530. setReplication debug log creates a new string even if debug is disabled (#4142)

This commit is contained in:
Stephen O'Donnell 2022-04-06 08:49:52 +01:00 committed by GitHub
parent 966b773a7c
commit bbfe3500cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -415,7 +415,7 @@ public class FSDirAttrOp {
bm.setReplication(oldBR, targetReplication, b);
}
if (oldBR != -1) {
if (oldBR != -1 && FSDirectory.LOG.isDebugEnabled()) {
if (oldBR > targetReplication) {
FSDirectory.LOG.debug("Decreasing replication from {} to {} for {}",
oldBR, targetReplication, iip.getPath());