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

fix: cleanup external staging manifests #2792

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

@github-actions github-actions bot added the bug Something isn't working label Aug 26, 2024
@wjones127 wjones127 force-pushed the fix/cleanup-external-manifests branch from 1753b3f to 7a69608 Compare August 26, 2024 20:01
@wjones127 wjones127 force-pushed the fix/cleanup-external-manifests branch from 7a69608 to b4026a0 Compare August 26, 2024 20:06
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 89.90826% with 11 lines in your changes missing coverage. Please review.

Project coverage is 78.53%. Comparing base (f9f151d) to head (64bdf8e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ust/lance-table/src/io/commit/external_manifest.rs 83.33% 2 Missing and 6 partials ⚠️
rust/lance/src/io/commit/external_manifest.rs 94.54% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2792      +/-   ##
==========================================
+ Coverage   78.52%   78.53%   +0.01%     
==========================================
  Files         228      228              
  Lines       68641    68677      +36     
  Branches    68641    68677      +36     
==========================================
+ Hits        53902    53938      +36     
- Misses      11679    11683       +4     
+ Partials     3060     3056       -4     
Flag Coverage Δ
unittests 78.53% <89.90%> (+0.01%) ⬆️

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.

@wjones127 wjones127 marked this pull request as ready for review August 26, 2024 21:16
Copy link
Contributor

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleanup looks nice, I just want to make sure dropping the rename was intentional.

Comment on lines +98 to +110
match store
.copy(staging_manifest_path, &final_manifest_path)
.await
{
Ok(_) => {}
Err(ObjectStoreError::NotFound { .. }) => return Ok(final_manifest_path), // Another writer beat us to it.
Err(e) => return Err(e.into()),
};

// step 2: flip the external store to point to the final location
self.external_manifest_store
.put_if_exists(base_path.as_ref(), version, final_manifest_path.as_ref())
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have store.copy and then external_manifest_store.put_if_exists.

However, in the original code blocks it looks like it was store.copy and then store.rename and then external_manifest_store.put_if_exists. What happened to the rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that I could do this given the TODO:

// TODO: remove copy-rename once we upgrade object_store crate

This is likely from:

@wjones127 wjones127 merged commit c509ed3 into lancedb:main Sep 4, 2024
21 of 22 checks passed
@wjones127 wjones127 deleted the fix/cleanup-external-manifests branch September 4, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants