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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new f851948bbd [branch-2.0](fix) fix potential user identify not analyzed 
issue (#24496)
f851948bbd is described below

commit f851948bbd5d7e74cc4d59a57eaeff260f7c8bf6
Author: Mingyu Chen <morning...@163.com>
AuthorDate: Sun Sep 17 00:05:38 2023 +0800

    [branch-2.0](fix) fix potential user identify not analyzed issue (#24496)
---
 .../src/main/java/org/apache/doris/service/FrontendServiceImpl.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java 
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 3fee0e0330..3cb6e15d4e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -2680,6 +2680,7 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
     }
 
     // Restore Snapshot
+    @Override
     public TRestoreSnapshotResult restoreSnapshot(TRestoreSnapshotRequest 
request) throws TException {
         String clientAddr = getClientAddrAsString();
         LOG.trace("receive restore snapshot info request: {}", request);
@@ -2706,6 +2707,8 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             status.setStatusCode(TStatusCode.INTERNAL_ERROR);
             status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
             return result;
+        } finally {
+            ConnectContext.remove();
         }
 
         return result;
@@ -2770,6 +2773,7 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             ctx.setCluster(cluster);
             ctx.setQualifiedUser(request.getUser());
             UserIdentity currentUserIdentity = new 
UserIdentity(request.getUser(), "%");
+            currentUserIdentity.setIsAnalyzed();
             ctx.setCurrentUserIdentity(currentUserIdentity);
 
             Analyzer analyzer = new Analyzer(ctx.getEnv(), ctx);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to