Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK][EASY] Fix terminated application pods not deleted issue when kyuubi server restarted #6320

Closed
2 of 3 tasks
pan3793 opened this issue Apr 19, 2024 · 0 comments
Closed
2 of 3 tasks
Assignees

Comments

@pan3793
Copy link
Member

pan3793 commented Apr 19, 2024

What's the level of this task?

EASY

Code of Conduct

Search before creating

  • I have searched in the task list and found no similar tasks.

Mentor

  • I have sufficient expertise on this task, and I volunteer to be a mentor of this task to guide contributors through the task.

Skill requirements

  • Kyuubi and K8s

Background and Goals

#6319

Implementation steps

#6319

Additional context

Introduction of 2024H1 Kyuubi Code Contribution Program

pan3793 pushed a commit that referenced this issue Apr 19, 2024
… kyuubi server restarted

# 🔍 Description
## Issue References 🔗

This pull request fixes #

We found that some pods were not deleted if kyuubi server restarted

The root cause is that:
com.google.common.cache::cleanup will not trigger removalListener action, we shall use `invalidateAll` instead.

Testing:
Nothing print for below code:
```
import com.google.common.cache.{Cache, CacheBuilder, RemovalNotification}

var removed = 0
val cache: Cache[String, String] = CacheBuilder.newBuilder()
  .removalListener((notification: RemovalNotification[String, String]) => {
    removed += 1
    println("removed: " + removed)
  }).build()

(0 until 1000).foreach { i =>
  cache.put(i.toString, i.toString)
}

cache.cleanup()
```

Replacing `cache.cleanup()` with `cache.invalidateAll()`, the output is expected.

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6319 from turboFei/app_k8s_leak.

Closes #6320

ff2adfc [Wang, Fei] invalidate all

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 26fe59d)
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 pushed a commit that referenced this issue Apr 19, 2024
… kyuubi server restarted

# 🔍 Description
## Issue References 🔗

This pull request fixes #

We found that some pods were not deleted if kyuubi server restarted

The root cause is that:
com.google.common.cache::cleanup will not trigger removalListener action, we shall use `invalidateAll` instead.

Testing:
Nothing print for below code:
```
import com.google.common.cache.{Cache, CacheBuilder, RemovalNotification}

var removed = 0
val cache: Cache[String, String] = CacheBuilder.newBuilder()
  .removalListener((notification: RemovalNotification[String, String]) => {
    removed += 1
    println("removed: " + removed)
  }).build()

(0 until 1000).foreach { i =>
  cache.put(i.toString, i.toString)
}

cache.cleanup()
```

Replacing `cache.cleanup()` with `cache.invalidateAll()`, the output is expected.

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6319 from turboFei/app_k8s_leak.

Closes #6320

ff2adfc [Wang, Fei] invalidate all

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 26fe59d)
Signed-off-by: Cheng Pan <chengpan@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants