You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xinyiZzz (via GitHub)" <gi...@apache.org> on 2024/10/12 07:10:14 UTC

[PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

xinyiZzz opened a new pull request, #41754:
URL: https://github.com/apache/doris/pull/41754

   Guava LoadingCache expiration check is performed when the cache is accessed, not immediately when the expiration time is reached. 
   
   So manually call the cleanUp method regularly to clean up expired cache items.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz commented on PR #41754:
URL: https://github.com/apache/doris/pull/41754#issuecomment-2408430212

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz merged PR #41754:
URL: https://github.com/apache/doris/pull/41754


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41754:
URL: https://github.com/apache/doris/pull/41754#issuecomment-2415820769

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #41754:
URL: https://github.com/apache/doris/pull/41754#discussion_r1799770766


##########
fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/tokens/FlightTokenManagerImpl.java:
##########
@@ -82,6 +88,8 @@ public FlightTokenDetails load(String key) {
                         return new FlightTokenDetails();
                     }
                 });
+        this.cleanupExecutor = Executors.newScheduledThreadPool(1, new CustomThreadFactory("flight-token-cleanup"));

Review Comment:
   我们为什么不是再register connection的时候检查一下链接是否满了,主动淘汰呢?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41754:
URL: https://github.com/apache/doris/pull/41754#issuecomment-2408430109

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41754:
URL: https://github.com/apache/doris/pull/41754#issuecomment-2415820724

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](arrow-flight-sql) Fix Arrow Flight bearer token cache evict after expired [doris]

Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz commented on code in PR #41754:
URL: https://github.com/apache/doris/pull/41754#discussion_r1799796015


##########
fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/tokens/FlightTokenManagerImpl.java:
##########
@@ -82,6 +88,8 @@ public FlightTokenDetails load(String key) {
                         return new FlightTokenDetails();
                     }
                 });
+        this.cleanupExecutor = Executors.newScheduledThreadPool(1, new CustomThreadFactory("flight-token-cleanup"));

Review Comment:
   不好,因为链接没满,也希望可以淘汰过期的token,
   1. 这里淘汰的是 flight token,也就是 arrow flight server 的登陆凭证,不是flight链接,这个 token 预期是要有过期淘汰机制的,类似账户登陆后一段时间就要重新登陆。
   2. 淘汰 token 会同时淘汰 flight 链接,因为如果 token 淘汰了那 flight 链接也就不会再访问了,用户 show processlist 看到 arrow flight 链接一直没有释放会有疑问。
   3. 默认 token 过期时间是 3天,flight/mysql 链接过期时间要更短,也就是一次登陆(拿到token)可以多次创建链接,所以不能在 flight 链接过期淘汰的同时淘汰 token。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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