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

cbbackup/cbrestore doesn't backup and restore item flag correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None

      Description

      I create one item on one node and restore it to another node. I use memcached client to check the item flag before and after backup/restore. The item flag mismatches.

      Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbbackup http://Administrator:password@10.5.2.22:8091 ~/backup/backup2
      ################### 100.0% (1/1 msgs)
      bucket: default, msgs transferred...
      : total | last | per sec
      batch : 4 | 4 | 81.5
      byte : 5 | 5 | 101.9
      msg : 1 | 1 | 20.4
      done

      Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbrestore ~/backup/backup2 http://Administrator:password@10.5.2.23:8091 -x try_xwm=0
      ################### 100.0% (1/1 msgs)
      bucket: default, msgs transferred...
      : total | last | per sec
      batch : 1 | 1 | 15.7
      byte : 5 | 5 | 78.5
      msg : 1 | 1 | 15.7
      done

      The python output:
      >>> c= MemcachedClient('10.5.2.22',11211)
      >>> c.set("chisheng",0,0xfffffff0,"lindy")
      (4288761800, 5038202653468618, '')
      >>> c.get("chisheng")
      (4294967280, 5038202653468618, 'lindy')
      >>> a=MemcachedClient('10.5.2.23', 11211)
      >>> a.get("chisheng")
      (4043309055, 5039149778647819, 'lindy')

      The first field is the item flag for the return value for get()

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

        Activity

        Chisheng Chisheng Hong (Inactive) created issue -
        Chisheng Chisheng Hong (Inactive) made changes -
        Field Original Value New Value
        Description I create one item on one node and restore it to another node. I use memcached client to check the item flag before and after backup/restore. The item flag mismatches.

        Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbbackup http://Administrator:password@10.5.2.22:8091 ~/backup/backup2
          [####################] 100.0% (1/1 msgs)
        bucket: default, msgs transferred...
               : total | last | per sec
         batch : 4 | 4 | 81.5
         byte : 5 | 5 | 101.9
         msg : 1 | 1 | 20.4
        done

        Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbrestore ~/backup/backup2 http://Administrator:password@10.5.2.23:8091 -x try_xwm=0
          [####################] 100.0% (1/1 msgs)
        bucket: default, msgs transferred...
               : total | last | per sec
         batch : 1 | 1 | 15.7
         byte : 5 | 5 | 78.5
         msg : 1 | 1 | 15.7
        done

        The python output:
        >>> c= MemcachedClient('10.5.2.22',11211)
        >>> c.set("chisheng",0,0xfffffff0,"lindy")
        (4288761800, 5038202653468618, '')
        >>> c.get("chisheng")
        (4294967280, 5038202653468618, 'lindy')
        >>> a=MemcachedClient('10.5.2.23', 11211)
        >>> a.get("chisheng")
        (4043309055, 5039149778647819, 'lindy')
        I create one item on one node and restore it to another node. I use memcached client to check the item flag before and after backup/restore. The item flag mismatches.

        Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbbackup http://Administrator:password@10.5.2.22:8091 ~/backup/backup2
          [####################] 100.0% (1/1 msgs)
        bucket: default, msgs transferred...
               : total | last | per sec
         batch : 4 | 4 | 81.5
         byte : 5 | 5 | 101.9
         msg : 1 | 1 | 20.4
        done

        Chishengs-MacBook-Pro:membase-cli chisheng$ ./cbrestore ~/backup/backup2 http://Administrator:password@10.5.2.23:8091 -x try_xwm=0
          [####################] 100.0% (1/1 msgs)
        bucket: default, msgs transferred...
               : total | last | per sec
         batch : 1 | 1 | 15.7
         byte : 5 | 5 | 78.5
         msg : 1 | 1 | 15.7
        done

        The python output:
        >>> c= MemcachedClient('10.5.2.22',11211)
        >>> c.set("chisheng",0,0xfffffff0,"lindy")
        (4288761800, 5038202653468618, '')
        >>> c.get("chisheng")
        (4294967280, 5038202653468618, 'lindy')
        >>> a=MemcachedClient('10.5.2.23', 11211)
        >>> a.get("chisheng")
        (4043309055, 5039149778647819, 'lindy')

        The first field is the item flag for the return value for get()
        Hide
        Chisheng Chisheng Hong (Inactive) added a comment -

        Hi Steve,
        I notice the cas value also mismatch before and after the backup/restore. Should I file another bug for that. Or you already work on that?

        Show
        Chisheng Chisheng Hong (Inactive) added a comment - Hi Steve, I notice the cas value also mismatch before and after the backup/restore. Should I file another bug for that. Or you already work on that?
        steve Steve Yen made changes -
        Sprint Status Current Sprint
        Sprint Priority 8
        Hide
        steve Steve Yen added a comment -

        Also, this was for 2.0 servers.

        (And, the CAS thing would be a separate bug. In general, don't tack separate issues into the same bug.)

        Show
        steve Steve Yen added a comment - Also, this was for 2.0 servers. (And, the CAS thing would be a separate bug. In general, don't tack separate issues into the same bug.)
        Hide
        steve Steve Yen added a comment -

        This is because the TAP protocol isn't using network-byte-order by default for item flags. The cbbackup client needs to use the TAP_CONNECT_TAP_FIX_FLAG_BYTEORDER flag when doing its initial TAP connect.

        Show
        steve Steve Yen added a comment - This is because the TAP protocol isn't using network-byte-order by default for item flags. The cbbackup client needs to use the TAP_CONNECT_TAP_FIX_FLAG_BYTEORDER flag when doing its initial TAP connect.
        Hide
        Chisheng Chisheng Hong (Inactive) added a comment -

        Shall I add this flag in command line?

        Show
        Chisheng Chisheng Hong (Inactive) added a comment - Shall I add this flag in command line?
        Hide
        steve Steve Yen added a comment -

        No, the TAP_CONNECT_TAP_FIX_FLAG_BYTEORDER is a code-level change, and there won't be any expected command-line parameter changes as part of the fix.

        Show
        steve Steve Yen added a comment - No, the TAP_CONNECT_TAP_FIX_FLAG_BYTEORDER is a code-level change, and there won't be any expected command-line parameter changes as part of the fix.
        Hide
        steve Steve Yen added a comment -
        Show
        steve Steve Yen added a comment - ep-engine change... http://review.couchbase.org/19496
        Show
        steve Steve Yen added a comment - on gerrit... http://review.couchbase.org/19499 http://review.couchbase.org/19500
        steve Steve Yen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-ep-engine-2-0 #395 (See http://qa.hq.northscale.net/job/github-ep-engine-2-0/395/)
        MB-6176: expose TAP_FLAG_TAP_FIX_FLAG_BYTEORDER to python (Revision 3ecd7e346c5c1f54df6b9e1706f6d58198881a81)

        Result = SUCCESS
        Steve Yen :
        Files :

        • management/memcacheConstants.py
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-ep-engine-2-0 #395 (See http://qa.hq.northscale.net/job/github-ep-engine-2-0/395/ ) MB-6176 : expose TAP_FLAG_TAP_FIX_FLAG_BYTEORDER to python (Revision 3ecd7e346c5c1f54df6b9e1706f6d58198881a81) Result = SUCCESS Steve Yen : Files : management/memcacheConstants.py
        steve Steve Yen made changes -
        Sprint Status Current Sprint
        Sprint Priority 8
        Chisheng Chisheng Hong (Inactive) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            steve Steve Yen
            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