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

chore: routine maintenance #4064

Merged
merged 12 commits into from
Feb 8, 2022
622 changes: 355 additions & 267 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 16 additions & 14 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ test = false
[[bin]]
name = "bendctl"
path = "src/bin/bendctl.rs"
doctest = false
test = false

[features]

Expand All @@ -30,30 +32,30 @@ common-meta-raft-store = { path = "../common/meta/raft-store" }
colored = "2.0.0"
comfy-table = "5.0.0"
dirs = "4.0.0"
clap = { version = "3.0.5", features = ["derive", "env"] }
clap_complete = "3.0.2"
clap = { version = "3.0.14", features = ["derive", "env"] }
clap_complete = "3.0.6"
dyn-clone = "1.0.4"
flate2 = "1.0.22"
handlebars = "4.2.0"
handlebars = "4.2.1"
indicatif = "0.16.2"
run_script = "0.9.0"
rustyline = "9.1.2"
futures = "0.3.19"
futures = "0.3.21"
byte-unit = "4.0.13"
num-format = "0.4.0"
fs_extra = "1.2.0"
serde = { version = "1.0.133", features = ["derive"] }
serde_json = "1.0.74"
sha2 = "0.10.0"
sysinfo = "0.22.4"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.78"
sha2 = "0.10.1"
sysinfo = "0.23.0"
tar = "0.4.38"
thiserror = "1.0.30"
ureq = { version = "2.4.0", features = ["json"] }
nix = "0.23.1"
serde_yaml = "0.8.23"
portpicker = "0.1.1"
reqwest = { version = "0.11.8", features = ["json", "native-tls", "multipart", "blocking", "tokio-rustls", "stream"] }
libc = "0.2.112"
reqwest = { version = "0.11.9", features = ["json", "native-tls", "multipart", "blocking", "tokio-rustls", "stream"] }
libc = "0.2.117"
lexical-util = "0.8.1"
async-trait = "0.1.52"
webbrowser = "0.5.5"
Expand All @@ -64,10 +66,10 @@ csv = "1.1.6"
http = "0.2.6"

[dev-dependencies]
tempfile = "3.2.0"
assert_cmd = "2.0.2"
predicates = "2.1.0"
httpmock = "0.6.5"
tempfile = "3.3.0"
assert_cmd = "2.0.4"
predicates = "2.1.1"
httpmock = "0.6.6"

[build-dependencies]
common-building = { path = "../common/building" }
15 changes: 8 additions & 7 deletions cli/src/cmds/clusters/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use clap::ValueHint;
use databend_meta::configs::Config as MetaConfig;
use databend_query::configs::Config as QueryConfig;
use lexical_util::num::AsPrimitive;
use sysinfo::Pid;
use sysinfo::ProcessExt;
use sysinfo::System;
use sysinfo::SystemExt;
Expand Down Expand Up @@ -60,7 +61,7 @@ pub struct LocalBinaryPaths {
async fn reconcile_local_meta(status: &mut Status) -> Result<()> {
let s = System::new_all();
if let Some((_, meta)) = status.get_local_meta_config() {
if meta.pid.is_none() || s.process(meta.pid.unwrap()).is_none() {
if meta.pid.is_none() || s.process(Pid::from(meta.pid.unwrap())).is_none() {
return Err(CliError::Unknown(
"meta service process not found".to_string(),
));
Expand All @@ -75,7 +76,7 @@ async fn reconcile_local_meta(status: &mut Status) -> Result<()> {
async fn reconcile_local_query(status: &mut Status) -> Result<()> {
let s = System::new_all();
for (_, query) in status.get_local_query_configs() {
if query.pid.is_none() || s.process(query.pid.unwrap()).is_none() {
if query.pid.is_none() || s.process(Pid::from(query.pid.unwrap())).is_none() {
return Err(CliError::Unknown(
"query service process not found".to_string(),
));
Expand Down Expand Up @@ -646,13 +647,13 @@ impl CreateCommand {
.await
.expect("cannot stop current services");
let s = System::new_all();
for elem in s.process_by_name("databend-meta") {
for elem in s.processes_by_name("databend-meta") {
elem.kill();
}
for elem in s.process_by_name("databend-query") {
for elem in s.processes_by_name("databend-query") {
elem.kill();
}
for elem in s.process_by_name("databend-dashboard") {
for elem in s.processes_by_name("databend-dashboard") {
elem.kill();
}
}
Expand All @@ -674,14 +675,14 @@ impl CreateCommand {
}
let s = System::new_all();

if !s.process_by_name("databend-meta").is_empty() {
if s.processes_by_name("databend-meta").count() != 0 {
return Err(CliError::Unknown(
"❗ have installed databend-meta process before, please stop them and retry"
.parse()
.unwrap(),
));
}
if !s.process_by_name("databend-query").is_empty() {
if s.processes_by_name("databend-query").count() != 0 {
return Err(CliError::Unknown(
"❗ have installed databend-query process before, please stop them and retry"
.parse()
Expand Down
4 changes: 2 additions & 2 deletions cli/src/cmds/clusters/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ impl ViewCommand {
}
let s = System::new_all();

if s.process_by_name("databend-meta").is_empty() {
if s.processes_by_name("databend-meta").count() == 0 {
return Err(CliError::Unknown(
"❗ cannot find existing meta service on local machine"
.parse()
.unwrap(),
));
}
if s.process_by_name("databend-query").is_empty() {
if s.processes_by_name("databend-query").count() == 0 {
return Err(CliError::Unknown(
"❗ cannot find existing query service on local machine"
.parse()
Expand Down
7 changes: 4 additions & 3 deletions cli/src/cmds/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use nix::unistd::Pid;
use reqwest::Client;
use serde::Deserialize;
use serde::Serialize;
use sysinfo::Pid as SysPid;
use sysinfo::System;
use sysinfo::SystemExt;

Expand Down Expand Up @@ -242,7 +243,7 @@ impl LocalRuntime for LocalDashboardConfig {
}
let s = System::new_all();
let pid = self.pid.unwrap();
return s.process(pid).is_none();
return s.process(SysPid::from(pid)).is_none();
}

async fn verify(&self, _retries: Option<u32>, _duration: Option<Duration>) -> Result<()> {
Expand Down Expand Up @@ -374,7 +375,7 @@ impl LocalRuntime for LocalMetaConfig {
))
.port(),
)
&& s.process(pid).is_none();
&& s.process(SysPid::from(pid)).is_none();
}
// retrieve the configured url for health check
// TODO(zhihanz): http TLS endpoint
Expand Down Expand Up @@ -533,7 +534,7 @@ impl LocalRuntime for LocalQueryConfig {
let pid = self.pid.unwrap();
portpicker::is_free(self.config.query.mysql_handler_port)
&& portpicker::is_free(self.config.query.clickhouse_handler_port)
&& s.process(pid).is_none()
&& s.process(SysPid::from(pid)).is_none()
}
// retrieve the configured url for health check
fn get_health_probe(&self) -> (reqwest::Client, String) {
Expand Down
12 changes: 6 additions & 6 deletions common/ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ sqlparser = { git = "https://github.com/datafuse-extras/sqlparser-rs", rev = "c3

# Crates.io dependencies
async-trait = "0.1.52"
logos = "0.12"
nom = "7"
nom-rule = "0.2"
logos = "0.12.0"
nom = "7.1.0"
nom-rule = "0.2.0"
once_cell = "1.9.0"
thiserror = "1.0.30"
pratt = "0.3"
pratt = "0.3.0"

[dev-dependencies]
goldenfile = "1"
pretty_assertions = "1.0.0"
goldenfile = "1.1.0"
pretty_assertions = "1.1.0"
common-base = { path = "../base" }
8 changes: 4 additions & 4 deletions common/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ common-exception = { path = "../exception" }
# Crates.io dependencies
async-trait = "0.1.52"
ctrlc = { version = "3.2.1", features = ["termination"] }
futures = "0.3.19"
futures = "0.3.21"
pprof = { version = "0.6.2", features = ["flamegraph", "protobuf"] }
tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "signal"] }
tokio = { version = "1.16.1", features = ["full"] }
uuid = { version = "0.8.2", features = ["serde", "v4"] }
serde = { version = "1.0.133", features = ["derive"] }
poem = { version = "1.2.27", features = ["rustls"] }
serde = { version = "1.0.136", features = ["derive"] }
poem = { version = "1.2.53", features = ["rustls"] }
2 changes: 1 addition & 1 deletion common/building/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ doctest = false
test = false

[dependencies]
vergen = "6.0.0"
vergen = "6.0.2"
run_script = "0.9.0"
2 changes: 1 addition & 1 deletion common/cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ walkdir = "2.3.2"
heapsize_ = { package = "heapsize", version = "0.4.2", optional = true }

[dev-dependencies]
tempfile = "3.2.0"
tempfile = "3.3.0"
16 changes: 8 additions & 8 deletions common/clickhouse-srv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,38 @@ common-tracing = {path = "../tracing" }
once_cell = "1.9.0"
thiserror = "1.0.30"
chrono-tz = "0.6.1"
futures = "0.3.19"
futures-core = "0.3.19"
futures-sink = "0.3.19"
futures = "0.3.21"
futures-core = "0.3.21"
futures-sink = "0.3.21"
url= "2.2.2"
byteorder = "1.4.3"
hostname = "0.3.1"
lz4 = "1.23.2"
combine = "4.6.2"
combine = "4.6.3"
pin-project = "1.0.10"
bytes = "1.1.0"
uuid = "0.8.2"
tokio-stream = "0.1.8"
async-trait = "0.1.52"
naive-cityhash = "0.1.0"
naive-cityhash = "0.2.0"

[dependencies.chrono]
version = "0.4.19"
default-features = false
features = [ "std" ]

[dependencies.tokio]
version = "1.15.0"
version = "1.16.1"
default-features = false
features = ["io-util", "net", "sync", "rt-multi-thread", "macros"]
features = ["full"]
optional = true

[dependencies.tokio-util]
version = "0.6.9"
features = ["full"]

[dependencies.futures-util]
version = "0.3.19"
version = "0.3.21"
features = ["sink"]

[dependencies.log]
Expand Down
3 changes: 3 additions & 0 deletions common/clickhouse-srv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// https://github.com/rust-lang/rust-clippy/issues/8334
#![allow(clippy::ptr_arg)]

use std::sync::Arc;

use common_tracing::tracing;
Expand Down
8 changes: 2 additions & 6 deletions common/clickhouse-srv/src/types/column/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,9 @@ pub fn parse_decimal(source: &str) -> Option<(u8, u8, NoBits)> {
};

match nobits {
Some(_) => {
scale = (&source[params_indexes.0 + 1..params_indexes.1])
.parse()
.ok()
}
Some(_) => scale = source[params_indexes.0 + 1..params_indexes.1].parse().ok(),
None => {
for (idx, cell) in (&source[params_indexes.0 + 1..params_indexes.1])
for (idx, cell) in source[params_indexes.0 + 1..params_indexes.1]
.split(',')
.map(|s| s.trim())
.enumerate()
Expand Down
2 changes: 1 addition & 1 deletion common/containers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ common-tracing = {path = "../tracing"}
async-trait = "0.1.52"

[dev-dependencies]
anyhow = "1.0.52"
anyhow = "1.0.53"
8 changes: 4 additions & 4 deletions common/dal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ azure_core = { version = "0.1.0", git = "https://github.com/datafuse-extras/azur
azure_storage = { version = "0.1.0", git = "https://github.com/datafuse-extras/azure-sdk-for-rust.git", rev = "b5bf36b" }
azure_storage_blobs = { version = "0.1.0", git = "https://github.com/datafuse-extras/azure-sdk-for-rust.git", rev = "b5bf36b" }
bytes = "1.1.0"
futures = "0.3.19"
metrics = "0.17.1"
reqwest = "0.11.8"
futures = "0.3.21"
metrics = "0.18.0"
reqwest = "0.11.9"
rusoto_core = "0.47.0"
rusoto_s3 = "0.47.0"
rusoto_sts = "0.47.0"
Expand All @@ -33,7 +33,7 @@ rusoto_credential = "0.47.0"
[dev-dependencies]
common-metrics = { path = "../metrics" }
rand = "0.8.4"
tempfile = "3.2.0"
tempfile = "3.3.0"

[features]
# for unit test only
Expand Down
18 changes: 9 additions & 9 deletions common/dal2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ doctest = false
async-compat = "0.2.1"
async-trait = "0.1.52"
bytes = "1.1.0"
futures = { version="0.3.19", features = ["alloc"]}
tokio = { version = "1.15.0", features = ["full"] }
futures = { version = "0.3.21", features = ["alloc"] }
tokio = { version = "1.16.1", features = ["full"] }
thiserror = "1.0.30"
aws-config = "0.4.0"
aws-types = { version = "0.4.0", features = ["hardcoded-credentials"] }
aws-sdk-s3 = "0.4.0"
aws-endpoint = "0.4.0"
aws-config = "0.6.0"
aws-types = { version = "0.6.0", features = ["hardcoded-credentials"] }
aws-sdk-s3 = "0.6.0"
aws-endpoint = "0.6.0"
http = "0.2.6"
aws-smithy-http = "0.34"
hyper = {version="0.14.16", features=["stream"]}
aws-smithy-http = "0.36.0"
hyper = { version = "0.14.16", features = ["stream"] }
pin-project = "1.0.10"

[dev-dependencies]
uuid = { version = "0.8", features = ["serde", "v4"] }
uuid = { version = "0.8.2", features = ["serde", "v4"] }
2 changes: 1 addition & 1 deletion common/datablocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ comfy-table = "5.0.0"
regex = "1.5.4"

[dev-dependencies]
pretty_assertions = "1.0.0"
pretty_assertions = "1.1.0"
6 changes: 3 additions & 3 deletions common/datavalues/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ common-mem-allocator = { path = "../mem-allocator" }
# Crates.io dependencies
num = "0.4.0"
ordered-float = "2.10.0"
serde = { version = "1.0.133", features = ["derive"] }
serde_json = "1.0.74"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.78"
ahash = "0.7.6"
strength_reduce = "0.2.3"
lexical-core = "0.8.2"
Expand All @@ -35,4 +35,4 @@ simdutf8 = "0.1.3"
seahash = "4.1.0"

[dev-dependencies]
pretty_assertions = "1.0.0"
pretty_assertions = "1.1.0"
1 change: 1 addition & 0 deletions common/datavalues/src/data_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ impl From<&ArrowSchema> for DataSchema {
}
}

#[allow(clippy::needless_borrow)]
impl From<ArrowSchema> for DataSchema {
fn from(a_schema: ArrowSchema) -> Self {
(&a_schema).into()
Expand Down
3 changes: 3 additions & 0 deletions common/datavalues/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
//! insipration for the crate*
//!

// https://github.com/rust-lang/rust-clippy/issues/8334
#![allow(clippy::ptr_arg)]

#[macro_use]
mod macros;

Expand Down
Loading