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

chore(tokio): remove unused enable_all #9789

Closed

Conversation

BohuTANG
Copy link
Member

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

Closes #issue

@vercel
Copy link

vercel bot commented Jan 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
databend ⬜️ Ignored (Inspect) Jan 30, 2023 at 1:34PM (UTC)

@mergify mergify bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Jan 30, 2023
@drmingdrmer
Copy link
Member

It enables io and timer. Don't we relies on them?:

  pub fn enable_all(&mut self) -> &mut Self {
        #[cfg(feature = "io-driver")]
        self.enable_io();
        #[cfg(feature = "time")]
        self.enable_time();

        self
    }

@drmingdrmer
Copy link
Member

@BohuTANG unit test fails with:
thread 'Inner' panicked at 'A Tokio 1.x context was found, but timers are disabled. Call enable_time on the runtime builder to enable timers.', src/common/base/tests/it/runtime_tracker.rs:36:13

@BohuTANG
Copy link
Member Author

@BohuTANG unit test fails with: thread 'Inner' panicked at 'A Tokio 1.x context was found, but timers are disabled. Call enable_time on the runtime builder to enable timers.', src/common/base/tests/it/runtime_tracker.rs:36:13

enable_io will panic miri, so i removed it and added enable_time.

@drmingdrmer
Copy link
Member

enable_io will panic miri, so i removed it and added enable_time.

Interesting...

@BohuTANG
Copy link
Member Author

Now we can run miri on some unit test, for example:

MIRIFLAGS='-Zmiri-disable-isolation' cargo miri test --test it pipelines::processors::port_test::test_port_drop

But we don't have many unit tests related to unsafe, FYI @zhang2014 @sundy-li

@BohuTANG
Copy link
Member Author

oops:

ailures:

---- grpc_client::test_grpc_client_action_timeout stdout ----
thread 'meta-client-rt' panicked at 'A Tokio 1.x context was found, but IO is disabled. Call `enable_io` on the runtime builder to enable IO.', /opt/rust/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.23.1/src/net/tcp/stream.rs:161:18

@BohuTANG BohuTANG marked this pull request as draft January 30, 2023 13:55
@BohuTANG
Copy link
Member Author

It seems we can't disable IO in Databend, wait for rust-lang/miri#602

@BohuTANG BohuTANG closed this Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chore this PR only has small changes that no need to record, like coding styles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants