This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 913cf6b96df HBASE-27528 log duplication issues in MasterRpcServices. 
(#4951)
913cf6b96df is described below

commit 913cf6b96df1fe28c84be0e6c382090cbcd9d8b7
Author: curie71 <39853223+curi...@users.noreply.github.com>
AuthorDate: Fri Jan 20 15:53:32 2023 +0800

    HBASE-27528 log duplication issues in MasterRpcServices. (#4951)
    
    Signed-off-by: Duo Zhang <zhang...@apache.org>
---
 .../org/apache/hadoop/hbase/master/MasterRpcServices.java  | 14 --------------
 1 file changed, 14 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index db02d7699bb..f490e8377d1 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -2809,13 +2809,6 @@ public class MasterRpcServices extends 
HBaseRpcServicesBase<HMaster>
             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(
@@ -2839,13 +2832,6 @@ public class MasterRpcServices extends 
HBaseRpcServicesBase<HMaster>
           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(

Reply via email to