Merge pull request #8289 from influxdata/cn/cleanups

fix: Clean up some comments and unused imports that were allowed
pull/24376/head
kodiakhq[bot] 2023-07-21 13:27:37 +00:00 committed by GitHub
commit 2a658ec0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 14 deletions

View File

@ -2,9 +2,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration};
use async_trait::async_trait;
use backoff::BackoffConfig;
use data_types::{
NamespaceId, Partition, PartitionHashId, PartitionId, PartitionKey, SequenceNumber, TableId,
};
use data_types::{NamespaceId, Partition, PartitionHashId, PartitionId, PartitionKey, TableId};
use iox_catalog::interface::Catalog;
use observability_deps::tracing::debug;
use parking_lot::Mutex;
@ -222,6 +220,7 @@ mod tests {
// Harmless in tests - saves a bunch of extra vars.
#![allow(clippy::await_holding_lock)]
use data_types::PartitionId;
use iox_catalog::mem::MemCatalog;
use super::*;

View File

@ -6,7 +6,6 @@ use std::{
},
};
use arrow::compute::kernels::partition;
use async_trait::async_trait;
use data_types::{NamespaceId, PartitionKey, TableId};
use futures::{future::Shared, FutureExt};
@ -265,12 +264,11 @@ mod tests {
use assert_matches::assert_matches;
use futures::Future;
use futures::{stream::FuturesUnordered, StreamExt};
use lazy_static::lazy_static;
use test_helpers::timeout::FutureTimeout;
use tokio::sync::{Notify, Semaphore};
use crate::{
buffer_tree::partition::{resolver::mock::MockPartitionProvider, SortKeyState},
buffer_tree::partition::resolver::mock::MockPartitionProvider,
test_util::{
defer_namespace_name_1_sec, defer_table_metadata_1_sec, PartitionDataBuilder,
ARBITRARY_NAMESPACE_ID, ARBITRARY_PARTITION_KEY, ARBITRARY_TABLE_ID,

View File

@ -2,8 +2,6 @@
//!
//! [`PartitionData`]: crate::buffer_tree::partition::PartitionData
#![allow(unused_imports)] // Transition time only.
mod cache;
pub(crate) use cache::*;

View File

@ -49,11 +49,11 @@ where
#[cfg(test)]
mod tests {
use std::{sync::Arc, time::Duration};
use std::sync::Arc;
use super::*;
use crate::{
buffer_tree::partition::{resolver::mock::MockPartitionProvider, SortKeyState},
buffer_tree::partition::resolver::mock::MockPartitionProvider,
test_util::{
defer_namespace_name_1_sec, defer_table_metadata_1_sec, PartitionDataBuilder,
ARBITRARY_NAMESPACE_ID, ARBITRARY_PARTITION_ID, ARBITRARY_PARTITION_KEY,

View File

@ -998,12 +998,8 @@ mod tests {
assert_eq!(m, 1, "tables counter mismatch");
}
/// Assert that multiple writes to a single namespace/table results in a
/// single namespace being created, and matching metrics.
#[tokio::test]
async fn test_partition_iter() {
// Configure the mock partition provider to return a single partition, named
// p1.
let partition_provider = Arc::new(
MockPartitionProvider::default()
.with_partition(