mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-01 07:30:54 -05:00
Previously `clear_all_tmp_directories()` was called in `main.rs` after `TableOfContent::new()` had already loaded all collections and applied WAL. Stale temp files from a previous crash (e.g. interrupted snapshot transfers) could interfere with the recovery process. Move the cleanup into `TableOfContent::new()` so it runs before the collection loading loop. Extract a standalone `clear_tmp_directories()` function that only needs `StorageConfig`, and delegate the existing method to it. Made-with: Cursor Co-authored-by: Cursor Agent <agent@cursor.com>