Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MB-5138 Return the value size as 0 for partially loaded items.

Change-Id: I723ee5823c9772c00eae921dc1843e4e78de2229
Reviewed-on: http://review.couchbase.org/15215
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
  • Loading branch information...
commit da748f5bbd9c6082f7f0ddd876c5cfc24f588a00 1 parent 9b09779
Chiyoung Seo chiyoung authored jinlim committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 stored-value.hh
5 stored-value.hh
View
@@ -288,6 +288,11 @@ public:
} else if (isResident()) {
return value->length();
} else {
+ // This is a special case for two phase warmup as an item's value size
+ // is not known during the first phase warmup.
+ if (value->length() == 0) {
+ return 0;
+ }
blobval uval;
assert(value->length() == sizeof(uval));
std::memcpy(uval.chlen, value->getData(), sizeof(uval));
Please sign in to comment.
Something went wrong with that request. Please try again.