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

Commit ccd8276

Browse files
authored
Merge pull request #7342 from systeminit/brit/edda-add-spans
chore(edda): Add to/from index checksum to edda spans
2 parents 8aa5b0c + 2944323 commit ccd8276

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

lib/edda-server/src/materialized_view/change_set.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ pub async fn reuse_or_rebuild_index_for_new_change_set(
189189
si.edda.mv.avg_build_elapsed_ms = Empty,
190190
si.edda.mv.max_build_elapsed_ms = Empty,
191191
si.edda.mv.slowest_kind = Empty,
192+
si.edda.from_index_checksum = Empty,
193+
si.edda.to_index_checksum = Empty,
192194
),
193195
)]
194196
pub async fn build_all_mv_for_change_set(
@@ -247,13 +249,17 @@ pub async fn build_all_mv_for_change_set(
247249
debug!("index_entries {:?}", index_entries);
248250
let mv_index = ChangeSetMvIndexV2::new(snapshot_to_address.to_string(), index_entries);
249251
let mv_index_frontend_object = FrontendObject::try_from(mv_index)?;
252+
let from_index_checksum =
253+
from_index_checksum.map_or(mv_index_frontend_object.checksum.to_owned(), |check| check);
254+
let to_index_checksum = mv_index_frontend_object.checksum.to_owned();
250255
let meta = ChangesetUpdateMeta {
251256
workspace_id,
252257
change_set_id,
253-
from_index_checksum: from_index_checksum
254-
.map_or(mv_index_frontend_object.checksum.to_owned(), |check| check),
255-
to_index_checksum: mv_index_frontend_object.checksum.to_owned(),
258+
from_index_checksum: from_index_checksum.to_owned(),
259+
to_index_checksum: to_index_checksum.to_owned(),
256260
};
261+
span.record("si.edda.from_index_checksum", from_index_checksum);
262+
span.record("si.edda.to_index_checksum", &to_index_checksum);
257263
let patch_batch = ChangesetPatchBatch::new(meta.clone(), patches);
258264
let change_set_mv_id = change_set_id.to_string();
259265

@@ -309,6 +315,8 @@ pub async fn map_all_nodes_to_change_objects(
309315
si.edda.mv.slowest_kind = Empty,
310316
si.edda.mv.combined_changes.count = Empty,
311317
si.edda.mv.outdated_mv.kind_count = Empty,
318+
si.edda.from_index_checksum = Empty,
319+
si.edda.to_index_checksum = Empty,
312320
)
313321
)]
314322
#[allow(clippy::too_many_arguments)]
@@ -474,7 +482,8 @@ pub async fn build_mv_for_changes_in_change_set(
474482
to_index_checksum: to_index_checksum.clone(),
475483
};
476484
let patch_batch = ChangesetPatchBatch::new(meta.clone(), patches);
477-
485+
span.record("si.edda.from_index_checksum", &from_index_checksum);
486+
span.record("si.edda.to_index_checksum", &to_index_checksum);
478487
let index_patch = ObjectPatch {
479488
kind: ReferenceKind::ChangeSetMvIndex.to_string(),
480489
id: new_mv_index_frontend_object.id.clone(),

0 commit comments

Comments
 (0)