1#[allow(dead_code)]
19mod catalog;
20#[allow(dead_code)]
21mod purger;
22mod searcher;
23mod task;
24#[allow(dead_code)]
25mod version;
26mod writer;
27
28use futures::stream::BoxStream;
29pub use searcher::SeriesIndexSearcher;
30use store_api::metric_engine_consts::{
31 DATA_SCHEMA_TABLE_ID_COLUMN_NAME as TABLE_ID_COLUMN,
32 DATA_SCHEMA_TSID_COLUMN_NAME as TSID_COLUMN,
33};
34pub use writer::{
35 SeriesIndexWriter, SeriesIndexWriterMetrics, SeriesIndexWriterOptions, series_index_schema,
36};
37
38use crate::error::Result;
39pub(crate) use crate::series_index::catalog::{delete_catalogs, load_version_control};
40pub(crate) use crate::series_index::purger::{IndexFilePurger, series_index_channel};
41pub(crate) use crate::series_index::task::{SeriesIndexTaskState, spawn_series_index_tasks};
42pub(crate) use crate::series_index::version::{SeriesIndexVersion, SeriesIndexVersionControl};
43
44pub(crate) const MIN_TS_COLUMN: &str = "__series_min_ts";
45pub(crate) const MAX_TS_COLUMN: &str = "__series_max_ts";
46pub(crate) const ROW_COUNT_COLUMN: &str = "__series_row_count";
47pub(crate) const METRIC_SERIES_ID_BATCH_SIZE: usize = 500;
48
49#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
51pub struct MetricSeriesId {
52 pub table_id: u32,
54 pub tsid: u64,
56}
57
58pub type MetricSeriesIdStream = BoxStream<'static, Result<Vec<MetricSeriesId>>>;