Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add logging to compaction (lancedb#2791)
Adds basic logging to compaction so that users can see some indication of progress on very long-running compaction jobs. Example output: ``` 2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: Begin compacting 300 rows across 2 fragments [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: Begin compacting 300 rows across 2 fragments [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: Read progress 112/300 [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: Read progress 225/300 [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: Read progress 112/300 [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: Read progress 225/300 [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: file written [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: reserving fragment ids and transposing row ids [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: file written [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: reserving fragment ids and transposing row ids [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 155cbe87-d8fe-44c7-baa2-2072f4353efa: completed [2024-08-26T17:36:31Z INFO lance::dataset::optimize] Compaction task 37e5da68-cd91-4e64-a3e4-3702714332b1: completed ```
- Loading branch information