Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-40437

[BP] FTS - Obsolete segment's file leaks during merge introductions

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • No

    Description

      We are not decrementing the ref count of the newly created merge segment for introduction while skipping its introduction in the above case due to all obsolete contents.

      ref- https://github.com/blevesearch/bleve/blob/086c3dfc284d1615e841f1f5685cdd25c14bc312/index/scorch/introducer.go#L388

      These segments which are dropped from introduction with obsolete contents will leak as those are not owned by any index snapshots and their ref counts never gets decremented. So when the user deletes the index at a later point, these files will get deleted by higher layer's like cbft to leak these file handles in `DEL` state.

       As these code paths are also invoked during memory merge segment introductions, it also has implications to result leaked file handles for the segment, if the introduction skip happens due to the same reason of complete obsolete/deleted contents within a segment by the time merge finishes.

      We need to manage the reference counts and other index level meta data for these leaked segment files.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              abhinav Abhi Dangeti
              Sreekanth Sivasankaran Sreekanth Sivasankaran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty