Fixes: #3127
Bad variable scoping made it so that specific variables
weren't initialized between suggested changes iterations.
This specifically affected a case where in a specific
change we had an updated followed by a remove, and the
remove was on a non-existent key (e.g., was already
removed earlier). We ended up re-substracting the
object stats, as the entry wasn't reset between
the iterations (and we didn't read it because the
key didn't exist).
backport:argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
tag_timeout = (header.tag_timeout ? header.tag_timeout : CEPH_RGW_TAG_TIMEOUT);
bufferlist::iterator in_iter = in->begin();
- __u8 op;
- rgw_bucket_dir_entry cur_change;
- rgw_bucket_dir_entry cur_disk;
- bufferlist op_bl;
while (!in_iter.end()) {
+ __u8 op;
+ rgw_bucket_dir_entry cur_change;
+ rgw_bucket_dir_entry cur_disk;
try {
::decode(op, in_iter);
::decode(cur_change, in_iter);