compared with
Current by Mike Wiederhold
on Jun 03, 2013 12:40.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (22)

View Page History
0| 0x80 | 0xa2 | 0x00 | 0x05 |
+---------------+---------------+---------------+---------------+
4| 0x148 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
8| 0x00 | 0x00 | 0x00 | 0x20 |
44| 0xde | 0xad | 0xbe | 0xef |
+---------------+---------------+---------------+---------------+
48| 0x6d ('m') | 0x79 ('y') | 0x6b ('k') | 0x65 ('e') |
48| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
52| 0x79 ('y') | 0x6d ('m') | 0x79 ('y') | 0x76 ('v') |
52| 0x6d ('m') | 0x79 ('y') | 0x6b ('k') | 0x65 ('e') |
+---------------+---------------+---------------+---------------+
56| 0x61 ('a') | 0x6c ('l') | 0x75 ('u') | 0x65 ('e') |
56| 0x79 ('y') | 0x6d ('m') | 0x79 ('y') | 0x76 ('v') |
+---------------+---------------+---------------+---------------+
60| 0x61 ('a') | 0x6c ('l') | 0x75 ('u') | 0x65 ('e') |
+---------------+---------------+---------------+---------------+

set with meta command
Opcode (1) : 0xa2
Key length (2,3) : 0x0005
Extra length (4) : 0x148
Data type (5) : 0x00
Vbucket (6,7) : 0x0000
Seqno (32-39): 0xbeefcafedeadbabe
Remote CAS (40-47): 0xcafebabedeadbeef
Options (48-51): 0x00000000
Key (48-52): (52-56): mykey
Value (53-59): (57-63): myvalue
{code}

The options field can be used for specifying different behaviors from the set with meta command. Specifying 0x00 is the default behavior and will enable conflict resolution. To disable conflict resolution specify 0x01.

Note that the format above can be used with different opcodes to define slightly different behavior. These opcodes define setq with meta (0xa3), add with meta (0xa4), and addq with meta (0xa5).

0| 0x80 | 0xa8 | 0x00 | 0x05 |
+---------------+---------------+---------------+---------------+
4| 0x148 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
8| 0x00 | 0x00 | 0x00 | 0x19 |
44| 0xde | 0xad | 0xbe | 0xef |
+---------------+---------------+---------------+---------------+
48| 0x6d ('m') | 0x79 ('y') | 0x6b ('k') | 0x65 ('e') |
48| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
52| 0x6d ('m') | 0x79 ('y') | 0x6b ('k') | 0x65 ('e') |
+---------------+---------------+---------------+---------------+
526| 0x79 ('y') |
+---------------+

Opcode (1) : 0xa8
Key length (2,3) : 0x0005
Extra length (4) : 0x148
Data type (5) : 0x00
Vbucket (6,7) : 0x0000
Seqno (32-39): 0xbeefcafedeadbabe
Remote CAS (40-47): 0xcafebabedeadbeef
Options (48-51): 0x00000000
Key (48-52): (52-56): mykey
{code}

The options field can be used for specifying different behaviors from the delete with meta command. Specifying 0x00 is the default behavior and will enable conflict resolution. To disable conflict resolution specify 0x01.

For deleteq with meta use opcode 0xa9.