diff --git a/Cargo.lock b/Cargo.lock index b6601d5b0c74..03807f8f3c6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7351,9 +7351,9 @@ dependencies = [ [[package]] name = "simd-json" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3375b6c3d8c048ba09c8b4b6c3f1d3f35e06b71db07d231c323943a949e1b8" +checksum = "1663db38e6e50038d4de020667c364490d43473ad6d073822a6af6576fc343a5" dependencies = [ "halfbrown", "lexical-core", diff --git a/ci/build-ci-image.sh b/ci/build-ci-image.sh index cd902572982d..43bc4cc7a22e 100755 --- a/ci/build-ci-image.sh +++ b/ci/build-ci-image.sh @@ -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=v20230403 +export BUILD_ENV_VERSION=v20230407 export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}" diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index f00119091790..2610bb4ab289 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -34,7 +34,7 @@ services: retries: 5 source-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230403 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230407 depends_on: - mysql - db @@ -42,7 +42,7 @@ services: - ..:/risingwave sink-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230403 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230407 depends_on: - mysql - db @@ -50,12 +50,12 @@ services: - ..:/risingwave rw-build-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230403 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230407 volumes: - ..:/risingwave regress-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230403 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230407 depends_on: db: condition: service_healthy diff --git a/docs/developer-guide.md b/docs/developer-guide.md index 2d517092682c..3b6483f6b639 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -72,7 +72,7 @@ RiseDev is the development mode of RisingWave. To develop RisingWave, you need t * OpenSSL * PostgreSQL (psql) (>= 14.1) * Tmux (>= v3.2a) -* LLVM 15 (For macOS only, to workaround some bugs in macOS toolchain. See https://github.com/risingwavelabs/risingwave/issues/6205). +* LLVM 16 (For macOS only, to workaround some bugs in macOS toolchain. See https://github.com/risingwavelabs/risingwave/issues/6205). To install the dependencies on macOS, run: diff --git a/rust-toolchain b/rust-toolchain index b6f2add311f5..ab84e227e661 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2023-03-01 +nightly-2023-04-07 diff --git a/src/batch/src/executor/mod.rs b/src/batch/src/executor/mod.rs index 130d451a087b..26392f901b22 100644 --- a/src/batch/src/executor/mod.rs +++ b/src/batch/src/executor/mod.rs @@ -237,9 +237,7 @@ mod tests { #[test] fn test_clone_for_plan() { - let plan_node = PlanNode { - ..Default::default() - }; + let plan_node = PlanNode::default(); let task_id = &TaskId { task_id: 1, stage_id: 1, @@ -251,9 +249,7 @@ mod tests { ComputeNodeContext::for_test(), to_committed_batch_query_epoch(u64::MAX), ); - let child_plan = &PlanNode { - ..Default::default() - }; + let child_plan = &PlanNode::default(); let cloned_builder = builder.clone_for_plan(child_plan); assert_eq!(builder.task_id, cloned_builder.task_id); } diff --git a/src/cmd_all/src/lib.rs b/src/cmd_all/src/lib.rs index b31ce9f7e57b..60e3bf39d166 100644 --- a/src/cmd_all/src/lib.rs +++ b/src/cmd_all/src/lib.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![feature(once_cell)] +#![feature(lazy_cell)] pub mod playground; pub use playground::*; diff --git a/src/common/src/lib.rs b/src/common/src/lib.rs index 762cae756471..141a950af429 100644 --- a/src/common/src/lib.rs +++ b/src/common/src/lib.rs @@ -23,7 +23,7 @@ #![feature(lint_reasons)] #![feature(generators)] #![feature(map_try_insert)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(error_generic_member_access)] #![feature(provide_any)] #![feature(let_chains)] diff --git a/src/connector/Cargo.toml b/src/connector/Cargo.toml index 8aa77ef2c088..7a485a0ff027 100644 --- a/src/connector/Cargo.toml +++ b/src/connector/Cargo.toml @@ -15,18 +15,26 @@ normal = ["workspace-hack"] [dependencies] anyhow = "1" -apache-avro = { git = "https://github.com/risingwavelabs/avro", branch = "waruto/modify-decimal", features = ["snappy", "zstandard", "bzip", "xz"] } +apache-avro = { git = "https://github.com/risingwavelabs/avro", branch = "waruto/modify-decimal", features = [ + "snappy", + "zstandard", + "bzip", + "xz", +] } async-trait = "0.1" aws-config = { workspace = true } aws-sdk-ec2 = { workspace = true } -aws-sdk-kinesis = { workspace = true } +aws-sdk-kinesis = { workspace = true } aws-sdk-s3 = { workspace = true } aws-smithy-http = { workspace = true } aws-types = { workspace = true } bincode = "1" byteorder = "1" bytes = { version = "1", features = ["serde"] } -chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4", default-features = false, features = [ + "clock", + "std", +] } csv = "1.2" duration-str = "0.5.0" enum-as-inner = "0.5" @@ -49,8 +57,16 @@ prometheus = { version = "0.13", features = ["process"] } prost = { version = "0.11.0", features = ["no-recursion-limit"] } prost-reflect = "0.9.2" protobuf-native = "0.2.1" -pulsar = { version = "4.2", default-features = false, features = ["tokio-runtime", "telemetry", "auth-oauth2"] } -rdkafka = { package = "madsim-rdkafka", version = "=0.2.14-alpha", features = ["cmake-build", "ssl-vendored", "gssapi"] } +pulsar = { version = "4.2", default-features = false, features = [ + "tokio-runtime", + "telemetry", + "auth-oauth2", +] } +rdkafka = { package = "madsim-rdkafka", version = "=0.2.14-alpha", features = [ + "cmake-build", + "ssl-vendored", + "gssapi", +] } reqwest = { version = "0.11", features = ["json"] } risingwave_common = { path = "../common" } risingwave_expr = { path = "../expr" } @@ -61,9 +77,17 @@ serde = { version = "1", features = ["derive", "rc"] } serde_derive = "1" serde_json = "1" serde_with = { version = "2", features = ["json"] } -simd-json = "0.7" +simd-json = "0.8" thiserror = "1" -tokio = { version = "0.2", package = "madsim-tokio", features = ["rt", "rt-multi-thread", "sync", "macros", "time", "signal", "fs"] } +tokio = { version = "0.2", package = "madsim-tokio", features = [ + "rt", + "rt-multi-thread", + "sync", + "macros", + "time", + "signal", + "fs", +] } tokio-retry = "0.3" tokio-stream = "0.1" tokio-util = { version = "0.7", features = ["codec", "io"] } diff --git a/src/connector/src/lib.rs b/src/connector/src/lib.rs index c5d8bd79df45..0fb5a133b56c 100644 --- a/src/connector/src/lib.rs +++ b/src/connector/src/lib.rs @@ -21,7 +21,7 @@ #![feature(trait_alias)] #![feature(binary_heap_drain_sorted)] #![feature(lint_reasons)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(result_option_inspect)] #![feature(let_chains)] #![feature(box_into_inner)] diff --git a/src/expr/macro/src/gen.rs b/src/expr/macro/src/gen.rs index 09c4d3ba753c..c03d18f8b94e 100644 --- a/src/expr/macro/src/gen.rs +++ b/src/expr/macro/src/gen.rs @@ -115,6 +115,10 @@ impl FunctionAttr { let exprs = (0..num_args) .map(|i| format_ident!("e{i}")) .collect::>(); + #[expect( + clippy::redundant_clone, + reason = "false positive https://github.com/rust-lang/rust-clippy/issues/10545" + )] let exprs0 = exprs.clone(); let build_expr = if self.ret == "varchar" && self.user_fn.is_writer_style() { diff --git a/src/expr/macro/src/lib.rs b/src/expr/macro/src/lib.rs index 9e00e6edb650..aadd822dc5c6 100644 --- a/src/expr/macro/src/lib.rs +++ b/src/expr/macro/src/lib.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![feature(lint_reasons)] + use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; use quote::ToTokens; diff --git a/src/expr/src/lib.rs b/src/expr/src/lib.rs index d7f964766c84..18a48bd4437f 100644 --- a/src/expr/src/lib.rs +++ b/src/expr/src/lib.rs @@ -19,7 +19,7 @@ #![feature(lint_reasons)] #![feature(iterator_try_collect)] #![feature(exclusive_range_pattern)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(try_blocks)] mod error; diff --git a/src/frontend/src/lib.rs b/src/frontend/src/lib.rs index bea9a481f19f..3eb65bf62fce 100644 --- a/src/frontend/src/lib.rs +++ b/src/frontend/src/lib.rs @@ -25,7 +25,7 @@ #![feature(assert_matches)] #![feature(lint_reasons)] #![feature(box_patterns)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(result_option_inspect)] #![feature(macro_metavar_expr)] #![feature(slice_internals)] diff --git a/src/frontend/src/optimizer/rule/index_selection_rule.rs b/src/frontend/src/optimizer/rule/index_selection_rule.rs index 7fa0ae97eea0..d31f2c8b88c5 100644 --- a/src/frontend/src/optimizer/rule/index_selection_rule.rs +++ b/src/frontend/src/optimizer/rule/index_selection_rule.rs @@ -103,6 +103,10 @@ impl Rule for IndexSelectionRule { ); let mut final_plan: PlanRef = logical_scan.clone().into(); + #[expect( + clippy::redundant_clone, + reason = "false positive https://github.com/rust-lang/rust-clippy/issues/10545" + )] let mut min_cost = primary_cost.clone(); for index in indexes { diff --git a/src/frontend/src/scheduler/distributed/query.rs b/src/frontend/src/scheduler/distributed/query.rs index c746e8f76697..14105d5cb5d5 100644 --- a/src/frontend/src/scheduler/distributed/query.rs +++ b/src/frontend/src/scheduler/distributed/query.rs @@ -368,9 +368,7 @@ impl QueryRunner { let root_stage_result = QueryResultFetcher::new( root_task_output_id, // Execute in local, so no need to fill meaningful address. - HostAddress { - ..Default::default() - }, + HostAddress::default(), chunk_rx, self.query.query_id.clone(), self.query_execution_info.clone(), diff --git a/src/java_binding/src/lib.rs b/src/java_binding/src/lib.rs index 904ef025a300..de5180ed23ac 100644 --- a/src/java_binding/src/lib.rs +++ b/src/java_binding/src/lib.rs @@ -14,7 +14,7 @@ #![feature(error_generic_member_access)] #![feature(provide_any)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(type_alias_impl_trait)] mod hummock_iterator; diff --git a/src/meta/src/hummock/manager/tests.rs b/src/meta/src/hummock/manager/tests.rs index 3eaa9731dfa2..6322b366fb8d 100644 --- a/src/meta/src/hummock/manager/tests.rs +++ b/src/meta/src/hummock/manager/tests.rs @@ -847,9 +847,7 @@ async fn test_trigger_manual_compaction() { { let option = ManualCompactionOption { level: 6, - key_range: KeyRange { - ..Default::default() - }, + key_range: KeyRange::default(), ..Default::default() }; diff --git a/src/meta/src/lib.rs b/src/meta/src/lib.rs index dcc3cc8acc45..2dc8098898fa 100644 --- a/src/meta/src/lib.rs +++ b/src/meta/src/lib.rs @@ -15,7 +15,6 @@ #![allow(clippy::derive_partial_eq_without_eq)] #![feature(trait_alias)] #![feature(binary_heap_drain_sorted)] -#![feature(option_result_contains)] #![feature(type_alias_impl_trait)] #![feature(drain_filter)] #![feature(custom_test_frameworks)] @@ -25,7 +24,7 @@ #![feature(is_some_and)] #![feature(btree_drain_filter)] #![feature(result_option_inspect)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(let_chains)] #![feature(error_generic_member_access)] #![feature(provide_any)] diff --git a/src/meta/src/rpc/service/hummock_service.rs b/src/meta/src/rpc/service/hummock_service.rs index ac07cb082f77..f99769dd6f26 100644 --- a/src/meta/src/rpc/service/hummock_service.rs +++ b/src/meta/src/rpc/service/hummock_service.rs @@ -299,9 +299,7 @@ where } None => { - option.key_range = KeyRange { - ..Default::default() - } + option.key_range = KeyRange::default(); } } diff --git a/src/meta/src/stream/stream_manager.rs b/src/meta/src/stream/stream_manager.rs index d82007beba32..50ab93e88018 100644 --- a/src/meta/src/stream/stream_manager.rs +++ b/src/meta/src/stream/stream_manager.rs @@ -646,9 +646,7 @@ mod tests { &self, _request: Request, ) -> std::result::Result, Status> { - Ok(Response::new(BarrierCompleteResponse { - ..Default::default() - })) + Ok(Response::new(BarrierCompleteResponse::default())) } async fn wait_epoch_commit( diff --git a/src/object_store/src/lib.rs b/src/object_store/src/lib.rs index 3ecef33bf6cf..4f1233bb627b 100644 --- a/src/object_store/src/lib.rs +++ b/src/object_store/src/lib.rs @@ -14,7 +14,7 @@ #![feature(trait_alias)] #![feature(type_alias_impl_trait)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(lint_reasons)] #![feature(error_generic_member_access)] #![feature(provide_any)] diff --git a/src/sqlparser/tests/sqlparser_common.rs b/src/sqlparser/tests/sqlparser_common.rs index 9d72accda14a..8ac312e0a28b 100644 --- a/src/sqlparser/tests/sqlparser_common.rs +++ b/src/sqlparser/tests/sqlparser_common.rs @@ -1715,9 +1715,7 @@ fn parse_explain_analyze_with_simple_select() { run_explain_analyze( "EXPLAIN SELECT sqrt(id) FROM foo", false, - ExplainOptions { - ..Default::default() - }, + ExplainOptions::default(), ); run_explain_analyze( "EXPLAIN (VERBOSE) SELECT sqrt(id) FROM foo", @@ -1730,9 +1728,7 @@ fn parse_explain_analyze_with_simple_select() { run_explain_analyze( "EXPLAIN ANALYZE SELECT sqrt(id) FROM foo", true, - ExplainOptions { - ..Default::default() - }, + ExplainOptions::default(), ); run_explain_analyze( "EXPLAIN (TRACE) SELECT sqrt(id) FROM foo", diff --git a/src/storage/backup/src/lib.rs b/src/storage/backup/src/lib.rs index ab85d6809521..ab85ea2ef1d7 100644 --- a/src/storage/backup/src/lib.rs +++ b/src/storage/backup/src/lib.rs @@ -15,7 +15,6 @@ #![allow(clippy::derive_partial_eq_without_eq)] #![feature(trait_alias)] #![feature(binary_heap_drain_sorted)] -#![feature(option_result_contains)] #![feature(type_alias_impl_trait)] #![feature(drain_filter)] #![feature(custom_test_frameworks)] @@ -25,7 +24,7 @@ #![feature(is_some_and)] #![feature(btree_drain_filter)] #![feature(result_option_inspect)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(let_chains)] #![feature(error_generic_member_access)] #![feature(provide_any)] diff --git a/src/storage/benches/bench_block_iter.rs b/src/storage/benches/bench_block_iter.rs index 8de5f05b20c2..0b35e89dc0a6 100644 --- a/src/storage/benches/bench_block_iter.rs +++ b/src/storage/benches/bench_block_iter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![feature(once_cell)] +#![feature(lazy_cell)] use std::sync::LazyLock; use bytes::{BufMut, Bytes, BytesMut}; diff --git a/src/storage/hummock_test/src/hummock_storage_tests.rs b/src/storage/hummock_test/src/hummock_storage_tests.rs index 17d1101dccf2..781c1423a27e 100644 --- a/src/storage/hummock_test/src/hummock_storage_tests.rs +++ b/src/storage/hummock_test/src/hummock_storage_tests.rs @@ -428,7 +428,7 @@ async fn test_state_store_sync() { let read_version = hummock_storage.read_version(); - let epoch1: _ = read_version.read().committed().max_committed_epoch() + 1; + let epoch1 = read_version.read().committed().max_committed_epoch() + 1; hummock_storage.init(epoch1); // ingest 16B batch diff --git a/src/storage/src/lib.rs b/src/storage/src/lib.rs index 93adf69ba934..3560124dbf5f 100644 --- a/src/storage/src/lib.rs +++ b/src/storage/src/lib.rs @@ -35,7 +35,7 @@ #![feature(is_sorted)] #![feature(btree_drain_filter)] #![feature(exact_size_is_empty)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![cfg_attr(coverage, feature(no_coverage))] #![recursion_limit = "256"] #![feature(error_generic_member_access)] diff --git a/src/storage/src/memory.rs b/src/storage/src/memory.rs index 115ee19aac99..0a7fb2e4a4c2 100644 --- a/src/storage/src/memory.rs +++ b/src/storage/src/memory.rs @@ -636,9 +636,7 @@ impl StateStore for RangeKvStateStore { async move { self.inner.flush()?; // memory backend doesn't need to push to S3, so this is a no-op - Ok(SyncResult { - ..Default::default() - }) + Ok(SyncResult::default()) } } diff --git a/src/stream/src/lib.rs b/src/stream/src/lib.rs index 00ce17912c3f..c404f6aaec17 100644 --- a/src/stream/src/lib.rs +++ b/src/stream/src/lib.rs @@ -15,7 +15,6 @@ #![allow(rustdoc::private_intra_doc_links)] #![allow(clippy::derive_partial_eq_without_eq)] #![allow(incomplete_features)] // for feature(return_position_impl_trait_in_trait) -#![feature(binary_heap_retain)] #![feature(iterator_try_collect)] #![feature(trait_alias)] #![feature(type_alias_impl_trait)] @@ -34,7 +33,7 @@ #![feature(result_option_inspect)] #![feature(never_type)] #![feature(btreemap_alloc)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(error_generic_member_access)] #![feature(provide_any)] #![feature(btree_drain_filter)] diff --git a/src/tests/simulation/src/lib.rs b/src/tests/simulation/src/lib.rs index 5d41b5094502..8e0bd81ad6ee 100644 --- a/src/tests/simulation/src/lib.rs +++ b/src/tests/simulation/src/lib.rs @@ -15,7 +15,7 @@ #![cfg(madsim)] #![feature(trait_alias)] #![feature(lint_reasons)] -#![feature(once_cell)] +#![feature(lazy_cell)] pub mod client; pub mod cluster; diff --git a/src/tests/simulation/src/main.rs b/src/tests/simulation/src/main.rs index 06689ef3b7dd..7d2da45f9169 100644 --- a/src/tests/simulation/src/main.rs +++ b/src/tests/simulation/src/main.rs @@ -13,7 +13,7 @@ // limitations under the License. #![cfg_attr(not(madsim), allow(dead_code))] -#![feature(once_cell)] +#![feature(lazy_cell)] use std::path::PathBuf; diff --git a/src/tests/sqlsmith/src/lib.rs b/src/tests/sqlsmith/src/lib.rs index 6de404a09bb5..68008ad535fc 100644 --- a/src/tests/sqlsmith/src/lib.rs +++ b/src/tests/sqlsmith/src/lib.rs @@ -14,7 +14,7 @@ #![feature(let_chains)] #![feature(if_let_guard)] -#![feature(once_cell)] +#![feature(lazy_cell)] #![feature(box_patterns)] use rand::prelude::SliceRandom; diff --git a/src/utils/pgwire/src/lib.rs b/src/utils/pgwire/src/lib.rs index 19a4d3f5a6df..3ee3dce7f708 100644 --- a/src/utils/pgwire/src/lib.rs +++ b/src/utils/pgwire/src/lib.rs @@ -13,7 +13,7 @@ // limitations under the License. #![feature(io_error_other)] -#![feature(lint_reasons, once_cell)] +#![feature(lint_reasons)] #![feature(trait_alias)] #![feature(result_option_inspect)] #![feature(iterator_try_collect)] diff --git a/src/utils/task_stats_alloc/src/lib.rs b/src/utils/task_stats_alloc/src/lib.rs index 156708c84f11..655c4a205fab 100644 --- a/src/utils/task_stats_alloc/src/lib.rs +++ b/src/utils/task_stats_alloc/src/lib.rs @@ -14,7 +14,6 @@ #![feature(allocator_api)] #![feature(lint_reasons)] -#![feature(atomic_mut_ptr)] use std::alloc::{GlobalAlloc, Layout, System}; use std::future::Future;