diff --git a/.circleci/config.yml b/.circleci/config.yml index b75dbed4cf..62fc926e59 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -288,7 +288,8 @@ jobs: name: buf lint command: buf lint - # Check that the generated flatbuffers code is up-to-date with the changes in this PR. + # Check that any generated files are is up-to-date with the changes in this PR. + # named "check-flatbuffers" because that name is hardcoded into github checks check-flatbuffers: docker: - image: quay.io/influxdb/rust:ci @@ -296,6 +297,9 @@ jobs: steps: - checkout - rust_components # Regenerating flatbuffers uses rustfmt + - run: + name: Check Query Tests + command: ./query_tests/check-generated.sh - run: name: Check Flatbuffers command: INFLUXDB_IOX_INTEGRATION_LOCAL=1 ./entry/check-flatbuffers.sh diff --git a/Cargo.lock b/Cargo.lock index 400ef7a85b..9f24fa9634 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -467,9 +467,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "cache_loader_async" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c372ea90888b43d6899b58a7831a2f3ea916d95c0042d81255ef4960e1376be" +checksum = "606d302374be324dae8264e59d63952b9d39b5180d85edbfc4a533d4046d5e43" dependencies = [ "futures", "thiserror", @@ -814,6 +814,7 @@ dependencies = [ "regex", "snafu", "test_helpers", + "time 0.1.0", "uuid", ] @@ -1017,6 +1018,7 @@ dependencies = [ "ouroboros", "schema", "snafu", + "time 0.1.0", ] [[package]] @@ -1269,6 +1271,7 @@ dependencies = [ "regex", "serde", "thiserror", + "time 0.1.0", "tonic", "tonic-build", ] @@ -1698,6 +1701,7 @@ dependencies = [ "thiserror", "tikv-jemalloc-ctl", "tikv-jemalloc-sys", + "time 0.1.0", "tokio", "tokio-stream", "tokio-util", @@ -1799,6 +1803,7 @@ dependencies = [ "futures", "parking_lot", "snafu", + "time 0.1.0", "tokio", ] @@ -1972,6 +1977,7 @@ dependencies = [ "hashbrown 0.11.2", "internal_types", "observability_deps", + "time 0.1.0", "tokio", "tracker", ] @@ -2713,6 +2719,7 @@ dependencies = [ "tempfile", "test_helpers", "thrift", + "time 0.1.0", "tokio", "tokio-stream", "uuid", @@ -2795,12 +2802,12 @@ checksum = "d9978962f8a4b158e97447a6d09d2d75e206d2994eff056c894019f362b27142" name = "persistence_windows" version = "0.1.0" dependencies = [ - "chrono", "data_types", "internal_types", "observability_deps", "snafu", "test_helpers", + "time 0.1.0", ] [[package]] @@ -3860,6 +3867,7 @@ dependencies = [ "snafu", "snap", "test_helpers", + "time 0.1.0", "tokio", "tokio-util", "trace", @@ -4982,6 +4990,7 @@ dependencies = [ "observability_deps", "parking_lot", "rdkafka", + "time 0.1.0", "tokio", "uuid", ] diff --git a/Cargo.toml b/Cargo.toml index 24571806f6..7c5e3968ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,6 +111,7 @@ trace_exporters = { path = "trace_exporters" } trace_http = { path = "trace_http" } tracker = { path = "tracker" } trogging = { path = "trogging", default-features = false, features = ["structopt"] } +time = { path = "time" } # Crates.io dependencies, in alphabetical order arrow = { version = "5.5", features = ["prettyprint"] } diff --git a/data_types/Cargo.toml b/data_types/Cargo.toml index b4a33ddb7d..0a729fbc25 100644 --- a/data_types/Cargo.toml +++ b/data_types/Cargo.toml @@ -15,6 +15,7 @@ observability_deps = { path = "../observability_deps" } percent-encoding = "2.1.0" regex = "1.4" snafu = "0.6" +time = { path = "../time" } uuid = { version = "0.8", features = ["v4"] } [dev-dependencies] # In alphabetical order diff --git a/data_types/src/chunk_metadata.rs b/data_types/src/chunk_metadata.rs index 2c56f603c7..2b879cc48f 100644 --- a/data_types/src/chunk_metadata.rs +++ b/data_types/src/chunk_metadata.rs @@ -2,8 +2,8 @@ use std::{convert::TryFrom, num::NonZeroU32, sync::Arc}; use bytes::Bytes; -use chrono::{DateTime, Utc}; use snafu::{ResultExt, Snafu}; +use time::Time; use uuid::Uuid; use crate::partition_metadata::PartitionAddr; @@ -149,17 +149,17 @@ pub struct ChunkSummary { pub row_count: usize, /// The time at which the chunk data was accessed, by a query or a write - pub time_of_last_access: Option>, + pub time_of_last_access: Option