Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit d902877

Browse files
authored
chore: reduce append noise (#187)
now that there is an ack for every record instead of per batch
1 parent 4eeb6c7 commit d902877

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

src/main.rs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -346,24 +346,28 @@ async fn run() -> Result<(), CliError> {
346346
*args.linger,
347347
);
348348
let mut acks = std::pin::pin!(acks);
349+
let mut last_printed_batch_end: Option<u64> = None;
349350

350351
loop {
351352
select! {
352353
ack = acks.next() => {
353354
match ack {
354355
Some(Ok(ack)) => {
355-
eprintln!(
356-
"{}",
357-
format!(
358-
"✓ [APPENDED] {}..{} // tail: {} @ {}",
359-
ack.batch.start.seq_num,
360-
ack.batch.end.seq_num,
361-
ack.batch.tail.seq_num,
362-
ack.batch.tail.timestamp
363-
)
364-
.green()
365-
.bold()
366-
);
356+
if last_printed_batch_end.is_none_or(|end| end != ack.batch.end.seq_num) {
357+
last_printed_batch_end = Some(ack.batch.end.seq_num);
358+
eprintln!(
359+
"{}",
360+
format!(
361+
"✓ [APPENDED] {}..{} // tail: {} @ {}",
362+
ack.batch.start.seq_num,
363+
ack.batch.end.seq_num,
364+
ack.batch.tail.seq_num,
365+
ack.batch.tail.timestamp
366+
)
367+
.green()
368+
.bold()
369+
);
370+
}
367371
}
368372
Some(Err(e)) => {
369373
return Err(e);

0 commit comments

Comments
 (0)