Skip to content

Commit

Permalink
[ISSUE #2424]Bump rand from 0.8.5 to 0.9.0 (#2425)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Jan 30, 2025
1 parent d0a2cdf commit 2bd684e
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 67 deletions.
145 changes: 98 additions & 47 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ serde_json = "1.0"
serde_json_any_key = "2.0.0"
anyhow = "1.0.95"
bytes = "1.9.0"
rand = "0.8"
rand = "0.9.0"
lazy_static = "1.5.0"
num_cpus = "1.16"

Expand Down
2 changes: 1 addition & 1 deletion rocketmq-broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bytes = { workspace = true }
parking_lot.workspace = true

clap = { version = "4.5.27", features = ["derive"] }
rand = "0.8.5"
rand = { workspace = true }

#tools
dirs.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions rocketmq-broker/src/processor/pop_message_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use std::sync::Arc;
use bytes::Bytes;
use bytes::BytesMut;
use cheetah_string::CheetahString;
use rand::thread_rng;
use rand::Rng;
use rocketmq_common::common::config::TopicConfig;
use rocketmq_common::common::constant::consume_init_mode::ConsumeInitMode;
Expand Down Expand Up @@ -489,7 +488,7 @@ where
(subscription_data, None)
};

let randomq = thread_rng().gen_range(0..100);
let randomq = rand::rng().random_range(0..100);
let revive_qid = if request_header.order.unwrap_or(false) {
POP_ORDER_REVIVE_QUEUE
} else {
Expand Down
Loading

0 comments on commit 2bd684e

Please # to comment.