Skip to content

Commit

Permalink
Update LocalGroupIndex post release (#6812)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Nov 13, 2024
1 parent 4f921e8 commit 3771227
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 69 deletions.
5 changes: 0 additions & 5 deletions backend/canisters/group/impl/src/lifecycle/post_upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ fn post_upgrade(args: Args) {
// Only proceed with removing events from the heap if the stable memory migration is complete
assert!(data.stable_memory_event_migration_complete);

// Set the migration flag to false if threads need to be updated, but this can be done purely
// in stable memory so no need to abort the upgrade
if data.chat.events.thread_messages_to_update_in_stable_memory_len() > 0 {
data.stable_memory_event_migration_complete = false;
}
data.chat.events.init_maps();

canister_logger::init_with_logs(data.test_mode, errors, logs, traces);
Expand Down
2 changes: 2 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,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1449](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1449-local_group_index)] - 2024-11-13

### Added

- Run job to trigger migrating events in all Groups to stable memory ([#6810](https://github.com/open-chat-labs/open-chat/pull/6810))
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions backend/canisters/local_group_index/impl/src/jobs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use crate::RuntimeState;

pub mod migrate_events_to_stable_memory;
pub mod topup_canister_pool;
pub mod topup_canisters;
pub mod upgrade_communities;
pub mod upgrade_groups;

pub(crate) fn start(state: &RuntimeState) {
migrate_events_to_stable_memory::start_job_if_required(state);
topup_canister_pool::start_job_if_required(state, None);
topup_canisters::start_job();
upgrade_communities::start_job_if_required(state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ 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 @@ -16,12 +15,9 @@ fn post_upgrade(args: Args) {
let memory = get_upgrades_memory();
let reader = get_reader(&memory);

let (mut data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
let (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)).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 3771227

Please sign in to comment.