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

core: Replace host scheduler on update #1453

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

kim
Copy link
Contributor

@kim kim commented Jun 21, 2024

When updating a Host, replace its Scheduler with the new one.

This is only a minor fix: the Host only uses the Scheduler to create a
fresh Scheduler with the same underlying database, while the actual
scheduling happens elsewhere. By not dropping the old Scheduler, we'd
leak a channel with no receivers and a pointer to the database.

Expected complexity level and risk

1

When updating a `Host`, replace its `Scheduler` with the new one.

This is only a minor fix: the `Host` only uses the `Scheduler` to create a
fresh `Scheduler` with the same underlying database, while the actual
scheduling happens elsewhere. By not dropping the old `Scheduler`, we'd
leak a channel with no receivers and a pointer to the database.
@kim kim requested a review from Shubham8287 June 21, 2024 07:59
@kim kim added this pull request to the merge queue Jun 24, 2024
Merged via the queue into master with commit 4c0185d Jun 24, 2024
8 checks passed
@kim kim deleted the kim/fix/replace-scheduler branch June 24, 2024 18:00
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

Successfully merging this pull request may close these issues.

2 participants