Copilot commented on code in PR #7408:
URL: https://github.com/apache/kyuubi/pull/7408#discussion_r3108138381
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/ldap/Query.scala:
##########
@@ -127,6 +128,8 @@ object Query {
def build: Query = {
validate()
val filter: String = createFilter
+ // Unload template cache after render to avoid CompliedST/STToken
retntion
+ Option(filterTemplate.groupThatCreatedThisInstance).foreach(_.unload())
Review Comment:
`build` unloads `filterTemplate.groupThatCreatedThisInstance`, which is an
internal/implicit link between `ST` and `STGroup` and makes it less clear that
only the per-builder group is being unloaded. Consider storing the created
`STGroup` in a builder field (set in `filter`) and unloading that field in
`build` for clarity and to avoid accidentally unloading a shared/default group
if the construction changes later.
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/ldap/Query.scala:
##########
@@ -127,6 +128,8 @@ object Query {
def build: Query = {
validate()
val filter: String = createFilter
+ // Unload template cache after render to avoid CompliedST/STToken
retntion
Review Comment:
Typo/grammar in the new comment: "CompliedST/STToken retntion" should be
corrected (e.g., "CompiledST/STToken retention").
```suggestion
// Unload template cache after render to avoid CompiledST/STToken
retention
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]