Skip to content

Commit

Permalink
storage: migration fixes (m19 was stuck)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Dec 15, 2023
1 parent 68a5072 commit fc7f13e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gossip-lib/src/storage/migrations/m17.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl Storage {
txn: &mut RwTxn<'a>,
) -> Result<(), Error> {
// Info message
tracing::info!("{prefix}: ...");
tracing::info!("{prefix}: reindexing event relationships...");

// Migrate
self.m17_reindex_event_relationships(txn)?;
Expand Down
2 changes: 1 addition & 1 deletion gossip-lib/src/storage/migrations/m18.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Storage {
txn: &mut RwTxn<'a>,
) -> Result<(), Error> {
// Info message
tracing::info!("{prefix}: ...");
tracing::info!("{prefix}: moving to new relationships storage...");

// Migrate
self.m18_move_to_new_relationships_storage(txn)?;
Expand Down
3 changes: 2 additions & 1 deletion gossip-lib/src/storage/migrations/m19.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::collections::{BTreeMap, HashMap};

impl Storage {
pub(super) fn m19_trigger(&self) -> Result<(), Error> {
let _ = self.db_person_lists_metadata1()?;
Ok(())
}

Expand All @@ -17,7 +18,7 @@ impl Storage {
txn: &mut RwTxn<'a>,
) -> Result<(), Error> {
// Info message
tracing::info!("{prefix}: ...");
tracing::info!("{prefix}: populating person list metadata...");

// Migrate
self.m19_populate_person_list_metadata(txn)?;
Expand Down
3 changes: 2 additions & 1 deletion gossip-lib/src/storage/migrations/m20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use nostr_types::Tag;

impl Storage {
pub(super) fn m20_trigger(&self) -> Result<(), Error> {
let _ = self.db_person_lists_metadata1()?;
Ok(())
}

Expand All @@ -16,7 +17,7 @@ impl Storage {
txn: &mut RwTxn<'a>,
) -> Result<(), Error> {
// Info message
tracing::info!("{prefix}: ...");
tracing::info!("{prefix}: initializing person list event metadata...");

// Migrate
self.m20_initialize_person_list_event_metadata(txn)?;
Expand Down
2 changes: 1 addition & 1 deletion gossip-lib/src/storage/migrations/m21.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Storage {
txn: &mut RwTxn<'a>,
) -> Result<(), Error> {
// Info message
tracing::info!("{prefix}: ...");
tracing::info!("{prefix}: migrating person list metadata...");

// Migrate
self.m21_migrate_person_list_metadata(txn)?;
Expand Down

0 comments on commit fc7f13e

Please sign in to comment.