Skip to content

Commit

Permalink
HBASE-27528 log duplication issues in MasterRpcServices. (#4951)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
curie71 authored Jan 20, 2023
1 parent 5feb06b commit 913cf6b
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2809,13 +2809,6 @@ public GrantResponse grant(RpcController controller, GrantRequest request)
mergeExistingPermissions);
}
server.cpHost.postGrant(perm, mergeExistingPermissions);
User caller = RpcServer.getRequestUser().orElse(null);
if (AUDITLOG.isTraceEnabled()) {
// audit log should store permission changes in addition to auth results
String remoteAddress = RpcServer.getRemoteAddress().map(InetAddress::toString).orElse("");
AUDITLOG.trace("User {} (remote address: {}) granted permission {}", caller,
remoteAddress, perm);
}
return GrantResponse.getDefaultInstance();
} else {
throw new DoNotRetryIOException(
Expand All @@ -2839,13 +2832,6 @@ public RevokeResponse revoke(RpcController controller, RevokeRequest request)
PermissionStorage.removeUserPermission(server.getConfiguration(), userPermission, table);
}
server.cpHost.postRevoke(userPermission);
User caller = RpcServer.getRequestUser().orElse(null);
if (AUDITLOG.isTraceEnabled()) {
// audit log should record all permission changes
String remoteAddress = RpcServer.getRemoteAddress().map(InetAddress::toString).orElse("");
AUDITLOG.trace("User {} (remote address: {}) revoked permission {}", caller,
remoteAddress, userPermission);
}
return RevokeResponse.getDefaultInstance();
} else {
throw new DoNotRetryIOException(
Expand Down

0 comments on commit 913cf6b

Please sign in to comment.