Permalink
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...
1 parent 9b09779 commit da748f5bbd9c6082f7f0ddd876c5cfc24f588a00 @chiyoung chiyoung committed with jinlim Apr 25, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 stored-value.hh
View
5 stored-value.hh
@@ -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));

0 comments on commit da748f5

Please sign in to comment.