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

lack of fsyncs in view engine may lead to silent index corruption

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0
    • Fix Version/s: bug-backlog
    • Component/s: view-engine
    • Security Level: Public
    • Labels:
      None
    • Triage:
      Untriaged

      Description

      SUBJ. Found out about this in discussion with Filipe about how views work.

      If I understood correctly it doesn't fsync at all silently assuming that if there's valid header, then preceding data is valid as well. Which is clearly not true.

      IMHO that's a massive blocker that needs to be fixed sooner rather than later.

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

        Activity

        Hide
        adepue Andrew DePue added a comment -

        We just ran into this, or something like it. We have a development cluster and lost power to the entire cluster at once (it was a dev cluster so we didn't have backup power). The Couchbase cluster seemed to start OK, but accessing certain views would result in strange behavior... mostly timeouts without any error or any indication as to what the problem could be.

        Show
        adepue Andrew DePue added a comment - We just ran into this, or something like it. We have a development cluster and lost power to the entire cluster at once (it was a dev cluster so we didn't have backup power). The Couchbase cluster seemed to start OK, but accessing certain views would result in strange behavior... mostly timeouts without any error or any indication as to what the problem could be.
        Hide
        FilipeManana Filipe Manana (Inactive) added a comment - - edited

        If there's a corruption issue with a file (either view or database), view queries will return an explicit file_corruption error if the index file is corrupted. If the corruption is in a database file, the error is only returned in a query response if the query is of type stale=false. For all cases, the error (and a stack trace) are logged.

        Did you saw such error in your case? Example:
        http://www.couchbase.com/forums/thread/filecorruption-error-executing-view

        Show
        FilipeManana Filipe Manana (Inactive) added a comment - - edited If there's a corruption issue with a file (either view or database), view queries will return an explicit file_corruption error if the index file is corrupted. If the corruption is in a database file, the error is only returned in a query response if the query is of type stale=false. For all cases, the error (and a stack trace) are logged. Did you saw such error in your case? Example: http://www.couchbase.com/forums/thread/filecorruption-error-executing-view
        Hide
        cihan Cihan Biyikoglu added a comment -

        is this still valid?

        Show
        cihan Cihan Biyikoglu added a comment - is this still valid?
        Hide
        vmx Volker Mische added a comment -

        Nothing has changed. But as Filipe mentions, a corruption won't be silent.

        Show
        vmx Volker Mische added a comment - Nothing has changed. But as Filipe mentions, a corruption won't be silent.
        Hide
        siri Sriram Melkote added a comment -

        From above:

        (a) The corruption is not likely to be silent
        (b) Corruption will be noticed at query time
        (c) The fix to corruption is to recreate the index

        I'm going to close this as this is a reasonable behavior. It can be better, but it would need to be a feature request.

        Show
        siri Sriram Melkote added a comment - From above: (a) The corruption is not likely to be silent (b) Corruption will be noticed at query time (c) The fix to corruption is to recreate the index I'm going to close this as this is a reasonable behavior. It can be better, but it would need to be a feature request.

          People

          • Assignee:
            siri Sriram Melkote
            Reporter:
            alkondratenko Aleksey Kondratenko (Inactive)
          • Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes