std::string req_id = driver->zone_unique_id(driver->get_new_req_id());
std::unique_ptr<rgw::sal::Writer> processor;
+
+ if (bucket_info.versioning_enabled() && obj->get_instance().empty()) {
+ obj->gen_rand_obj_instance_name();
+ }
+
processor = driver->get_atomic_writer(dpp, y, obj.get(), owner,
nullptr, olh_epoch, req_id);
int ret = processor->prepare(y);
- if (ret < 0)
+ if (ret < 0) {
return ret;
+ }
rgw::sal::DataProcessor *filter = processor.get();
CompressorRef plugin;
boost::optional<RGWPutObj_Compress> compressor;
- const auto& compression_type = driver->get_compression_type(bucket_info.placement_rule);
+ const auto& compression_type =
+ driver->get_compression_type(bucket_info.placement_rule);
if (compression_type != "none") {
plugin = Compressor::create(driver->ctx(), compression_type);
if (!plugin) {