Fixes a regression with radosgw-admin bucket check stat
calculation and bucket reshard stat calculation when
there are objects that have transitioned from unversioned
to versioned. The bug was introduced in
152aadb71b61c53a4832a1c8cf82fce3d64b68d1.
Signed-off-by: Cory Snyder <csnyder@1111systems.com>
return -EIO;
}
- if (entry.exists && entry.key.instance.empty()) {
+ if (entry.exists && entry.flags == 0) {
rgw_bucket_category_stats& stats = calc_header->stats[entry.meta.category];
stats.num_entries++;
stats.total_size += entry.meta.accounted_size;
accounted_stats->total_size_rounded += cls_rgw_get_rounded_size(entry.meta.accounted_size);
accounted_stats->actual_size += entry.meta.size;
if (type == BIIndexType::Plain) {
- return entry.exists && entry.key.instance.empty();
+ return entry.exists && entry.flags == 0;
} else if (type == BIIndexType::Instance) {
return entry.exists;
}