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

When index processes are started, they can't tell if vbucket databases were recreated

    XMLWordPrintable

Details

    • Story
    • Resolution: Won't Fix
    • Major
    • 2.0-beta
    • 2.0-developer-preview-4
    • storage-engine, view-engine
    • Security Level: Public
    • None
    • 2

    Description

      Right now when an index process starts, it can't tell if the vbucket databases were recreated.
      If any vbucket database was recreated, all the index entries that originated from that vbucket database have to be removed from the index and the index must index all changes (from sequence number 0) from the new database.

      When index processes are alive, they detect database recreation, but when they aren't they can't know that - for example, the server was down and the database files were overwritten with backups, the index process was not yet started by ns_server and before it got started one or more vbucket databases were recreated, or, the index process crashed and before it got restarted some vbucket databases were recreated.

      A possible solution here is to store a UUID/signature in database headers. Every time a database is created, it gets an UUID/signature added to its header. Index headers would store, besides the indexed seq number, the UUIDs/signatures of each vbucket database - when started, the index processes can compare the current database UUIDs/signatures with the ones stored in the index header to detect if the databases were recreated.

      After talking to Damien, we don't know if the above solution is completely robust yet, but in principle there shouldn't be any use case that defeats it.
      Needs some more thought however.

      Attachments

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

        Activity

          People

            FilipeManana Filipe Manana (Inactive)
            FilipeManana Filipe Manana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty