CouchDB
  1. CouchDB
  2. COUCHDB-1384

File descriptor leak if view compaction is cancelled

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      If a view compaction is canceled, the compact file's fd remains open as long as the view group is alive.
      This is because the couch_file the compactor uses is spawn_linked by the view group and not linked to the compactor process, therefore when the compactor is shutdown the corresponding couch_file is not shutdown. The view group doesn't keep track of the compact file's couch_file, so it can't explicitly shutdown it either.

      This affects only the 1.2.x branch and is addressed by simply linking the file process to the compactor process. Patch attached.

        Activity

        Hide
        Filipe Manana added a comment -

        Applied to 1.2.x

        Show
        Filipe Manana added a comment - Applied to 1.2.x

          People

          • Assignee:
            Unassigned
            Reporter:
            Filipe Manana
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development