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

cbbackupmgr ignores errors from ForestDB because we are defer close statements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.1
    • 5.5.6, 6.0.3, 6.5.0
    • tools
    • Untriaged
    • Unknown

    Description

      Our DCP code in 6.5.0 handles errors which are propagated up from the storage layer (instead of ignoring them, as we did in Alice). The issue here is that we are ignoring a large majority of the errors which ForestDB propagates; this is because we are using Go's defer statement.

      db, err := fdb.Open("db.fdb")
      if err != nil {
          return err
      }
      defer db.Close() // <- Any error raised by "Close" will be explicitly ignored
      

      This therefore means that even though we are handling errors in DCP, ForestDB isn't propagating the errors so they will never be handled.

      Attachments

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

        Activity

          People

            carlos.gonzalez Carlos Gonzalez Betancort (Inactive)
            james.lee James Lee
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty