Skip to content

Commit

Permalink
Re-queue all canisters to ensure all have fully migrated (#6760)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Nov 7, 2024
1 parent 4b8b28a commit 7e67365
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions backend/canisters/local_group_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Changed

- Re-queue all canisters to ensure all have fully migrated ([#6760](https://github.com/open-chat-labs/open-chat/pull/6760))

## [[2.0.1432](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1432-local_group_index)] - 2024-11-06

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use ic_cdk::post_upgrade;
use local_group_index_canister::post_upgrade::Args;
use stable_memory::get_reader;
use tracing::info;
use types::CanisterId;
use utils::cycles::init_cycles_dispenser_client;

#[post_upgrade]
Expand All @@ -15,9 +16,16 @@ fn post_upgrade(args: Args) {
let memory = get_upgrades_memory();
let reader = get_reader(&memory);

let (data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
let (mut data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
msgpack::deserialize(reader).unwrap();

data.canisters_pending_events_migration_to_stable_memory = data
.local_groups
.iter()
.map(|(g, _)| CanisterId::from(*g))
.chain(data.local_communities.iter().map(|(c, _)| CanisterId::from(*c)))
.collect();

canister_logger::init_with_logs(data.test_mode, errors, logs, traces);

let env = init_env(data.rng_seed);
Expand Down

0 comments on commit 7e67365

Please sign in to comment.