Permalink
Browse files

Correctly read engine_specific data for TAP checkpoints/mutations

Fix the offset from where engine_specific data is read. The bug was
causing the seqno value of items to not be sent from the master to
the replica.

Change-Id: I077da20eb15d1a8672c46be893345f7b8181968c
Reviewed-on: http://review.couchbase.org/14237
Tested-by: Srinivas Vadlamani <srinivas@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
  • Loading branch information...
1 parent 9ed99dd commit 2f7d1834a10ef7b41a75ebfad3d8a2bc3382ff6f Srinivas Vadlamani committed with chiyoung Mar 22, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 daemon/memcached.c
View
5 daemon/memcached.c
@@ -2965,6 +2965,11 @@ static void process_bin_tap_packet(tap_event_t event, conn *c) {
if (event == TAP_MUTATION || event == TAP_CHECKPOINT_START ||
event == TAP_CHECKPOINT_END) {
protocol_binary_request_tap_mutation *mutation = (void*)tap;
+
+ // engine_specific data in protocol_binary_request_tap_mutation is
+ // at a different offset than protocol_binary_request_tap_no_extras
+ engine_specific = packet + sizeof(mutation->bytes);
+
flags = mutation->message.body.item.flags;
if ((tap_flags & TAP_FLAG_NETWORK_BYTE_ORDER) == 0) {
flags = ntohl(flags);

0 comments on commit 2f7d183

Please sign in to comment.