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

Use delCount of SegmentInfos to calculate numDocs #36323

Merged
merged 1 commit into from
Dec 9, 2018

Commits on Dec 6, 2018

  1. Use delCount of SegmentInfos to calculate numDocs

    Today, we iterate the bitset of hardLiveDocs to calculate the number of
    live docs. This calculation might be expensive if we enable soft-deletes
    (by default) for old indices whose soft-deletes was disabled previously
    and had hard-deletes.
    
    Once soft-deletes is enabled, we no longer hard-update or hard-delete
    documents directly. We have hard-deletes in two scenarios: (1) from old
    segments where soft-deletes was disabled, (2) when IndexWriter hits
    non-aborted exceptions. These two cases, IW flushes SegmentInfos before
    exposing the hard-deletes; thus we can use the hard-delete count of
    SegmentInfos.
    dnhatn committed Dec 6, 2018
    Configuration menu
    Copy the full SHA
    a6326b1 View commit details
    Browse the repository at this point in the history