From 20120cad9ffcc74ff7a812bb46c5766c3a30a2c1 Mon Sep 17 00:00:00 2001 From: Steven Czabaniuk Date: Thu, 18 Jan 2024 11:02:16 -0600 Subject: [PATCH] blockstore: Adjust the error message for missing shreds 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. --- ledger/src/blockstore.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index b2bb8ec77c0f53..156e29999acd71 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -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(), @@ -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(),