MB-23618: Revert 25ce75aa1 bgFetch changes 40/76540/2
authorJim Walker <jim@couchbase.com>
Mon, 10 Apr 2017 08:52:17 +0000 (09:52 +0100)
committerDave Rigby <daver@couchbase.com>
Mon, 10 Apr 2017 16:09:31 +0000 (16:09 +0000)
Revert the bgFetch changes from 25ce75aa1 as they're not required
anymore. The original commit added conditional "isMeta" parameter
changes to withMeta functions because the datatype of the document
use to be part of the body. Now that this is part of the meta data
the changes are no longer required.

This has the side-effect of fixing MB-23618, so there was also
something wrong with the bgFetch changes.

Change-Id: If3743b766b5da1b51c00e3b5ee84707f2ba4262e
Reviewed-on: http://review.couchbase.org/76540
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
src/vbucket.cc

index ee14850..cf5906e 100644 (file)
@@ -927,13 +927,10 @@ ENGINE_ERROR_CODE VBucket::setWithMeta(Item& itm,
                                       TrackReference::No);
 
     bool maybeKeyExists = true;
-
-    bool xattrSupported = engine.isXattrSupported(cookie);
     if (!force) {
         if (v) {
             if (v->isTempInitialItem()) {
-                bgFetch(itm.getKey(), cookie, engine, bgFetchDelay,
-                        !xattrSupported);
+                bgFetch(itm.getKey(), cookie, engine, bgFetchDelay, true);
                 return ENGINE_EWOULDBLOCK;
             }
 
@@ -951,7 +948,7 @@ ENGINE_ERROR_CODE VBucket::setWithMeta(Item& itm,
                                              cookie,
                                              engine,
                                              bgFetchDelay,
-                                             !xattrSupported,
+                                             true,
                                              isReplication);
             } else {
                 maybeKeyExists = false;
@@ -1203,12 +1200,10 @@ ENGINE_ERROR_CODE VBucket::deleteWithMeta(const DocKey& key,
     auto hbl = ht.getLockedBucket(key);
     StoredValue* v = ht.unlocked_find(
             key, hbl.getBucketNum(), WantsDeleted::Yes, TrackReference::No);
-    bool isXattrSupported = engine.isXattrSupported(cookie);
-
     if (!force) { // Need conflict resolution.
         if (v) {
             if (v->isTempInitialItem()) {
-                bgFetch(key, cookie, engine, bgFetchDelay, !isXattrSupported);
+                bgFetch(key, cookie, engine, bgFetchDelay, true);
                 return ENGINE_EWOULDBLOCK;
             }
 
@@ -1228,7 +1223,7 @@ ENGINE_ERROR_CODE VBucket::deleteWithMeta(const DocKey& key,
                                              cookie,
                                              engine,
                                              bgFetchDelay,
-                                             !isXattrSupported,
+                                             true,
                                              isReplication);
             } else {
                 // Even though bloomfilter predicted that item doesn't exist