improperly operation to the cache.
Fixes: http://tracker.ceph.com/issues/19602
Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
string index_tag;
uint64_t epoch;
int64_t poolid;
-
- bool orig_exists = state->exists;
- uint64_t orig_size = state->accounted_size;
+ bool orig_exists;
+ uint64_t orig_size;
+
+ if (!reset_obj) { //Multipart upload, it has immutable head.
+ orig_exists = false;
+ orig_size = 0;
+ } else {
+ orig_exists = state->exists;
+ orig_size = state->accounted_size;
+ }
bool versioned_target = (meta.olh_epoch > 0 || !obj.get_instance().empty());