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

Make indexer::prepared_commit public #1184

Merged
merged 2 commits into from
Oct 26, 2021
Merged

Conversation

dcecile
Copy link
Contributor

@dcecile dcecile commented Oct 26, 2021

The PreparedCommit struct is returned by IndexWriter::prepare_commit() for use by developers, so it should be public.

The docstring for prepare_commit() links to the docs for PreparedCommit, but the link doesn't work because the module is private.

It is an error to try to use the module directly because its parent is private:

17  | use tantivy::indexer::PreparedCommit;
    |              ^^^^^^^ private module
    |
note: the module `indexer` is defined here

Note: currently with the module private, it is still possible to use the struct:

let mut prepared_commit = index_writer.prepare_commit()?;
prepared_commit.set_payload("TEST");
prepared_commit.commit()?;

@codecov-commenter
Copy link

Codecov Report

Merging #1184 (e51deff) into main (e2fbbc0) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1184      +/-   ##
==========================================
- Coverage   93.99%   93.98%   -0.02%     
==========================================
  Files         204      204              
  Lines       34558    34558              
==========================================
- Hits        32482    32478       -4     
- Misses       2076     2080       +4     
Impacted Files Coverage Δ
src/indexer/mod.rs 100.00% <ø> (ø)
src/lib.rs 98.85% <ø> (ø)
src/directory/file_watcher.rs 96.69% <0.00%> (-3.31%) ⬇️
src/indexer/segment_serializer.rs 98.07% <0.00%> (-1.93%) ⬇️
src/postings/stacker/expull.rs 93.44% <0.00%> (-0.44%) ⬇️
src/postings/postings_writer.rs 98.04% <0.00%> (+0.48%) ⬆️
src/directory/watch_event_router.rs 96.18% <0.00%> (+0.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2fbbc0...e51deff. Read the comment docs.

@fulmicoton fulmicoton merged commit 6317982 into quickwit-oss:main Oct 26, 2021
@dcecile dcecile deleted the patch-1 branch October 26, 2021 03:43
This was referenced Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants