Skip to content

Conversation

@maksymar
Copy link
Contributor

@maksymar maksymar commented Dec 4, 2025

No description provided.

@github-actions github-actions bot added the feat label Dec 4, 2025
// 8 | 0 | N/A | canister_states/00000000000000c80101/vmemory_0.bin
// 9 | 0 | N/A | canister_states/00000000000000c80101/wasm_chunk_store.bin
// 10 | 97 | 4 | system_metadata.pbuf
// 0 | 0 | 0 | canister_states/00000000000000640101/log_memory_store.overlay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they are the wrong way around, as they are meant to be sorted. So canister.pbuf should be 0, and log_memory_store should be 1. But either way software.wasm is gonna be 2, so the actual code change makes sense.

Copy link
Contributor Author

@maksymar maksymar Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, they are sorted, but log memory store files have some prefixes with zeros:

 file_idx | file_size | chunk_idx | path
      0 |       4132 |         0 | "canister_states/00000000000000640101/0000000000000001_0000_log_memory_store.overlay"
      1 |        342 |         1 | "canister_states/00000000000000640101/canister.pbuf"
      2 |         18 |         2 | "canister_states/00000000000000640101/software.wasm"
      3 |       4132 |         3 | "canister_states/00000000000000c80101/0000000000000001_0000_log_memory_store.overlay"
      4 |        342 |         4 | "canister_states/00000000000000c80101/canister.pbuf"
      5 |         18 |         5 | "canister_states/00000000000000c80101/software.wasm"
      6 |         98 |         6 | "system_metadata.pbuf"


env.tick();
assert_eq!(page_maps_by_status("loaded", &env), 0);
assert_eq!(page_maps_by_status("loaded", &env), 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: This is probably due to the fact that log memory store initializes the 1 page header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants