Store also bin lst
This commit is contained in:
@@ -364,6 +364,7 @@ fn prepare_timebin_v02_insert_futs(
|
||||
item.max,
|
||||
item.avg,
|
||||
item.dev,
|
||||
item.lst,
|
||||
);
|
||||
// TODO would be better to count inserts only on completed insert
|
||||
stats.inserted_binned().inc();
|
||||
|
||||
@@ -548,6 +548,7 @@ pub struct TimeBinSimpleF32V02 {
|
||||
pub max: f32,
|
||||
pub avg: f32,
|
||||
pub dev: f32,
|
||||
pub lst: f32,
|
||||
}
|
||||
|
||||
// Needs to be Clone to send it to multiple retention times if required.
|
||||
|
||||
@@ -668,12 +668,13 @@ pub async fn migrate_scylla_data_schema(
|
||||
("max", "float"),
|
||||
("avg", "float"),
|
||||
("dev", "float"),
|
||||
("lst", "float"),
|
||||
],
|
||||
["series", "binlen", "msp"],
|
||||
["off"],
|
||||
rett.ttl_binned(),
|
||||
);
|
||||
let do_change = true;
|
||||
// let do_change = true;
|
||||
tab.setup(do_change, scy).await?;
|
||||
}
|
||||
{
|
||||
|
||||
@@ -151,8 +151,8 @@ impl DataStore {
|
||||
|
||||
let qu_insert_binned_scalar_f32_v02 = prep_qu_ins_c!(
|
||||
"binned_scalar_f32_v02",
|
||||
"series, binlen, msp, off, cnt, min, max, avg, dev",
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?",
|
||||
"series, binlen, msp, off, cnt, min, max, avg, dev, lst",
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?",
|
||||
rett,
|
||||
scy
|
||||
);
|
||||
|
||||
@@ -92,7 +92,7 @@ impl BinWriterGrid {
|
||||
for e in out.iter_debug() {
|
||||
trace_tick_verbose!("{e:?}");
|
||||
}
|
||||
for ((((((&ts1, &ts2), &cnt), &min), &max), &avg), &fnl) in out.zip_iter() {
|
||||
for (((((((&ts1, &ts2), &cnt), &min), &max), &avg), &lst), &fnl) in out.zip_iter() {
|
||||
if fnl == false {
|
||||
info!("non final bin");
|
||||
} else if cnt == 0 {
|
||||
@@ -127,6 +127,7 @@ impl BinWriterGrid {
|
||||
max,
|
||||
avg,
|
||||
dev: f32::NAN,
|
||||
lst,
|
||||
});
|
||||
match &self.rt {
|
||||
RetentionTime::Short => {
|
||||
|
||||
Reference in New Issue
Block a user