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

[CHORE] More details logged to understand compaction. #3050

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/blockstore/src/arrow/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl BlockManager {
.storage
.get(&key)
.instrument(
tracing::trace_span!(parent: Span::current(), "BlockManager storage get"),
tracing::trace_span!(parent: Span::current(), "BlockManager storage get {id}"),
)
.await;
match bytes_res {
Expand Down
4 changes: 2 additions & 2 deletions rust/worker/src/compactor/compaction_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ impl CompactionManager {

match orchestrator.run().await {
Ok(result) => {
println!("Compaction Job completed");
tracing::info!("Compaction Job completed: {:?}", result);
return Ok(result);
}
Err(e) => {
println!("Compaction Job failed");
tracing::error!("Compaction Job failed: {:?}", e);
return Err(e);
}
}
Expand Down
3 changes: 3 additions & 0 deletions rust/worker/src/segment/metadata_segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,9 @@ impl<'log_records> SegmentWriter<'log_records> for MetadataSegmentWriter<'_> {
&self,
records: Chunk<MaterializedLogRecord<'log_records>>,
) -> Result<(), ApplyMaterializedLogError> {
let mut count = 0u64;
for record in records.iter() {
count += 1;
let segment_offset_id = record.0.offset_id;
match record.0.final_operation {
MaterializedLogOperation::AddNew => {
Expand Down Expand Up @@ -794,6 +796,7 @@ impl<'log_records> SegmentWriter<'log_records> for MetadataSegmentWriter<'_> {
MaterializedLogOperation::Initial => panic!("Not expected mat records in the initial state")
}
}
tracing::info!("Applied {} records to metadata segment", count,);
Ok(())
}

Expand Down
3 changes: 3 additions & 0 deletions rust/worker/src/segment/record_segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ impl<'a> SegmentWriter<'a> for RecordSegmentWriter {
&self,
records: Chunk<MaterializedLogRecord<'a>>,
) -> Result<(), ApplyMaterializedLogError> {
let mut count = 0u64;
for (log_record, _) in records.iter() {
count += 1;
match log_record.final_operation {
MaterializedLogOperation::AddNew => {
// Set all four.
Expand Down Expand Up @@ -458,6 +460,7 @@ impl<'a> SegmentWriter<'a> for RecordSegmentWriter {
MaterializedLogOperation::Initial => panic!("Invariant violation. Materialized logs should not have any logs in the initial state")
}
}
tracing::info!("Applied {} records to record segment", count,);
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion rust/worker/src/segment/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl<'me> LogMaterializer<'me> {
Ok(())
}
.instrument(
tracing::info_span!(parent: Span::current(), "Materialization read from stroage"),
tracing::info_span!(parent: Span::current(), "Materialization read from storage"),
)
.await?;
}
Expand Down
Loading