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

Feature(2.3): add compaction task for delta files #1945

Merged
merged 10 commits into from Feb 1, 2024
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions common/metrics/src/lib.rs
Expand Up @@ -206,7 +206,7 @@ pub static COMPACTION_DURATION: Lazy<HistogramVec> = Lazy::new(|| {
.namespace(NAMESPACE)
.subsystem(TSKV_SUBSYSTEM)
.buckets(linear_buckets(0.0, 300.0, 2400).unwrap()),
&["db", "ts_family", "level"],
&["db", "ts_family", "in_level", "out_level"],
)
.expect("tskv metric cannot be created")
});
Expand All @@ -231,9 +231,15 @@ pub fn incr_compaction_failed() {
COMPACTION_FAILED.inc();
}

pub fn sample_tskv_compaction_duration(db: &str, ts_family: &str, level: &str, delta: f64) {
pub fn sample_tskv_compaction_duration(
db: &str,
ts_family: &str,
in_level: &str,
out_level: &str,
delta: f64,
) {
COMPACTION_DURATION
.with_label_values(&[db, ts_family, level])
.with_label_values(&[db, ts_family, in_level, out_level])
.observe(delta)
}

Expand Down
2 changes: 2 additions & 0 deletions common/models/src/lib.rs
@@ -1,3 +1,5 @@
#![feature(btree_cursors)]

use std::sync::Arc;

pub use datafusion::sql::sqlparser::ast::Value as SqlParserValue;
Expand Down