Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [EXC-1836] Update hook status after update of canister settings #3624

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions rs/execution_environment/src/canister_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ impl CanisterManager {
if let Some(wasm_memory_limit) = settings.wasm_memory_limit() {
canister.system_state.wasm_memory_limit = Some(wasm_memory_limit);
}
// Change of `wasm_memory_limit` or `new_wasm_memory_threshold` or `memory_allocation`,
// can influence the satisfaction of the condition for `low_wasm_memory` hook.
canister.update_on_low_wasm_memory_hook_condition();
adambratschikaye marked this conversation as resolved.
Show resolved Hide resolved
}

/// Tries to apply the requested settings on the canister identified by
Expand Down Expand Up @@ -867,12 +870,15 @@ impl CanisterManager {
);
match dts_result {
DtsInstallCodeResult::Finished {
canister,
mut canister,
call_id: _,
message: _,
instructions_used,
result,
} => (result, instructions_used, Some(canister)),
} => {
canister.update_on_low_wasm_memory_hook_condition();
dragoljub-duric marked this conversation as resolved.
Show resolved Hide resolved
(result, instructions_used, Some(canister))
}
DtsInstallCodeResult::Paused {
canister: _,
paused_execution,
Expand Down
Loading
Loading