[ 
https://issues.apache.org/jira/browse/DRILL-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15169361#comment-15169361
 ] 

ASF GitHub Bot commented on DRILL-4354:
---------------------------------------

Github user vkorukanti commented on a diff in the pull request:

    https://github.com/apache/drill/pull/360#discussion_r54273230
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRestServer.java
 ---
    @@ -102,4 +112,34 @@ public void dispose(DrillUserPrincipal principal) {
           // No-Op
         }
       }
    +
    +  // Provider which creates and cleanups DrillUserPrincipal for anonymous 
(auth disabled) mode
    +  public static class AnonDrillUserPrincipalProvider implements 
Factory<DrillUserPrincipal> {
    +    @Inject WorkManager workManager;
    +
    +    @RequestScoped
    +    @Override
    +    public DrillUserPrincipal provide() {
    +      return new AnonDrillUserPrincipal(workManager.getContext());
    +    }
    +
    +    @Override
    +    public void dispose(DrillUserPrincipal principal) {
    +      // If this worked it would have been clean to free the resources 
here, but there are various scenarios
    --- End diff --
    
    Original issue: https://java.net/jira/browse/JERSEY-2299. It got fixed in 
2.7 (we are on 2.8), but I saw few threads that mention it still reproes and 
not always called when closing the browser 
(http://jersey.576304.n2.nabble.com/Factory-dispose-is-not-called-td7583326.html).
 Didn't find any latest JIRAs. When I tried also, it never called after the 
request is complete. So thought it is not safe to rely on this method to 
cleanup resources.


> Remove sessions in anonymous (user auth disabled) mode in WebUI server
> ----------------------------------------------------------------------
>
>                 Key: DRILL-4354
>                 URL: https://issues.apache.org/jira/browse/DRILL-4354
>             Project: Apache Drill
>          Issue Type: Bug
>          Components:  Server
>    Affects Versions: 1.5.0
>            Reporter: Venki Korukanti
>            Assignee: Venki Korukanti
>             Fix For: 1.6.0
>
>
> Currently we open anonymous sessions when user auth disabled. These sessions 
> are cleaned up when they expire (controlled by boot config 
> {{drill.exec.http.session_max_idle_secs}}). This may lead to unnecessary 
> resource accumulation. This JIRA is to remove anonymous sessions and only 
> have sessions when user authentication is enabled.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to