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

Item flag changed after backup and restore from 1954 to 1954

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None
    • Environment:
      centos-56

      Description

      I create a default bucket insert 11 items. Then backup from one node and restore to another node. Both are build 1954. I ran the script under the source node path /opt/couchbase/bin

      [chisheng@cen-1716 bin]$ ./cbbackup http://10.5.2.22:8091 ~/backup
      ################### 100.0% (11/11 msgs)
      bucket: default, msgs transferred...
      : total | last | per sec
      batch : 15 | 15 | 104.7
      byte : 44 | 44 | 307.2
      msg : 11 | 11 | 76.8
      done
      [chisheng@cen-1716 bin]$ ./cbrestore ~/backup/ http://10.5.2.23:8091
      ################### 100.0% (11/11 msgs)
      bucket: default, msgs transferred...
      : total | last | per sec
      batch : 1 | 1 | 15.8
      byte : 44 | 44 | 694.5
      msg : 11 | 11 | 173.6
      done

      >>> client = MemcachedClient("10.5.2.22", 11211)
      >>> for i in range(10):
      ... client.set("chisheng%s"%,0,100000+i,"hong")

      >>> client.get("chisheng9")#source
      (100009, 13944249166277618, 'hong')

      >>> client1 = MemcachedClient("10.5.2.23", 11211)
      >>> client1.get("chisheng9")#destination
      (2844131584, 13944249166277618, 'hong')

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

        Activity

        Hide
        steve Steve Yen added a comment -

        Hi Chiyoung,
        Dumping out the packets being sent by cbrestore, I see its SET-WITH-META requests have flags fields that are in network-byte-order.

        So, I suspect this might be in the ep-engine code with xxx-with-meta implementations and whether those command implementations are correctly converting (or not) the flags field with ntohl/htonl.

        That is, I wonder if these lines are doing the right thing...

        Can you take a look?
        Thanks,
        Steve

        Show
        steve Steve Yen added a comment - Hi Chiyoung, Dumping out the packets being sent by cbrestore, I see its SET-WITH-META requests have flags fields that are in network-byte-order. So, I suspect this might be in the ep-engine code with xxx-with-meta implementations and whether those command implementations are correctly converting (or not) the flags field with ntohl/htonl. That is, I wonder if these lines are doing the right thing... https://github.com/couchbase/ep-engine/blob/master/src/ep_engine.cc#L3794 https://github.com/couchbase/ep-engine/blob/master/src/ep_engine.cc#L3851 Can you take a look? Thanks, Steve
        Hide
        chiyoung Chiyoung Seo added a comment -

        Yes, I think they do the conversion correctly and used by the XDCR without any issues.

        Show
        chiyoung Chiyoung Seo added a comment - Yes, I think they do the conversion correctly and used by the XDCR without any issues.
        Hide
        chiyoung Chiyoung Seo added a comment -

        Mike, please sync up with Bin.

        Show
        chiyoung Chiyoung Seo added a comment - Mike, please sync up with Bin.
        Show
        steve Steve Yen added a comment - http://review.couchbase.org/#/c/22736/
        Hide
        Chisheng Chisheng Hong (Inactive) added a comment -

        This bug doesn't appear when I try offline upgrade (rpm -U) from 181 to 200

        Show
        Chisheng Chisheng Hong (Inactive) added a comment - This bug doesn't appear when I try offline upgrade (rpm -U) from 181 to 200
        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-ep-engine-2-0 #461 (See http://qa.hq.northscale.net/job/github-ep-engine-2-0/461/)
        MB-7229: Don't convert flags to host order with meta opetations (Revision de42c8cab65eb4ec7107c1c43c333df0ef8ff73d)

        Result = SUCCESS
        Mike Wiederhold :
        Files :

        • src/ep_engine.cc
        • tests/ep_test_apis.cc
        • src/couch-kvstore/couch-kvstore.cc
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-ep-engine-2-0 #461 (See http://qa.hq.northscale.net/job/github-ep-engine-2-0/461/ ) MB-7229 : Don't convert flags to host order with meta opetations (Revision de42c8cab65eb4ec7107c1c43c333df0ef8ff73d) Result = SUCCESS Mike Wiederhold : Files : src/ep_engine.cc tests/ep_test_apis.cc src/couch-kvstore/couch-kvstore.cc

          People

          • Assignee:
            mikew Mike Wiederhold
            Reporter:
            Chisheng Chisheng Hong (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes