Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


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

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

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ hashbrown = { version = "0.16", features = [
"inline-more",
"nightly",
] }
hashbrown0_14 = { package = "hashbrown", version = "0.14", features = [
"nightly",
] }
hytra = "0.1"
# branch dev_rebase_main_20250325
iceberg = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "8c4a29f2f6ed6f713ffb4b0406cd49c52e0efb6f", features = [
Expand All @@ -177,7 +180,7 @@ itertools = "0.14.0"
jni = { version = "0.21.1", features = ["invocation"] }
jsonbb = "0.1.4"
linkme = { version = "0.3.32", features = ["used_linker"] }
lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "2682b85" }
lru = "0.14"
madsim = "0.2.34"
mixtrics = { version = "0.2", features = ["prometheus"] }
mysql_async = { version = "0.36", features = ["native-tls-tls", "rust_decimal"] }
Expand Down Expand Up @@ -322,10 +325,12 @@ new_without_default = "allow"
# TODO: remove later https://github.com/rust-lang/rust-clippy/issues/12537
# duplicated_attributes = "allow"
# TODO: remove later https://github.com/rust-lang/rust-clippy/issues/12436
mixed_attributes_style = "allow"
#mixed_attributes_style = "allow"
too_long_first_doc_paragraph = "allow"
# TODO: remove later when EnumAsInner, bitfield and EnumTryAs does not fire this warning
double_parens = "allow"
str_to_string = "warn"
string_to_string = "warn"
implicit_clone = "warn"

# TODO: this makes sense, but it's too noisy for now (2025-03-10)
large_enum_variant = "allow"
Expand Down
2 changes: 1 addition & 1 deletion ci/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BUILD_ENV_VERSION=v20250923
BUILD_ENV_VERSION=v20251015
2 changes: 1 addition & 1 deletion ci/rust-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# 3. (optional) **follow the instructions in `lints/README.md`** to update the toolchain and dependencies for lints

[toolchain]
channel = "nightly-2025-06-25"
channel = "nightly-2025-10-10"
4 changes: 2 additions & 2 deletions lints/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 lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "ui/format_error.rs"
# See `README.md` before bumping the version.
# Remember to update the version in `ci/Dockerfile` as well.
[dependencies]
clippy_utils = { git = "https://github.com/risingwavelabs/clippy", rev="ff5af2fc22b4bb813fc7af028f99f58ecea22cd4" }
clippy_utils = { git = "https://github.com/risingwavelabs/clippy", rev="0b9b812ddd1b49a581ae865afde73e7d6365eb8c" }
dylint_linting = "=4.1.0"
itertools = "0.14"

Expand Down
2 changes: 1 addition & 1 deletion lints/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See `README.md` before bumping the version.

[toolchain]
channel = "nightly-2025-06-25"
channel = "nightly-2025-10-10"
components = ["llvm-tools-preview", "rustc-dev"]
2 changes: 1 addition & 1 deletion lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#![feature(rustc_private)]
#![feature(let_chains)]

#![warn(unused_extern_crates)]

extern crate rustc_ast;
Expand Down
4 changes: 2 additions & 2 deletions lints/src/utils/format_args_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use clippy_utils::source::snippet_opt;
use itertools::Itertools;
use rustc_ast::{Crate, Expr, ExprKind, FormatArgs};
use rustc_data_structures::fx::FxHashMap;
use rustc_lexer::{TokenKind, tokenize};
use rustc_lexer::{FrontmatterAllowed, TokenKind, tokenize};
use rustc_lint::{EarlyContext, EarlyLintPass};
use rustc_session::impl_lint_pass;
use rustc_span::{Span, hygiene};
Expand Down Expand Up @@ -104,7 +104,7 @@ fn has_span_from_proc_macro(cx: &EarlyContext<'_>, args: &FormatArgs) -> bool {
let Some(snippet) = snippet_opt(cx, between_span) else {
return true;
};
for token in tokenize(&snippet) {
for token in tokenize(&snippet, FrontmatterAllowed::No) {
match token.kind {
TokenKind::LineComment { .. }
| TokenKind::BlockComment { .. }
Expand Down
2 changes: 1 addition & 1 deletion src/batch/executors/benches/hash_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn create_hash_agg_executor(
);
let input_schema = input.schema();

let agg_calls = vec![create_agg_call(
let agg_calls = [create_agg_call(
input_schema,
agg_type,
arg_columns,
Expand Down
4 changes: 2 additions & 2 deletions src/batch/executors/src/executor/generic_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ impl BoxedExecutorBuilder for GenericExchangeExecutorBuilder {
let sequential = node.get_sequential();

ensure!(!node.get_sources().is_empty());
let proto_sources: Vec<PbExchangeSource> = node.get_sources().to_vec();
let proto_sources: Vec<PbExchangeSource> = node.get_sources().clone();
let source_creators =
vec![DefaultCreateSource::new(source.context().client_pool()); proto_sources.len()];

let input_schema: Vec<NodeField> = node.get_input_schema().to_vec();
let input_schema: Vec<NodeField> = node.get_input_schema().clone();
let fields = input_schema.iter().map(Field::from).collect::<Vec<Field>>();
Ok(Box::new(ExchangeExecutor {
proto_sources,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl BoxedExecutorBuilder for DistributedLookupJoinExecutorBuilder {
let table_desc = distributed_lookup_join_node.get_inner_side_table_desc()?;
let inner_side_column_ids = distributed_lookup_join_node
.get_inner_side_column_ids()
.to_vec();
.clone();

let inner_side_schema = Schema {
fields: inner_side_column_ids
Expand Down Expand Up @@ -163,7 +163,7 @@ impl BoxedExecutorBuilder for DistributedLookupJoinExecutorBuilder {
.map(|&i| inner_side_schema.fields[i].data_type.clone())
.collect_vec();

let null_safe = distributed_lookup_join_node.get_null_safe().to_vec();
let null_safe = distributed_lookup_join_node.get_null_safe().clone();

let chunk_size = source.context().get_config().developer.chunk_size;

Expand Down
4 changes: 2 additions & 2 deletions src/batch/executors/src/executor/join/local_lookup_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl BoxedExecutorBuilder for LocalLookupJoinExecutorBuilder {
let outer_side_data_types = outer_side_input.schema().data_types();

let table_desc = lookup_join_node.get_inner_side_table_desc()?;
let inner_side_column_ids = lookup_join_node.get_inner_side_column_ids().to_vec();
let inner_side_column_ids = lookup_join_node.get_inner_side_column_ids().clone();

let inner_side_schema = Schema {
fields: inner_side_column_ids
Expand Down Expand Up @@ -362,7 +362,7 @@ impl BoxedExecutorBuilder for LocalLookupJoinExecutorBuilder {
.map(|&i| inner_side_schema.fields[i].data_type.clone())
.collect_vec();

let null_safe = lookup_join_node.get_null_safe().to_vec();
let null_safe = lookup_join_node.get_null_safe().clone();

let vnode_mapping = lookup_join_node
.get_inner_side_vnode_mapping()
Expand Down
2 changes: 1 addition & 1 deletion src/batch/executors/src/executor/merge_sort_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl BoxedExecutorBuilder for MergeSortExchangeExecutorBuilder {
let column_orders = Arc::new(column_orders);

let exchange_node = sort_merge_node.get_exchange()?;
let proto_sources: Vec<PbExchangeSource> = exchange_node.get_sources().to_vec();
let proto_sources: Vec<PbExchangeSource> = exchange_node.get_sources().clone();
let source_creators =
vec![DefaultCreateSource::new(source.context().client_pool()); proto_sources.len()];
ensure!(!exchange_node.get_sources().is_empty());
Expand Down
1 change: 0 additions & 1 deletion src/batch/executors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#![feature(proc_macro_hygiene, stmt_expr_attributes)]
#![feature(iterator_try_collect)]
#![recursion_limit = "256"]
#![feature(let_chains)]
#![feature(int_roundings)]
#![feature(allocator_api)]
#![feature(impl_trait_in_assoc_type)]
Expand Down
1 change: 0 additions & 1 deletion src/batch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#![feature(proc_macro_hygiene, stmt_expr_attributes)]
#![feature(iterator_try_collect)]
#![recursion_limit = "256"]
#![feature(let_chains)]
#![feature(int_roundings)]
#![feature(allocator_api)]
#![feature(impl_trait_in_assoc_type)]
Expand Down
1 change: 0 additions & 1 deletion src/bench/sink_bench/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#![feature(coroutines)]
#![feature(proc_macro_hygiene)]
#![feature(stmt_expr_attributes)]
#![feature(let_chains)]
#![recursion_limit = "256"]

use core::str::FromStr;
Expand Down
2 changes: 0 additions & 2 deletions src/cmd_all/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(let_chains)]

mod common;
mod standalone;

Expand Down
1 change: 1 addition & 0 deletions src/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ foyer = { workspace = true }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
governor = { workspace = true }
hashbrown = { workspace = true }
hashbrown0_14 = { workspace = true }
Copy link
Member

Choose a reason for hiding this comment

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

What about specifying this in the workspace-config crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't look like a good idea.

The hashbrown 0.14.5 can only compile in nightly toolchain with its nightly feature is enabled. When doing feature unification to resolve the features enabled in each crate, cargo only include the crate usage when a crate include it in the dependency lists and explicitly use it. Though we have added the hashbrown 0.14.5 in the workspace-config crate, and even have used it with use hashbrown0_14 as _; in the lib.rs, the nightly feature will only be enabled when the crate we are building has included workspace-config in the dependency list. However, the workspace-config is only depended by risingwave_cmd, which means if we build solely on other crates, such as running a test on risingwave_connector, the nightly feature of hashbrown won't be enabled, and then we cannot pass the compile.

To resolve this, we will have to directly or indirectly include workspace-config in all crates that want to be built independently, and the crate risingwave_common is a good common crate that is directly or indirectly depended by most crates. If so, it's better to directly include hashbrown 0.14.5 in risingwave_common, like what we do currently in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Make sense. This somehow reminds me of the workspace-hack crate. I also encountered this in #23453.

hex = "0.4.3"
http = "1"
humantime = "2.2"
Expand Down
18 changes: 10 additions & 8 deletions src/common/benches/bench_lru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ use lru::LruCache;
use risingwave_common::lru::LruCache as RwLruCache;
use risingwave_common::sequence::SEQUENCE_GLOBAL;

fn lru(loops: usize, evict_ratio: u64) -> (usize, Duration) {
fn lru(loops: usize, _evict_ratio: u64) -> (usize, Duration) {
let mut lru = LruCache::unbounded();
let mut evicted = 0;
let evicted = 0;
let now = Instant::now();
for i in 0..loops as u64 {
if i % evict_ratio == 0 && i != 0 {
lru.update_epoch(i);
while lru.pop_lru_by_epoch(i).is_some() {
evicted += 1;
}
}
// Changed back to use the official lru-rs crate, so there is no update_epoch anymore.
// Keep the code for reference.
// if i % evict_ratio == 0 && i != 0 {
// lru.update_epoch(i);
// while lru.pop_lru_by_epoch(i).is_some() {
// evicted += 1;
// }
// }
lru.put(i, i);
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/benches/bench_sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn atomic_skip(loops: usize, atomic: Arc<AtomicUsize>, skip: usize) -> Duration
for _ in 0..loops {
cnt += 1;
let _ = cnt;
if cnt % skip == 0 {
if cnt.is_multiple_of(skip) {
let _ = atomic.fetch_add(skip, Ordering::Relaxed);
} else {
let _ = atomic.load(Ordering::Relaxed);
Expand Down
1 change: 0 additions & 1 deletion src/common/estimate_size/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#![feature(allocator_api)]
#![feature(btree_cursors)]
#![feature(btree_extract_if)]

pub mod collections;

Expand Down
2 changes: 1 addition & 1 deletion src/common/src/array/struct_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ mod tests {

let mut builder = StructArrayBuilder::with_type(
0,
DataType::Struct(StructType::unnamed(fields.to_vec())),
DataType::Struct(StructType::unnamed(fields.clone())),
);
builder.append(Some(StructRef::ValueRef { val: &lhs }));
builder.append(Some(StructRef::ValueRef { val: &rhs }));
Expand Down
Loading
Loading