list with version_id=null, the null will be treated as a "null" version
in cls rgw_bucket_list, which cause the list return wrong keys
Fixes: https://tracker.ceph.com/issues/41433
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
(cherry picked from commit
120df4bb38f60a9a934ce6c8f8b029ef323221b1)
}
string obj_index_key;
- encode_obj_index_key(key, &obj_index_key);
+ cls_rgw_obj_key tmp_key(key);
+ if (tmp_key.instance == "null") {
+ tmp_key.instance.clear();
+ }
+ encode_obj_versioned_data_key(tmp_key, &obj_index_key);
rgw_bucket_dir_entry entry;