Skip to content

Commit

Permalink
Improve key commit logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
smengcl committed Aug 10, 2023
1 parent f365093 commit 672779f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
}
}

// Debug logging for HSync and non-HSync key commits, successful or not
LOG.debug("Key commit {} with isHSync = {}, omKeyInfo = {}",
result == Result.SUCCESS ? "succeeded" : "failed", isHSync, omKeyInfo);

if (!isHSync) {
auditLog(auditLogger, buildAuditMessage(OMAction.COMMIT_KEY, auditMap,
exception, getOmRequest().getUserInfo()));
processResult(commitKeyRequest, volumeName, bucketName, keyName,
omMetrics, exception, omKeyInfo, result);
} else {
// Debug logging for HSync key commits
LOG.debug("Key successfully committed with isHSync = {}, " +
"omKeyInfo = {}", isHSync, omKeyInfo);
}

return omClientResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
}
}

// Debug logging for HSync and non-HSync key commits, successful or not
LOG.debug("Key commit {} with isHSync = {}, omKeyInfo = {}",
result == Result.SUCCESS ? "succeeded" : "failed", isHSync, omKeyInfo);

if (!isHSync) {
auditLog(auditLogger, buildAuditMessage(OMAction.COMMIT_KEY, auditMap,
exception, getOmRequest().getUserInfo()));
processResult(commitKeyRequest, volumeName, bucketName, keyName,
omMetrics, exception, omKeyInfo, result);
} else {
// Debug logging for HSync key commits
LOG.debug("Key successfully committed with isHSync = {}, " +
"omKeyInfo = {}", isHSync, omKeyInfo);
}

return omClientResponse;
Expand Down

0 comments on commit 672779f

Please sign in to comment.