Skip to content

Commit

Permalink
MB-6916: check deleted flag before using getContents()
Browse files Browse the repository at this point in the history
Change-Id: I8267de178e310143277a55f3aab8126418ee3608
Reviewed-on: http://review.couchbase.org/19568
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information
steveyen committed Aug 13, 2012
1 parent 3b00615 commit 1d78340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pump_sfd.py
Expand Up @@ -205,12 +205,13 @@ def change_callback(doc_info):

if doc_info.deleted:
cmd = memcacheConstants.CMD_TAP_DELETE
val = ''
else:
cmd = memcacheConstants.CMD_TAP_MUTATION
val = doc_info.getContents()

cas, exp, flg = struct.unpack(SFD_REV_META, doc_info.revMeta)
meta = struct.pack(SFD_REV_SEQ, doc_info.revSequence)
val = doc_info.getContents()
msg = (cmd, vbucket_id, key, flg, exp, cas, meta, val)
abatch[0].append(msg, len(val))

Expand Down

0 comments on commit 1d78340

Please sign in to comment.