int RadosObject::set_obj_attrs(const DoutPrefixProvider* dpp, Attrs* setattrs, Attrs* delattrs, optional_yield y)
{
Attrs empty;
+ // make a tiny adjustment to the existing mtime so that fetch_remote_obj()
+ // won't return ERR_NOT_MODIFIED when syncing the modified object
+ const auto mtime = state.mtime + std::chrono::nanoseconds(1);
return store->getRados()->set_attrs(dpp, rados_ctx,
bucket->get_info(),
get_obj(),
setattrs ? *setattrs : empty,
delattrs ? delattrs : nullptr,
- y);
+ y, mtime);
}
int RadosObject::get_obj_attrs(optional_yield y, const DoutPrefixProvider* dpp, rgw_obj* target_obj)