MB-21143: Don't store conflict resolution mode per document 30/68930/4
authorJim Walker <jim@couchbase.com>
Wed, 19 Oct 2016 14:08:10 +0000 (15:08 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 20 Oct 2016 15:15:22 +0000 (15:15 +0000)
Some more deadcode that at the moment returns an unitialised
value as there's no conflict mode to return.

Change-Id: I7c0230ff4167d81dabb6dcbcaa5b69e461f7a850
Reviewed-on: http://review.couchbase.org/68930
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/ep.cc
src/ep.h
src/ep_engine.cc

index b84cc55..4cca8d5 100644 (file)
--- a/src/ep.cc
+++ b/src/ep.cc
@@ -2194,7 +2194,6 @@ ENGINE_ERROR_CODE EventuallyPersistentStore::getMetaData(
                                                         const void *cookie,
                                                         ItemMetaData &metadata,
                                                         uint32_t &deleted,
-                                                        uint8_t &confResMode,
                                                         bool trackReferenced)
 {
     (void) cookie;
index b9325ee..ad5acfd 100644 (file)
--- a/src/ep.h
+++ b/src/ep.h
@@ -305,7 +305,6 @@ public:
      * @param cookie the connection cookie
      * @param metadata where to store the meta informaion
      * @param deleted specifies whether or not the key is deleted
-     * @param confResMode specifies the Conflict Resolution mode for the item
      * @param trackReference true if we want to set the nru bit for the item
      */
     ENGINE_ERROR_CODE getMetaData(const std::string &key,
@@ -313,7 +312,6 @@ public:
                                   const void *cookie,
                                   ItemMetaData &metadata,
                                   uint32_t &deleted,
-                                  uint8_t &confResMode,
                                   bool trackReference = false);
 
     /**
index 9be74fa..2ab0d2f 100644 (file)
@@ -5390,29 +5390,16 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::getMeta(const void* cookie,
                     (size_t)ntohs(request->message.header.request.keylen));
     uint16_t vbucket = ntohs(request->message.header.request.vbucket);
 
-
-    bool sendConfResMode = false;
-    uint8_t confResMode;
-
-    if (extlen == 1) {
-        uint8_t reqExtMeta;
-        memcpy(&reqExtMeta, request->bytes + sizeof(request->bytes), extlen);
-        if (reqExtMeta == 0x01) {
-            sendConfResMode = true;
-        }
-    }
-
     ItemMetaData metadata;
     uint32_t deleted;
 
     ENGINE_ERROR_CODE rv = epstore->getMetaData(key, vbucket, cookie,
-                                                metadata, deleted,
-                                                confResMode);
+                                                metadata, deleted);
 
     if (rv == ENGINE_SUCCESS) {
 
-        uint8_t meta[21];
-        uint8_t metalen = 20;
+        const uint8_t metalen = 20;
+        uint8_t meta[metalen];
         deleted = htonl(deleted);
         uint32_t flags = metadata.flags;
         uint32_t exp = htonl(metadata.exptime);
@@ -5423,11 +5410,6 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::getMeta(const void* cookie,
         memcpy(meta + 8, &exp, 4);
         memcpy(meta + 12, &seqno, 8);
 
-        if (sendConfResMode) {
-            *(meta + metalen) = confResMode;
-            metalen++;
-        }
-
         rv = sendResponse(response, NULL, 0, (const void *)meta,
                           metalen, NULL, 0,
                           PROTOCOL_BINARY_RAW_BYTES,