Skip to content

Commit

Permalink
MB-13216: Interpret conflict flag
Browse files Browse the repository at this point in the history
Change-Id: Ic2d73c01b476b72cbb3bd42ba2aad8abd8daad99
Reviewed-on: http://review.couchbase.org/46144
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
  • Loading branch information
bcui6611 committed Jan 30, 2015
1 parent 35a9551 commit 1686e33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pump_sfd.py
Expand Up @@ -17,7 +17,7 @@

SFD_SCHEME = "couchstore-files://"
SFD_VBUCKETS = 1024
SFD_REV_META = ">QIIBB" # cas, exp, flg, flex_meta, dtype
SFD_REV_META = ">QIIBBB" # cas, exp, flg, flex_meta, dtype, conf_res
SFD_REV_SEQ = ">Q"
SFD_DB_SEQ = ">Q"
SFD_RE = "^([0-9]+)\\.couch\\.([0-9]+)$"
Expand Down Expand Up @@ -215,7 +215,7 @@ def change_callback(doc_info):
cmd = couchbaseConstants.CMD_TAP_MUTATION
val = doc_info.getContents(options=couchstore.CouchStore.DECOMPRESS)

cas, exp, flg, flex_meta, dtype = struct.unpack(SFD_REV_META, doc_info.revMeta)
cas, exp, flg, flex_meta, dtype, conf_res = struct.unpack(SFD_REV_META, doc_info.revMeta)
meta = doc_info.revSequence
seqno = doc_info.sequence
nmeta = 0
Expand Down Expand Up @@ -288,7 +288,8 @@ def run(self):

d = couchstore.DocumentInfo(str(key))
flex_meta = 1
d.revMeta = str(struct.pack(SFD_REV_META, cas, exp, flg, flex_meta, dtype))
conf_res = 0
d.revMeta = str(struct.pack(SFD_REV_META, cas, exp, flg, flex_meta, dtype, conf_res))
if meta:
if len(meta) > 8:
meta = meta[0:8]
Expand Down

0 comments on commit 1686e33

Please sign in to comment.