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

DocInfo.rev_seq is declared as 64-bit, but only 32 bits are persisted

    Details

    • Flagged:
      Release Note

      Description

      couch_common.h declares the field DocInfo.rev_seq as type uint64_t. However, the database only persists it as a 32-bit value (see assemble_seq_index_value, couch_save.c:19). This means that clients trying to set values larger than 2^32-1 will find the upper 32 bits truncated when they read the document.

      The field should be changed to type uint32_t. This could cause warnings in client code if it's assigning a 64-bit value to it, but I don't believe any of our code uses this field at all, currently

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

        Activity

        Hide
        ketaki Ketaki Gangal added a comment -

        Tested this on a small-2:2 node cluster, xdcr works as expected.

        Show
        ketaki Ketaki Gangal added a comment - Tested this on a small-2:2 node cluster, xdcr works as expected.
        Hide
        steve Steve Yen added a comment -

        From bug scrub mtg...

        For Release Note...

        The fix changes on-disk representation between 2.0 beta2 to 2.0 GA.

        Aaron after you're done / resolved this, please reassign to Chisheng...

        Chisheng, after this fix goes in (or testing on the toy build), backup of 2.0 beta2 and restore to 2.0 needs retest.

        Show
        steve Steve Yen added a comment - From bug scrub mtg... For Release Note... The fix changes on-disk representation between 2.0 beta2 to 2.0 GA. Aaron after you're done / resolved this, please reassign to Chisheng... Chisheng, after this fix goes in (or testing on the toy build), backup of 2.0 beta2 and restore to 2.0 needs retest.
        Hide
        junyi Junyi Xie (Inactive) added a comment -

        Ketaki, do we understand why the replication rate is so slow in your test yesterday? This change-set is a fundamental change in storage, and it may break all XDCR functionality, so we need to be very careful before merging this one.

        Show
        junyi Junyi Xie (Inactive) added a comment - Ketaki, do we understand why the replication rate is so slow in your test yesterday? This change-set is a fundamental change in storage, and it may break all XDCR functionality, so we need to be very careful before merging this one.
        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-couchdb-preview #531 (See http://qa.hq.northscale.net/job/github-couchdb-preview/531/)
        MB-6945: Increase size of rev seq from 32 bits to 48 bits (Revision 4cf0a82487e198389e19b41f93e6bf6fdd80f782)

        Result = SUCCESS
        steve :
        Files :

        • src/couchdb/couch_db_updater.erl
        • src/couchdb/couch_db.hrl
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-couchdb-preview #531 (See http://qa.hq.northscale.net/job/github-couchdb-preview/531/ ) MB-6945 : Increase size of rev seq from 32 bits to 48 bits (Revision 4cf0a82487e198389e19b41f93e6bf6fdd80f782) Result = SUCCESS steve : Files : src/couchdb/couch_db_updater.erl src/couchdb/couch_db.hrl
        Hide
        kzeller kzeller added a comment -

        RN: Document revision numbers had been stored as 32 bit but are
        now stored as 48 bit values. This is to support
        the functioning of XDCR and to support a larger number
        of document revisions.

        Show
        kzeller kzeller added a comment - RN: Document revision numbers had been stored as 32 bit but are now stored as 48 bit values. This is to support the functioning of XDCR and to support a larger number of document revisions.

          People

          • Assignee:
            Chisheng Chisheng Hong (Inactive)
            Reporter:
            jens Jens Alfke
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes