calculate cache hash path for store_detailed_debug_info_on_failure (#26874)

This commit is contained in:
Jeff Washington (jwash) 2022-08-02 11:19:00 -05:00 committed by GitHub
parent 1181510531
commit acc1112e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 9 deletions

View File

@ -6530,7 +6530,7 @@ impl AccountsDb {
amod.hash(&mut hasher);
}
}
if load_from_cache && eligible_for_caching {
if load_from_cache {
// we have a hash value for all the storages in this slot
// so, build a file name:
let hash = hasher.finish();
@ -6539,14 +6539,15 @@ impl AccountsDb {
start, end, bin_range.start, bin_range.end, hash
);
let mut retval = scanner.get_accum();
if cache_hash_data
.load(
&Path::new(&file_name),
&mut retval,
start_bin_index,
bin_calculator,
)
.is_ok()
if eligible_for_caching
&& cache_hash_data
.load(
&Path::new(&file_name),
&mut retval,
start_bin_index,
bin_calculator,
)
.is_ok()
{
return retval;
}