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

[B-03499] update tokio to 0.3 #461

Closed
wants to merge 1 commit into from
Closed

[B-03499] update tokio to 0.3 #461

wants to merge 1 commit into from

Conversation

steveej
Copy link
Member

@steveej steveej commented Nov 3, 2020

This update is as mechanical as possible, i.e. it's trying to purely
adapt to the changes introduced in tokio 0.3 without unrelated
refactors.

Dependencies that need to update to tokio 0.3 before we can cleanly move forward with this:

@steveej steveej requested a review from neonphog November 3, 2020 14:36
@steveej steveej changed the title update tokio to 0.3 [B-03499] update tokio to 0.3 Nov 3, 2020
async fn kvbuf_scratch_and_persistence() -> DatabaseResult<()> {
let test_env = test_cell_env();
let arc = test_env.env();
let arc = test_env.env();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why didn't our ci linting code catch this? is this file not being scanned or something?

tokio-tungstenite = { version = "0.10.1", features = [ "tls" ] }
tokio = { version = "0.3.3", features = [ "full" ] }
# No tokio 0.3 compatible release yet: https://github.com/snapview/tokio-tungstenite/issues/130
tokio-tungstenite = { git = "https://github.com/snapview/tokio-tungstenite.git", rev = "3c6d4280d77fdff3e25f68ad703d94e89f38dae2", features = [ "tls" ] }
Copy link
Contributor

@neonphog neonphog Nov 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oo, sneaky - good thing we're not publishing to crates.io yet...

// TODO(steveeJ): investigate whether we need an alternative
// socket.set_keepalive(Some(std::time::Duration::from_secs(
// config.tcp_keepalive_s as u64,
// )))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, I guess that won't work for the incoming side...

@steveej steveej force-pushed the pr/tokio-0.3 branch 11 times, most recently from bccec02 to f2df0fe Compare November 6, 2020 22:38
Comment on lines 3 to 7
lazy_static::lazy_static! {
pub static ref TOKIO: Runtime = {
new_runtime()
};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lazy_static::lazy_static! {
pub static ref TOKIO: Runtime = {
new_runtime()
};
}
use once_cell::sync::Lazy;
pub static TOKIO: Lazy<Runtime> = Lazy::new(new_runtime);

once_cell is the new lazy_static! : )

@steveej steveej force-pushed the pr/tokio-0.3 branch 3 times, most recently from f3568b5 to eed77e4 Compare November 9, 2020 17:34
This updates the tokio dependency in all crates to tokio 0.3.

The update approach is as mechanical as possible, i.e. it's trying to
purely adapt to the changes introduced in tokio 0.3 without unrelated
refactors.

These out-of-repo dependencies were updated to tokio 0.3 in the process
as well:
tokio 0.3 compatible versions:
* tokio_safe_block_on:
* lair

A new crate `tokio_helper` was introduced to work around issues with the
`updated tokio_safe_block_on`. It provies functionality to use a
globally and statically available tokio runtime to be entered from
anywhere blocking calls are required.

Currently this work is blocked on two dependencies that haven't updated
to tokio 0.3 yet:
* quinn: used by the `transoprt_quic` crate
* reqwest
@steveej steveej marked this pull request as draft November 9, 2020 21:32
@steveej steveej added WIP blocked This work can't move forward right now but may be resumed in the future and removed WIP labels Dec 3, 2020
@steveej steveej removed the blocked This work can't move forward right now but may be resumed in the future label Mar 5, 2021
@steveej steveej mentioned this pull request Mar 5, 2021
2 tasks
@steveej steveej closed this Mar 5, 2021
@steveej steveej deleted the pr/tokio-0.3 branch March 5, 2021 20:37
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.

None yet

3 participants