From 3de6b44e234d087a4e6265bb8a1712d1ff044ecd Mon Sep 17 00:00:00 2001 From: Dom Date: Wed, 11 Aug 2021 20:48:51 +0100 Subject: [PATCH 1/3] build: use new rustdoc lint name (#2261) * fix: nocache feature code rot The MBChunk::snapshot code when using the "nocache" option no longer compiles - this commit updates it to match the not(nocache) code. * build: use updated broken_intra_doc_links name The broken_intra_doc_links lint was renamed rustdoc::broken_intra_doc_links https://doc.rust-lang.org/rustdoc/lints.html --- arrow_util/src/lib.rs | 2 +- data_types/src/lib.rs | 2 +- datafusion_util/src/lib.rs | 2 +- generated_types/src/lib.rs | 2 +- google_types/src/lib.rs | 2 +- grpc-router/src/lib.rs | 2 +- influxdb2_client/src/lib.rs | 2 +- influxdb_iox_client/src/lib.rs | 2 +- influxdb_line_protocol/src/lib.rs | 2 +- influxdb_tsm/src/lib.rs | 2 +- internal_types/src/lib.rs | 2 +- lifecycle/src/lib.rs | 2 +- logfmt/src/lib.rs | 2 +- mem_qe/src/lib.rs | 2 +- metrics/src/lib.rs | 2 +- mutable_buffer/src/chunk.rs | 5 +---- mutable_buffer/src/lib.rs | 2 +- object_store/src/lib.rs | 2 +- packers/src/lib.rs | 2 +- panic_logging/src/lib.rs | 2 +- parquet_file/src/lib.rs | 2 +- persistence_windows/src/lib.rs | 2 +- query/src/lib.rs | 2 +- read_buffer/src/lib.rs | 2 +- server/src/lib.rs | 2 +- src/main.rs | 2 +- test_helpers/src/lib.rs | 2 +- tracker/src/lib.rs | 2 +- trogging/src/lib.rs | 2 +- write_buffer/src/lib.rs | 2 +- 30 files changed, 30 insertions(+), 33 deletions(-) diff --git a/arrow_util/src/lib.rs b/arrow_util/src/lib.rs index cd03219737..c1f4dd1e38 100644 --- a/arrow_util/src/lib.rs +++ b/arrow_util/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![allow(clippy::clone_on_ref_ptr)] pub mod bitset; diff --git a/data_types/src/lib.rs b/data_types/src/lib.rs index f222aad0ff..66d8074ad5 100644 --- a/data_types/src/lib.rs +++ b/data_types/src/lib.rs @@ -2,7 +2,7 @@ //! servers including replicated data, rules for how data is split up and //! queried, and what gets stored in the write buffer database. -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/datafusion_util/src/lib.rs b/datafusion_util/src/lib.rs index 258193f81e..3fd1d6d767 100644 --- a/datafusion_util/src/lib.rs +++ b/datafusion_util/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![allow(clippy::clone_on_ref_ptr)] use std::sync::Arc; diff --git a/generated_types/src/lib.rs b/generated_types/src/lib.rs index aadcfdbb72..830944b6e0 100644 --- a/generated_types/src/lib.rs +++ b/generated_types/src/lib.rs @@ -1,7 +1,7 @@ // This crate deliberately does not use the same linting rules as the other // crates because of all the generated code it contains that we don't have much // control over. -#![deny(broken_intra_doc_links, rustdoc::bare_urls)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls)] /// This module imports the generated protobuf code into a Rust module /// hierarchy that matches the namespace hierarchy of the protobuf diff --git a/google_types/src/lib.rs b/google_types/src/lib.rs index fad6c5cd9e..13d3fad7e2 100644 --- a/google_types/src/lib.rs +++ b/google_types/src/lib.rs @@ -1,7 +1,7 @@ // This crate deliberately does not use the same linting rules as the other // crates because of all the generated code it contains that we don't have much // control over. -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![allow( unused_imports, clippy::redundant_static_lifetimes, diff --git a/grpc-router/src/lib.rs b/grpc-router/src/lib.rs index 9397d393cb..2384c086a9 100644 --- a/grpc-router/src/lib.rs +++ b/grpc-router/src/lib.rs @@ -166,7 +166,7 @@ //! # } //! ``` -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/influxdb2_client/src/lib.rs b/influxdb2_client/src/lib.rs index 3572a06e7f..c044609305 100644 --- a/influxdb2_client/src/lib.rs +++ b/influxdb2_client/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/influxdb_iox_client/src/lib.rs b/influxdb_iox_client/src/lib.rs index 468bf03992..3edafc1449 100644 --- a/influxdb_iox_client/src/lib.rs +++ b/influxdb_iox_client/src/lib.rs @@ -1,6 +1,6 @@ //! An InfluxDB IOx API client. #![deny( - broken_intra_doc_links, + rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms, missing_debug_implementations, diff --git a/influxdb_line_protocol/src/lib.rs b/influxdb_line_protocol/src/lib.rs index 7284587e78..a6057cef97 100644 --- a/influxdb_line_protocol/src/lib.rs +++ b/influxdb_line_protocol/src/lib.rs @@ -7,7 +7,7 @@ //! However, this implementation uses a nom combinator based parser //! rather than attempting to port the imperative Go logic. -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/influxdb_tsm/src/lib.rs b/influxdb_tsm/src/lib.rs index cff73156fe..89a2c94656 100644 --- a/influxdb_tsm/src/lib.rs +++ b/influxdb_tsm/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/internal_types/src/lib.rs b/internal_types/src/lib.rs index 2e6114504f..39b2160687 100644 --- a/internal_types/src/lib.rs +++ b/internal_types/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/lifecycle/src/lib.rs b/lifecycle/src/lib.rs index 68be41b25c..03abc26406 100644 --- a/lifecycle/src/lib.rs +++ b/lifecycle/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/logfmt/src/lib.rs b/logfmt/src/lib.rs index 953e01730c..9d00fb6bed 100644 --- a/logfmt/src/lib.rs +++ b/logfmt/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] use observability_deps::{ tracing::{ diff --git a/mem_qe/src/lib.rs b/mem_qe/src/lib.rs index 8c36adb3d3..8a3c15a5a4 100644 --- a/mem_qe/src/lib.rs +++ b/mem_qe/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![allow(clippy::type_complexity)] pub mod adapter; pub mod column; diff --git a/metrics/src/lib.rs b/metrics/src/lib.rs index eb986654e9..74da5c912c 100644 --- a/metrics/src/lib.rs +++ b/metrics/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/mutable_buffer/src/chunk.rs b/mutable_buffer/src/chunk.rs index 109e134acf..6f23c8ff46 100644 --- a/mutable_buffer/src/chunk.rs +++ b/mutable_buffer/src/chunk.rs @@ -142,10 +142,7 @@ impl MBChunk { /// Returns a queryable snapshot of this chunk #[cfg(feature = "nocache")] pub fn snapshot(&self) -> Arc { - Arc::new(ChunkSnapshot::new( - self, - self.metrics.memory_bytes.clone_empty(), - )) + Arc::new(ChunkSnapshot::new(self)) } /// Return the name of the table in this chunk diff --git a/mutable_buffer/src/lib.rs b/mutable_buffer/src/lib.rs index b8798c2958..3486693fac 100644 --- a/mutable_buffer/src/lib.rs +++ b/mutable_buffer/src/lib.rs @@ -50,7 +50,7 @@ //! is done on a per-Chunk basis, so that as soon as the chunk is //! closed the corresponding dictionary also becomes immutable -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/object_store/src/lib.rs b/object_store/src/lib.rs index de0a695f0b..5cbce7de7b 100644 --- a/object_store/src/lib.rs +++ b/object_store/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/packers/src/lib.rs b/packers/src/lib.rs index 5b38498f10..85fa58ae38 100644 --- a/packers/src/lib.rs +++ b/packers/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/panic_logging/src/lib.rs b/panic_logging/src/lib.rs index 006968cb7e..fd1176a125 100644 --- a/panic_logging/src/lib.rs +++ b/panic_logging/src/lib.rs @@ -1,7 +1,7 @@ //! Custom panic hook that sends the panic information to a tracing //! span -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/parquet_file/src/lib.rs b/parquet_file/src/lib.rs index 630c884a45..e09d53eefb 100644 --- a/parquet_file/src/lib.rs +++ b/parquet_file/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/persistence_windows/src/lib.rs b/persistence_windows/src/lib.rs index 3e65756e4f..d5bc0ba51f 100644 --- a/persistence_windows/src/lib.rs +++ b/persistence_windows/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/query/src/lib.rs b/query/src/lib.rs index 535549df53..5a115ae9ab 100644 --- a/query/src/lib.rs +++ b/query/src/lib.rs @@ -1,5 +1,5 @@ //! Contains the IOx query engine -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/read_buffer/src/lib.rs b/read_buffer/src/lib.rs index 11fa7fca90..1a2f87a3eb 100644 --- a/read_buffer/src/lib.rs +++ b/read_buffer/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn(clippy::clone_on_ref_ptr, clippy::use_self)] #![allow(dead_code, clippy::too_many_arguments)] mod chunk; diff --git a/server/src/lib.rs b/server/src/lib.rs index cebe1924e3..58732aa8c3 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -59,7 +59,7 @@ //! └────────────┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ //! ``` -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/src/main.rs b/src/main.rs index debd62edf7..e0ee44f420 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ //! Entrypoint of InfluxDB IOx binary -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/test_helpers/src/lib.rs b/test_helpers/src/lib.rs index 856141eb01..d8d5b0652e 100644 --- a/test_helpers/src/lib.rs +++ b/test_helpers/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/tracker/src/lib.rs b/tracker/src/lib.rs index 4f1f8ff020..bf977b7656 100644 --- a/tracker/src/lib.rs +++ b/tracker/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_debug_implementations, clippy::explicit_iter_loop, diff --git a/trogging/src/lib.rs b/trogging/src/lib.rs index d9503840bc..41ae02638e 100644 --- a/trogging/src/lib.rs +++ b/trogging/src/lib.rs @@ -1,6 +1,6 @@ //! Log and trace initialization and setup -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, diff --git a/write_buffer/src/lib.rs b/write_buffer/src/lib.rs index 9e9472940a..c17a4c9869 100644 --- a/write_buffer/src/lib.rs +++ b/write_buffer/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, missing_debug_implementations, From 7d105e9229f8b436071b5afb2adefb5904cf24b4 Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Thu, 12 Aug 2021 09:30:54 +0200 Subject: [PATCH 2/3] docs: fix warnings --- server/src/db/load.rs | 2 +- src/print_cpu.rs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/db/load.rs b/server/src/db/load.rs index cb76fa4e61..0db74ecec5 100644 --- a/server/src/db/load.rs +++ b/server/src/db/load.rs @@ -153,7 +153,7 @@ pub async fn create_preserved_catalog( /// All input required to create an empty [`Loader`] #[derive(Debug)] -pub struct LoaderEmptyInput { +struct LoaderEmptyInput { domain: ::metrics::Domain, metrics_registry: Arc<::metrics::MetricRegistry>, metric_labels: Vec, diff --git a/src/print_cpu.rs b/src/print_cpu.rs index 9bc3cc3003..3258494d29 100644 --- a/src/print_cpu.rs +++ b/src/print_cpu.rs @@ -1,8 +1,9 @@ #![recursion_limit = "512"] -/// Prints what CPU features are used by the compiler by default -/// Script from -/// https://stackoverflow.com/questions/65156743/what-target-features-uses-rustc-by-default -/// https://gist.github.com/AngelicosPhosphoros/4f8c9f08656e0812f4ed3560e53bd600 +/// Prints what CPU features are used by the compiler by default. +/// +/// Script from: +/// - +/// - // This script prints all cpu features which active in this build. // There are 3 steps in usage of script: From 34a1c1674fa414f74c499ee9f444b80fe5b858ae Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 12 Aug 2021 04:57:12 -0400 Subject: [PATCH 3/3] chore: remove unused dependency (#2247) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- Cargo.lock | 1 - server/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9c72693dc..5564c2f7d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3874,7 +3874,6 @@ dependencies = [ "serde_json", "snafu", "snap", - "tempfile", "test_helpers", "tikv-jemalloc-ctl", "tokio", diff --git a/server/Cargo.toml b/server/Cargo.toml index c331be47bf..8caab9bd17 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -45,7 +45,6 @@ serde = "1.0" serde_json = "1.0" snafu = "0.6" snap = "1.0.0" -tempfile = "3.1.0" tikv-jemalloc-ctl = "0.4.0" tokio = { version = "1.0", features = ["macros", "time"] } tokio-util = { version = "0.6.3" }