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

build(toolchain): bump to 2022-10-16 #5119

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/build-ci-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export RUST_TOOLCHAIN=$(cat ../rust-toolchain)
# !!! CHANGE THIS WHEN YOU WANT TO BUMP CI IMAGE !!! #
# AND ALSO docker-compose.yml #
######################################################
export BUILD_ENV_VERSION=v20221020
export BUILD_ENV_VERSION=v20221016

export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}"

Expand Down
4 changes: 2 additions & 2 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ services:
retries: 5

rw-build-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221020
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221016
volumes:
- ..:/risingwave

regress-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221020
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20221016
depends_on:
db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2022-07-29
nightly-2022-10-16
2 changes: 1 addition & 1 deletion src/batch/src/execution/grpc_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl Debug for GrpcExchangeSource {
}

impl ExchangeSource for GrpcExchangeSource {
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>>;
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>> + 'a;

fn take_data(&mut self) -> Self::TakeDataFuture<'_> {
async {
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/execution/local_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Debug for LocalExchangeSource {
}

impl ExchangeSource for LocalExchangeSource {
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>>;
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>> + 'a;

fn take_data(&mut self) -> Self::TakeDataFuture<'_> {
async {
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl FakeExchangeSource {
}

impl ExchangeSource for FakeExchangeSource {
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>>;
type TakeDataFuture<'a> = impl Future<Output = Result<Option<DataChunk>>> + 'a;

fn take_data(&mut self) -> Self::TakeDataFuture<'_> {
async {
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![expect(dead_code)]
#![allow(clippy::derive_partial_eq_without_eq)]
#![feature(trait_alias)]
#![feature(generic_associated_types)]
#![feature(binary_heap_drain_sorted)]
#![feature(exact_size_is_empty)]
#![feature(type_alias_impl_trait)]
Expand All @@ -26,6 +25,7 @@
#![feature(lint_reasons)]
#![feature(binary_heap_into_iter_sorted)]
#![recursion_limit = "256"]
#![feature(let_chains)]

mod error;
pub mod exchange_source;
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/task/broadcast_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Debug for BroadcastSender {
}

impl ChanSender for BroadcastSender {
type SendFuture<'a> = impl Future<Output = BatchResult<()>>;
type SendFuture<'a> = impl Future<Output = BatchResult<()>> + 'a;

fn send(&mut self, chunk: Option<DataChunk>) -> Self::SendFuture<'_> {
async move {
Expand All @@ -65,7 +65,7 @@ pub struct BroadcastReceiver {
}

impl ChanReceiver for BroadcastReceiver {
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>>;
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>> + 'a;

fn recv(&mut self) -> Self::RecvFuture<'_> {
async move {
Expand Down
1 change: 0 additions & 1 deletion src/batch/src/task/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ impl BatchEnvironment {
self.task_manager.clone()
}

#[expect(clippy::explicit_auto_deref)]
pub fn source_manager(&self) -> &TableSourceManager {
&*self.source_manager
}
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/task/fifo_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct FifoReceiver {
}

impl ChanSender for FifoSender {
type SendFuture<'a> = impl Future<Output = BatchResult<()>>;
type SendFuture<'a> = impl Future<Output = BatchResult<()>> + 'a;

fn send(&mut self, chunk: Option<DataChunk>) -> Self::SendFuture<'_> {
async {
Expand All @@ -52,7 +52,7 @@ impl ChanSender for FifoSender {
}

impl ChanReceiver for FifoReceiver {
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>>;
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>> + 'a;

fn recv(&mut self) -> Self::RecvFuture<'_> {
async move {
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/task/hash_shuffle_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn generate_new_data_chunks(
}

impl ChanSender for HashShuffleSender {
type SendFuture<'a> = impl Future<Output = BatchResult<()>>;
type SendFuture<'a> = impl Future<Output = BatchResult<()>> + 'a;

fn send(&mut self, chunk: Option<DataChunk>) -> Self::SendFuture<'_> {
async move {
Expand Down Expand Up @@ -150,7 +150,7 @@ impl HashShuffleSender {
}

impl ChanReceiver for HashShuffleReceiver {
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>>;
type RecvFuture<'a> = impl Future<Output = Result<Option<DataChunkInChannel>>> + 'a;

fn recv(&mut self) -> Self::RecvFuture<'_> {
async move {
Expand Down
1 change: 1 addition & 0 deletions src/cmd_all/src/bin/risingwave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#![cfg_attr(coverage, feature(no_coverage))]
#![feature(let_chains)]

use tikv_jemallocator::Jemalloc;

Expand Down
4 changes: 3 additions & 1 deletion src/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ impl Debug for RwError {
"{}\n{}",
self.inner,
// Use inner error's backtrace by default, otherwise use the generated one in `From`.
self.inner.backtrace().unwrap_or(&*self.backtrace)
(&self.inner as &dyn std::error::Error)
.request_ref::<Backtrace>()
.unwrap_or(&*self.backtrace)
xxchan marked this conversation as resolved.
Show resolved Hide resolved
)
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
#![allow(rustdoc::private_intra_doc_links)]
#![allow(clippy::derive_partial_eq_without_eq)]
#![feature(trait_alias)]
#![feature(generic_associated_types)]
#![feature(binary_heap_drain_sorted)]
#![feature(is_sorted)]
#![feature(backtrace)]
#![feature(fn_traits)]
#![feature(type_alias_impl_trait)]
#![feature(test)]
Expand All @@ -28,6 +26,9 @@
#![feature(generators)]
#![feature(map_try_insert)]
#![feature(once_cell)]
#![feature(let_chains)]
#![feature(error_generic_member_access)]
#![feature(provide_any)]

#[macro_use]
pub mod error;
Expand Down
9 changes: 4 additions & 5 deletions src/common/src/types/chrono_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl NaiveDateWrapper {
pub fn with_days_value(days: i32) -> value_encoding::Result<Self> {
Ok(NaiveDateWrapper::new(
NaiveDate::from_num_days_from_ce_opt(days)
.ok_or(ValueEncodingError::InvalidNaiveDateEncoding(days))?,
.ok_or_else(|| ValueEncodingError::InvalidNaiveDateEncoding(days))?,
))
}

Expand Down Expand Up @@ -116,7 +116,7 @@ impl NaiveTimeWrapper {
pub fn with_secs_nano_value(secs: u32, nano: u32) -> value_encoding::Result<Self> {
Ok(NaiveTimeWrapper::new(
NaiveTime::from_num_seconds_from_midnight_opt(secs, nano)
.ok_or(ValueEncodingError::InvalidNaiveTimeEncoding(secs, nano))?,
.ok_or_else(|| ValueEncodingError::InvalidNaiveTimeEncoding(secs, nano))?,
Copy link
Member

Choose a reason for hiding this comment

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

There shouldn't be any difference for enum construction.

Copy link
Member Author

Choose a reason for hiding this comment

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

))
}

Expand Down Expand Up @@ -163,9 +163,8 @@ impl NaiveDateTimeWrapper {

pub fn with_secs_nsecs_value(secs: i64, nsecs: u32) -> value_encoding::Result<Self> {
Ok(NaiveDateTimeWrapper::new({
NaiveDateTime::from_timestamp_opt(secs, nsecs).ok_or(
ValueEncodingError::InvalidNaiveDateTimeEncoding(secs, nsecs),
)?
NaiveDateTime::from_timestamp_opt(secs, nsecs)
.ok_or_else(|| ValueEncodingError::InvalidNaiveDateTimeEncoding(secs, nsecs))?
}))
}

Expand Down
2 changes: 0 additions & 2 deletions src/compute/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

#![feature(trait_alias)]
#![feature(binary_heap_drain_sorted)]
#![feature(generic_associated_types)]
#![feature(let_else)]
#![feature(generators)]
#![feature(type_alias_impl_trait)]
#![cfg_attr(coverage, feature(no_coverage))]
Expand Down
2 changes: 1 addition & 1 deletion src/connector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#![feature(stmt_expr_attributes)]
#![feature(box_patterns)]
#![feature(trait_alias)]
#![feature(generic_associated_types)]
#![feature(binary_heap_drain_sorted)]
#![feature(lint_reasons)]
#![feature(once_cell)]
#![feature(result_option_inspect)]
#![feature(let_chains)]

pub mod aws_utils;
pub mod error;
Expand Down
9 changes: 7 additions & 2 deletions src/ctl/src/cmd_impl/hummock/list_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::ops::Bound;

use bytes::{Buf, BufMut, BytesMut};
use risingwave_common::catalog::TableId;
use risingwave_hummock_sdk::key::next_key;
Expand All @@ -30,9 +32,12 @@ pub async fn list_kv(epoch: u64, table_id: u32) -> anyhow::Result<()> {
let mut buf = BytesMut::with_capacity(5);
buf.put_u8(b't');
buf.put_u32(table_id);
let range = buf.to_vec()..next_key(buf.to_vec().as_slice());
let range = (
Bound::Included(buf.to_vec()),
Bound::Excluded(next_key(buf.to_vec().as_slice())),
);
hummock
.scan::<_, Vec<u8>>(
.scan(
None,
range,
None,
Expand Down
4 changes: 1 addition & 3 deletions src/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@

#![allow(rustdoc::private_intra_doc_links)]
#![feature(trait_alias)]
#![feature(generic_associated_types)]
#![feature(binary_heap_drain_sorted)]
#![feature(binary_heap_into_iter_sorted)]
#![feature(is_sorted)]
#![feature(backtrace)]
#![feature(fn_traits)]
#![feature(assert_matches)]
#![feature(let_else)]
#![feature(let_chains)]
#![feature(lint_reasons)]
#![feature(type_alias_impl_trait)]
#![feature(generators)]
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/planner_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(label_break_value)]
#![feature(let_chains)]
#![allow(clippy::derive_partial_eq_without_eq)]
//! Data-driven tests.

Expand Down
3 changes: 1 addition & 2 deletions src/frontend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
#![feature(negative_impls)]
#![feature(generators)]
#![feature(proc_macro_hygiene, stmt_expr_attributes)]
#![feature(let_else)]
#![feature(trait_alias)]
#![feature(drain_filter)]
#![feature(if_let_guard)]
#![feature(let_chains)]
#![feature(assert_matches)]
#![feature(map_first_last)]
#![feature(lint_reasons)]
#![feature(box_patterns)]
#![feature(once_cell)]
Expand Down
3 changes: 0 additions & 3 deletions src/frontend/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ impl FrontendEnv {
}

/// Get a reference to the frontend env's catalog writer.
#[expect(clippy::explicit_auto_deref)]
pub fn catalog_writer(&self) -> &dyn CatalogWriter {
&*self.catalog_writer
}
Expand All @@ -377,7 +376,6 @@ impl FrontendEnv {
}

/// Get a reference to the frontend env's user info writer.
#[expect(clippy::explicit_auto_deref)]
pub fn user_info_writer(&self) -> &dyn UserInfoWriter {
&*self.user_info_writer
}
Expand All @@ -395,7 +393,6 @@ impl FrontendEnv {
self.worker_node_manager.clone()
}

#[expect(clippy::explicit_auto_deref)]
pub fn meta_client(&self) -> &dyn FrontendMetaClient {
&*self.meta_client
}
Expand Down
2 changes: 1 addition & 1 deletion src/meta/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl std::fmt::Debug for MetaError {

write!(f, "{}", self.inner)?;
writeln!(f)?;
if let Some(backtrace) = self.inner.backtrace() {
if let Some(backtrace) = (&self.inner as &dyn Error).request_ref::<Backtrace>() {
write!(f, " backtrace of inner error:\n{}", backtrace)?;
} else {
write!(f, " backtrace of `MetaError`:\n{}", self.backtrace)?;
Expand Down
18 changes: 11 additions & 7 deletions src/meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,28 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(backtrace)]
#![expect(clippy::iter_kv_map, reason = "FIXME: fix later")]
#![expect(
clippy::or_fun_call,
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

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

👀

reason = "https://github.com/rust-lang/rust-clippy/issues/8574"
)]
#![allow(clippy::derive_partial_eq_without_eq)]
#![feature(trait_alias)]
#![feature(generic_associated_types)]
#![feature(binary_heap_drain_sorted)]
#![feature(option_result_contains)]
#![feature(let_else)]
#![feature(type_alias_impl_trait)]
#![feature(map_first_last)]
#![feature(drain_filter)]
#![feature(custom_test_frameworks)]
#![feature(lint_reasons)]
#![feature(map_try_insert)]
#![feature(hash_drain_filter)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![feature(btree_drain_filter)]
#![feature(result_option_inspect)]
#![feature(once_cell)]
#![feature(let_chains)]
#![feature(error_generic_member_access)]
#![feature(provide_any)]
#![cfg_attr(coverage, feature(no_coverage))]
#![test_runner(risingwave_test_runner::test_runner::run_failpont_tests)]

Expand Down Expand Up @@ -188,8 +192,8 @@ pub fn start(opts: MetaNodeOpts) -> Pin<Box<dyn Future<Output = ()> + Send>> {
let barrier_interval =
Duration::from_millis(meta_config.streaming.barrier_interval_ms as u64);
let max_idle_ms = opts.dangerous_max_idle_secs.unwrap_or(0) * 1000;
let in_flight_barrier_nums = meta_config.streaming.in_flight_barrier_nums as usize;
let checkpoint_frequency = meta_config.streaming.checkpoint_frequency as usize;
let in_flight_barrier_nums = meta_config.streaming.in_flight_barrier_nums;
let checkpoint_frequency = meta_config.streaming.checkpoint_frequency;

tracing::info!("Meta server listening at {}", listen_addr);
let add_info = AddressInfo {
Expand Down