blockstore: Adjust the error message for missing shreds (#34833)

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.
This commit is contained in:
steviez 2024-01-18 12:17:49 -06:00 committed by GitHub
parent 6a9f729101
commit 3bccdaff7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 2 deletions

View File

@ -631,7 +631,11 @@ impl Blockstore {
} }
match data_cf.get_bytes((slot, i)).unwrap() { match data_cf.get_bytes((slot, i)).unwrap() {
None => { 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 None
} }
Some(data) => Shred::new_from_serialized_shred(data).ok(), Some(data) => Shred::new_from_serialized_shred(data).ok(),
@ -656,7 +660,11 @@ impl Blockstore {
} }
match code_cf.get_bytes((slot, i)).unwrap() { match code_cf.get_bytes((slot, i)).unwrap() {
None => { 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 None
} }
Some(code) => Shred::new_from_serialized_shred(code).ok(), Some(code) => Shred::new_from_serialized_shred(code).ok(),