Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add logging to compaction #2791

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

westonpace
Copy link
Contributor

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

@github-actions github-actions bot added the enhancement New feature or request label Aug 26, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.

Project coverage is 79.26%. Comparing base (144d207) to head (47049d1).
Report is 3 commits behind head on main.

Files Patch % Lines
rust/lance/src/dataset/optimize.rs 74.07% 3 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2791      +/-   ##
==========================================
- Coverage   79.28%   79.26%   -0.02%     
==========================================
  Files         227      227              
  Lines       68269    68293      +24     
  Branches    68269    68293      +24     
==========================================
+ Hits        54126    54135       +9     
- Misses      11019    11021       +2     
- Partials     3124     3137      +13     
Flag Coverage Δ
unittests 79.26% <74.07%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@westonpace westonpace merged commit 769f35b into lancedb:main Aug 26, 2024
22 checks passed
gagan-bhullar-tech pushed a commit to gagan-bhullar-tech/lance that referenced this pull request Sep 13, 2024
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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants