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

Runtime: Always wake runner immediately once a new task is enqueued #375

Merged
merged 1 commit into from Jan 6, 2021

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Jan 6, 2021

Fixes #372

@nightkr nightkr requested a review from clux January 6, 2021 01:35
@nightkr
Copy link
Member Author

nightkr commented Jan 6, 2021

@joell Can you confirm that this fixes your issue? It won't repro for me anymore, at least..

@clux I know we don't really do LTS, but maybe it's worth backporting this to 0.45.1 or something, since it's pretty critical for controllers, and 0.45 will presumably be the final release to support Tokio 0.2 (which people might be stuck on for Legacy Reasons).

@clux
Copy link
Member

clux commented Jan 6, 2021

@teozkr : Sure, if this fixes it I can cherry-pick this to a tokio02 branch from before the 1.0 merges and publish a patch-release.

@clux
Copy link
Member

clux commented Jan 6, 2021

Planning on getting this in a minor today.

@clux clux merged commit 72261c1 into kube-rs:master Jan 6, 2021
@joell
Copy link

joell commented Jan 6, 2021

@teozkr: Yes, I can confirm that this change fixes #372 in my testing.

Thank you for resolving this so quickly! I hope it didn't take too much time away from your holiday.

@clux
Copy link
Member

clux commented Jan 6, 2021

Released in kube* 0.47.0

@clux
Copy link
Member

clux commented Jan 6, 2021

@teozkr : i tried cherry picking this commit from the last 0.46.0 commit into a new branch, but it's already using tokio 1.0 features.

The import reordering of tokio imports + rename of sleep -> delay_for was fine, but tests requires #[tokio::test(flavor = "current_thread")] which isn't there, and based on the comments it sounds necessary. Are you able to help make a fixup branch? I can publish it as 0.46.1 everywhere.

@nightkr
Copy link
Member Author

nightkr commented Jan 6, 2021

@clux The 0.2 equivalent should be core_threads = 1: https://docs.rs/tokio/0.2.24/tokio/attr.test.html

clux added a commit that referenced this pull request Jan 6, 2021
clux added a commit that referenced this pull request Jan 6, 2021
@clux
Copy link
Member

clux commented Jan 6, 2021

0.46.1 now released everywhere from the tokio02 branch.

@nightkr nightkr deleted the bugfix/runner-enqueue-scheduling branch February 22, 2021 16:19
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.

Regression in 0.44 or 0.45: Reconciler future is no longer started immediately
3 participants