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

[YUNIKORN-832] Updating config can't remove partition #319

Merged
merged 1 commit into from Sep 27, 2021

Conversation

chia7712
Copy link
Contributor

@chia7712 chia7712 commented Sep 1, 2021

What is this PR for?

All functions in partition_manager are using pass-by-value so setting the stop flag to true can't terminate other threads.

func (manager partitionManager) Stop() {
 manager.stop = true
}

Also, the thread used to cleanup expired app can't be stopped quickly after removing partition because it needs to sleep for 24 hours.

func (manager partitionManager) cleanupExpiredApps() {
	for {
		if manager.stop {
			break
		}
		manager.pc.cleanupExpiredApps()
		time.Sleep(appRemovalInterval)
	}
}

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-832

How should this be tested?

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #319 (c5c9b1c) into master (5a1c19e) will increase coverage by 3.13%.
The diff coverage is 65.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
+ Coverage   63.46%   66.59%   +3.13%     
==========================================
  Files          60       63       +3     
  Lines        5220     5952     +732     
==========================================
+ Hits         3313     3964     +651     
- Misses       1747     1782      +35     
- Partials      160      206      +46     
Impacted Files Coverage Δ
pkg/metrics/init.go 62.96% <ø> (ø)
pkg/scheduler/drf_preemption_policy.go 0.00% <0.00%> (ø)
pkg/scheduler/nodes_usage_monitor.go 0.00% <0.00%> (ø)
pkg/scheduler/objects/allocation.go 100.00% <ø> (ø)
pkg/scheduler/objects/node_iterator.go 100.00% <ø> (ø)
pkg/scheduler/objects/sorters.go 100.00% <ø> (ø)
pkg/webservice/webservice.go 32.25% <ø> (+19.35%) ⬆️
pkg/scheduler/context.go 16.77% <23.14%> (+10.51%) ⬆️
pkg/metrics/metrics_collector.go 64.51% <45.00%> (-9.40%) ⬇️
pkg/metrics/scheduler.go 58.92% <49.33%> (-2.66%) ⬇️
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66cdb3d...c5c9b1c. Read the comment docs.

@kingamarton kingamarton merged commit cb96433 into apache:master Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants