-
Notifications
You must be signed in to change notification settings - Fork 752
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
refactor(ci): bump rust version #9540
Conversation
bump rust toolchain to rust nightly-2022-12-15 Signed-off-by: 蔡略 <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Please follow https://databend.rs/doc/faq/routine-maintenance to bump rust toolchain. |
This PR is blocked by rust-lang/rust#64552 I tried some workaround but failing with: error: implementation of `std::marker::Send` is not general enough
--> src/query/storages/fuse/src/operations/mutation/deletion/deletion_transform.rs:331:53
|
331 | async fn async_process(&mut self) -> Result<()> {
| _____________________________________________________^
332 | | match std::mem::replace(&mut self.state, State::None) {
333 | | State::ReadSegments => {
334 | | let ctx = self.ctx.clone();
... |
368 | | Ok(())
369 | | }
| |_____^ implementation of `std::marker::Send` is not general enough
|
= note: `std::marker::Send` would have to be implemented for the type `&'0 [storages_common_table_meta::meta::Location]`, for any lifetime `'0`...
= note: ...but `std::marker::Send` is actually implemented for the type `&'1 [storages_common_table_meta::meta::Location]`, for some specific lifetime `'1` Seems we need to refactor #[tracing::instrument(level = "debug", skip_all)]
pub async fn read_segments(
&self,
segment_locations: &[Location],
) -> Result<Vec<Result<Arc<SegmentInfo>>>> {} |
Now I'm sure problem happens at this arm: async fn async_process(&mut self) -> Result<()> {
let state = std::mem::replace(&mut self.state, State::None);
match state {
// State::ReadSegments => {
// let ctx = self.ctx.clone();
// let dal = self.dal.clone();
// let schema = self.schema.clone();
// let segment_locations = self.base_segments.clone();
// let fut = Box::pin(async move {
// // Read all segments information in parallel.
// SegmentsIO::read_segments_work_around(ctx, dal, schema, segment_locations)
// .await?
// .into_iter()
// .collect::<Result<Vec<_>>>()
// });
// let segments = fut.await?;
// self.state = State::GenerateSegments(segments);
// }
State::SerializedSegments {
serialized_data,
segments,
summary,
} => {
let ctx = self.ctx.clone();
let dal = self.dal.clone();
Self::write_segments(ctx, dal, serialized_data).await?;
self.state = State::Output { segments, summary };
}
_ => return Err(ErrorCode::Internal("It's a bug.")),
}
} |
More deeper, this call: // Self::write_segments(ctx, dal, serialized_data).await?; |
The pub struct Location(String, FormatVersion) But it will introduce much more refactor, so if it does solve the problem, I'll make an independent PR for the introduced refactor. |
Ok, I got it: pub async fn try_join_futures<Fut>(
ctx: Arc<dyn TableContext>,
- futures: impl IntoIterator<Item = Fut>,
+ futures: Vec<Fut>,
thread_name: String,
) -> Result<Vec<Fut::Output>> |
I tried locally, and not fixed. |
auto code generation has derivable `Default`s and single armed matches, let clippy ignore it Signed-off-by: 蔡略 <[email protected]>
engine.connect() is deprecated in sqlalchemy2.0 use `engine.begin()` instead Signed-off-by: 蔡略 <[email protected]>
All warnings in
|
Signed-off-by: 蔡略 <[email protected]>
clippy is so strict ( |
a crate have to import all of foreign macros it depends on but cargo-machete is not clever enough to detect this so those dependencies have to be ignored Signed-off-by: 蔡略 <[email protected]>
Code generator could be improved in the future, let's allow this temporarily. |
We don't need to improve this part, they are not maintained by human. Disable all lint for generated code LGTM. |
1. use `char::is_ascii_digit() -> bool` instead of (b'0'..=b'9').contains(char) Signed-off-by: 蔡略 <[email protected]>
All check passed! Thanks for the hard work of @ClSlaid |
Signed-off-by: 蔡略 [email protected]
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
bump rust toolchain to rust nightly-2022-12-15
Change log
nightly-2022-12-15
nightly-2022-12-15
clippy::unlined_format_args
(b'0'..b'9').contains(k)
tok.is_ascii_digit()
cargo-machete
ignorematch-template
instorages-common-index
Closes #issue