Report unknown channel count in status response

This commit is contained in:
Dominik Werder
2023-07-18 15:49:08 +02:00
parent 91947dec0f
commit 5d6358f12e
32 changed files with 596 additions and 518 deletions

View File

@@ -61,6 +61,7 @@ use tokio::io::AsyncReadExt;
use tokio::io::AsyncSeekExt;
use tokio::io::ReadBuf;
use tokio::sync::mpsc;
use tracing::Instrument;
// TODO move to databuffer-specific crate
// TODO duplicate of SfChFetchInfo?
@@ -347,8 +348,10 @@ fn start_read5(
}
}
let n = pos - pos_beg;
info!("read5 done {n}");
debug!("read5 done {n}");
};
let span = tracing::span!(tracing::Level::INFO, "read5", reqid);
let fut = fut.instrument(span);
tokio::task::spawn(fut);
Ok(())
}

View File

@@ -186,8 +186,7 @@ impl Stream for EventChunkerMultifile {
let file = ofs.files.pop().unwrap();
let path = file.path;
let msg = format!("handle OFS {:?}", ofs);
debug!("{}", msg);
let item = LogItem::quick(Level::INFO, msg);
let item = LogItem::quick(Level::DEBUG, msg);
match file.file {
Some(file) => {
let inp = Box::pin(crate::file_content_stream(
@@ -212,16 +211,12 @@ impl Stream for EventChunkerMultifile {
Ready(Some(Ok(StreamItem::Log(item))))
} else if ofs.files.len() == 0 {
let msg = format!("handle OFS {:?} NO FILES", ofs);
debug!("{}", msg);
let item = LogItem::quick(Level::INFO, msg);
let item = LogItem::quick(Level::DEBUG, msg);
Ready(Some(Ok(StreamItem::Log(item))))
} else {
let msg = format!("handle OFS MERGED timebin {}", ofs.timebin);
info!("{}", msg);
for x in &ofs.files {
info!(" path {:?}", x.path);
}
let item = LogItem::quick(Level::INFO, msg);
let paths: Vec<_> = ofs.files.iter().map(|x| &x.path).collect();
let msg = format!("handle OFS MERGED timebin {} {:?}", ofs.timebin, paths);
let item = LogItem::quick(Level::DEBUG, msg);
let mut chunkers = Vec::new();
for of in ofs.files {
if let Some(file) = of.file {
@@ -256,7 +251,7 @@ impl Stream for EventChunkerMultifile {
Ready(None) => {
self.done = true;
let item = LogItem::quick(
Level::INFO,
Level::DEBUG,
format!(
"EventChunkerMultifile used {} datafiles beg {} end {} node_ix {}",
self.files_count,

View File

@@ -96,7 +96,7 @@ impl Drop for EventChunker {
warn!("config_mismatch_discard {}", self.config_mismatch_discard);
}
debug!(
"EventChunker Drop Stats:\ndecomp_dt_histo: {:?}\nitem_len_emit_histo: {:?}",
"EventChunker-stats {{ decomp_dt_histo: {:?}, item_len_emit_histo: {:?} }}",
self.decomp_dt_histo, self.item_len_emit_histo
);
}
@@ -164,7 +164,7 @@ impl EventChunker {
dbg_path: PathBuf,
expand: bool,
) -> Self {
info!("{}::{}", Self::self_name(), "from_start");
debug!("{}::{}", Self::self_name(), "from_start");
let need_min_max = match fetch_info.shape() {
Shape::Scalar => 1024 * 8,
Shape::Wave(_) => 1024 * 32,
@@ -210,7 +210,7 @@ impl EventChunker {
dbg_path: PathBuf,
expand: bool,
) -> Self {
info!("{}::{}", Self::self_name(), "from_event_boundary");
debug!("{}::{}", Self::self_name(), "from_event_boundary");
let mut ret = Self::from_start(inp, fetch_info, range, stats_conf, dbg_path, expand);
ret.state = DataFileState::Event;
ret.need_min = 4;
@@ -440,7 +440,7 @@ impl EventChunker {
if discard {
self.discard_count += 1;
} else {
ret.add_event(
ret.push(
ts,
pulse,
databuf.to_vec(),

View File

@@ -74,7 +74,7 @@ impl EventBlobsGeneratorI32Test00 {
}
let pulse = ts;
let value = (ts / (MS * 100) % 1000) as T;
item.add_event(
item.push(
ts,
pulse,
value.to_be_bytes().to_vec(),
@@ -174,7 +174,7 @@ impl EventBlobsGeneratorI32Test01 {
}
let pulse = ts;
let value = (ts / self.dts) as T;
item.add_event(
item.push(
ts,
pulse,
value.to_be_bytes().to_vec(),