Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yehudasa committed Nov 28, 2016
1 parent 3d81fa7 commit 55dcebd
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 117 deletions.
6 changes: 3 additions & 3 deletions src/rgw/rgw_common.h
Expand Up @@ -1807,7 +1807,7 @@ WRITE_CLASS_ENCODER(RGWBucketEnt)
struct rgw_obj {
rgw_bucket bucket;
rgw_obj_key key;
std::string placement_id;
// std::string placement_id;

bool in_extra_data{false}; /* in-memory only member, does not serialize */

Expand Down Expand Up @@ -1864,7 +1864,7 @@ struct rgw_obj {
::encode(key.ns, bl);
::encode(key.name, bl);
::encode(key.instance, bl);
::encode(placement_id, bl);
// ::encode(placement_id, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator& bl) {
Expand Down Expand Up @@ -1899,7 +1899,7 @@ struct rgw_obj {
::decode(key.ns, bl);
::decode(key.name, bl);
::decode(key.instance, bl);
::decode(placement_id, bl);
// ::decode(placement_id, bl);
}
DECODE_FINISH(bl);
}
Expand Down
4 changes: 3 additions & 1 deletion src/rgw/rgw_dencoder.cc
Expand Up @@ -172,6 +172,7 @@ void RGWObjManifest::get_implicit_location(uint64_t cur_part_id, uint64_t cur_st

if (!cur_part_id) {
if (ofs < max_head_size) {
location->placement_rule = head_placement_rule;
*location = obj;
return;
} else {
Expand All @@ -194,7 +195,7 @@ void RGWObjManifest::get_implicit_location(uint64_t cur_part_id, uint64_t cur_st
}

if (!tail_bucket.name.empty()) {
loc.bucket = tail_bucket;
loc.bucket = tail_bucket.bucket;
} else {
loc.bucket = obj.bucket;
}
Expand All @@ -203,6 +204,7 @@ void RGWObjManifest::get_implicit_location(uint64_t cur_part_id, uint64_t cur_st
// to get the right shadow object location
loc.key.set_instance(tail_instance);

location->placement_rule = tail_bucket.placement_rule;
*location = loc;
}

Expand Down

0 comments on commit 55dcebd

Please sign in to comment.