Skip to content

Commit

Permalink
blockstore: Adjust the error message for missing shreds (#34833)
Browse files Browse the repository at this point in the history
The log statement is currently a bit misleading, and could be
interpretted as saying this routine deleted a shred.

Adjust the log statement to state that this routine is looking for the
shred but couldn't find it. Also, elevate the log to error level as
inconsistent state across columns should not be happening.
  • Loading branch information
steviez authored Jan 18, 2024
1 parent 6a9f729 commit 3bccdaf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,11 @@ impl Blockstore {
}
match data_cf.get_bytes((slot, i)).unwrap() {
None => {
warn!("Data shred deleted while reading for recovery");
error!(
"Unable to read the data shred with slot {slot}, index {i} for shred \
recovery. The shred is marked present in the slot's data shred index, \
but the shred could not be found in the data shred column."
);
None
}
Some(data) => Shred::new_from_serialized_shred(data).ok(),
Expand All @@ -656,7 +660,11 @@ impl Blockstore {
}
match code_cf.get_bytes((slot, i)).unwrap() {
None => {
warn!("Code shred deleted while reading for recovery");
error!(
"Unable to read the coding shred with slot {slot}, index {i} for shred \
recovery. The shred is marked present in the slot's coding shred index, \
but the shred could not be found in the coding shred column."
);
None
}
Some(code) => Shred::new_from_serialized_shred(code).ok(),
Expand Down

0 comments on commit 3bccdaf

Please sign in to comment.