Add explaining comment for Err case in get_bank_snapshots() (#31998)

This commit is contained in:
steviez 2023-06-08 12:54:24 -05:00 committed by GitHub
parent 37a759045a
commit 4b2db0d546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -874,6 +874,8 @@ pub fn get_bank_snapshots(bank_snapshots_dir: impl AsRef<Path>) -> Vec<BankSnaps
.for_each(
|slot| match BankSnapshotInfo::new_from_dir(&bank_snapshots_dir, slot) {
Ok(snapshot_info) => bank_snapshots.push(snapshot_info),
// Other threads may be modifying bank snapshots in parallel; only return
// snapshots that are complete as deemed by BankSnapshotInfo::new_from_dir()
Err(err) => debug!("Unable to read bank snapshot for slot {slot}: {err}"),
},
),