This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new a7ce23cce9 [KYUUBI #7220] Proactive cleanup kubernetes terminated
application info
a7ce23cce9 is described below
commit a7ce23cce921cc56e5d9e887b213d0393a2594f2
Author: Wang, Fei <[email protected]>
AuthorDate: Thu Oct 2 00:08:22 2025 -0700
[KYUUBI #7220] Proactive cleanup kubernetes terminated application info
### Why are the changes needed?
Proactive cleanup kubernetes terminated application info instead of rely on
the guava cache internal expiration.
### How was this patch tested?
GA.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7220 from turboFei/proactive_cleanupcache.
Closes #7220
127a907e0 [Wang, Fei] Proactive cleanup kubernetes terminated application
info
Authored-by: Wang, Fei <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
---
.../apache/kyuubi/engine/KubernetesApplicationOperation.scala | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
index 96e7dd4068..703d223d5b 100644
---
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
+++
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
@@ -199,13 +199,8 @@ class KubernetesApplicationOperation extends
ApplicationOperation with Logging {
expireCleanUpTriggerCacheExecutor,
() => {
try {
- Option(cleanupTerminatedAppInfoTrigger).foreach { trigger =>
- trigger.asMap().asScala.foreach {
- case (key, _) =>
- // do get to trigger cache eviction
- trigger.getIfPresent(key)
- }
- }
+ // Proactively remove expired entries from the cache
+ Option(cleanupTerminatedAppInfoTrigger).foreach(_.cleanUp())
} catch {
case NonFatal(e) => error("Failed to evict clean up terminated app
cache", e)
}