Log when migrating thread metadata in `ThreadMetadataStore` (#52230)
Bennet Bo Fenner
created
## Context
This will make it easier to diagnose issues if any come up when
migrating thread metadata for the sidebar
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
@@ -83,12 +83,16 @@ fn migrate_thread_metadata(cx: &mut App) {
.collect::<Vec<_>>()
});
+ log::info!("Migrating {} thread store entries", metadata.len());
+
// Manually save each entry to the database and call reload, otherwise
// we'll end up triggering lots of reloads after each save
for entry in metadata {
db.save(entry).await?;
}
+ log::info!("Finished migrating thread store entries");
+
let _ = store.update(cx, |store, cx| store.reload(cx));
Ok(())
})