Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 06dc52b

Browse files
committed
Error logging
1 parent 7614e0e commit 06dc52b

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

core/src/repair/cluster_slot_state_verifier.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ pub(crate) fn check_slot_agrees_with_cluster(
853853
purge_repair_slot_counter: &mut PurgeRepairSlotCounter,
854854
slot_state_update: SlotStateUpdate,
855855
) {
856-
info!(
856+
error!(
857857
"check_slot_agrees_with_cluster() slot: {}, root: {}, slot_state_update: {:?}",
858858
slot, root, slot_state_update
859859
);
@@ -870,7 +870,7 @@ pub(crate) fn check_slot_agrees_with_cluster(
870870
return;
871871
}
872872

873-
datapoint_info!(
873+
datapoint_error!(
874874
"duplicate_slot",
875875
("slot", slot, i64),
876876
(
@@ -902,7 +902,7 @@ pub(crate) fn check_slot_agrees_with_cluster(
902902
}
903903
}
904904

905-
datapoint_info!(
905+
datapoint_error!(
906906
"duplicate_confirmed_slot",
907907
("slot", slot, i64),
908908
(

core/src/replay_stage.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ impl ReplayStage {
613613
let mut ancestors = bank_forks.read().unwrap().ancestors();
614614
let mut descendants = bank_forks.read().unwrap().descendants();
615615
let did_complete_bank = Self::replay_active_banks(
616+
&my_pubkey,
616617
&blockstore,
617618
&bank_forks,
618619
&my_pubkey,
@@ -920,8 +921,9 @@ impl ReplayStage {
920921
// Reset onto a fork
921922
if let Some(reset_bank) = reset_bank {
922923
if last_reset != reset_bank.last_blockhash() {
923-
info!(
924-
"vote bank: {:?} reset bank: {:?}",
924+
error!(
925+
"{} vote bank: {:?} reset bank: {:?}",
926+
my_pubkey,
925927
vote_bank
926928
.as_ref()
927929
.map(|(b, switch_fork_decision)| (b.slot(), switch_fork_decision)),
@@ -2699,6 +2701,7 @@ impl ReplayStage {
26992701

27002702
#[allow(clippy::too_many_arguments)]
27012703
fn process_replay_results(
2704+
id: &Pubkey,
27022705
blockstore: &Blockstore,
27032706
bank_forks: &RwLock<BankForks>,
27042707
progress: &mut ProgressMap,
@@ -2783,6 +2786,7 @@ impl ReplayStage {
27832786
transaction_status_sender.send_transaction_status_freeze_message(bank);
27842787
}
27852788
bank.freeze();
2789+
error!("{} froze bank {} {:?}", id, bank_slot, bank.hash());
27862790
datapoint_info!(
27872791
"bank_frozen",
27882792
("slot", bank_slot, i64),
@@ -2887,6 +2891,7 @@ impl ReplayStage {
28872891

28882892
#[allow(clippy::too_many_arguments)]
28892893
fn replay_active_banks(
2894+
id: &Pubkey,
28902895
blockstore: &Blockstore,
28912896
bank_forks: &RwLock<BankForks>,
28922897
my_pubkey: &Pubkey,
@@ -2965,6 +2970,7 @@ impl ReplayStage {
29652970
};
29662971

29672972
Self::process_replay_results(
2973+
id,
29682974
blockstore,
29692975
bank_forks,
29702976
progress,

local-cluster/tests/local_cluster.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5288,7 +5288,10 @@ fn test_duplicate_shreds_switch_failure() {
52885288
if original_frozen_hash != dup_frozen_hash {
52895289
break;
52905290
} else {
5291-
panic!("Duplicate leader and partition target got same hash: {}", original_frozen_hash);
5291+
panic!(
5292+
"Duplicate leader and partition target got same hash: {}",
5293+
original_frozen_hash
5294+
);
52925295
}
52935296
}
52945297

0 commit comments

Comments
 (0)