Skip to content

Commit 2d27f2e

Browse files
authored
fix: swap dataset.rs warning argument order (#6683)
Prior to this commit, we emitted a warning that would log the index structure in front of the error message that produced the warning. If the index structure was so large that it caused the log processor to truncate the log line, the original error message could be lost. This changes the warning line to put the error ahead of the structure.
1 parent 6b8f7c2 commit 2d27f2e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

python/src/dataset.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,15 @@ impl Dataset {
989989
})? {
990990
Ok(r) => r,
991991
Err(error) => {
992-
log::warn!("Cannot derive index type for {:?}: {}", idx, error);
992+
log::warn!(
993+
"Cannot derive index type for index {} (uuid={}, type_url={:?}, version={}) on dataset {}: {}",
994+
idx.name,
995+
idx.uuid,
996+
idx.index_details.as_ref().map(|d| d.type_url.as_str()),
997+
idx.index_version,
998+
self_.ds.uri(),
999+
error,
1000+
);
9931001
// mark the type as unknown for any new index type
9941002
"Unknown".to_owned()
9951003
}

0 commit comments

Comments
 (0)