mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
print debug information when a key goes missing in bulk read
this helps debug problems down the road
This commit is contained in:
parent
d74673ab29
commit
0d9a39a349
1 changed files with 15 additions and 2 deletions
|
|
@ -1515,11 +1515,24 @@ fn wrapped_main() -> ! {
|
||||||
pddb_os.perf_entry(FILE_ID_SERVICES_PDDB_SRC_MAIN, perflib::PERFMETA_STARTBLOCK, 6, std::line!());
|
pddb_os.perf_entry(FILE_ID_SERVICES_PDDB_SRC_MAIN, perflib::PERFMETA_STARTBLOCK, 6, std::line!());
|
||||||
let ser_result: SerializeResult =
|
let ser_result: SerializeResult =
|
||||||
if let Some(key_name) = state.key_list.pop() {
|
if let Some(key_name) = state.key_list.pop() {
|
||||||
let attr = basis_cache.key_attributes(&mut pddb_os,
|
let attr = match basis_cache.key_attributes(&mut pddb_os,
|
||||||
&state.dict,
|
&state.dict,
|
||||||
&key_name,
|
&key_name,
|
||||||
if state.is_basis_specified{Some(&state.basis)} else {None}
|
if state.is_basis_specified{Some(&state.basis)} else {None}
|
||||||
).expect("Key went missing during bulk read"); // could be a concurrent process mutating. We don't handle this; flag with a panic.
|
) {
|
||||||
|
Ok(attr) => attr,
|
||||||
|
Err(e) => {
|
||||||
|
modals.show_notification(
|
||||||
|
&format!("Error: key not found during bulk read:\n{:?}\n{:?}:{}:{}",
|
||||||
|
e,
|
||||||
|
if state.is_basis_specified{Some(&state.basis)} else {None},
|
||||||
|
&state.dict,
|
||||||
|
&key_name,
|
||||||
|
),
|
||||||
|
None).ok();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
};
|
||||||
if attr.len < state.read_limit - state.read_total {
|
if attr.len < state.read_limit - state.read_total {
|
||||||
let mut d = vec![0u8; attr.len];
|
let mut d = vec![0u8; attr.len];
|
||||||
match basis_cache.key_read(
|
match basis_cache.key_read(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue