This avoids hitting the osd immediately following a bucket creation, which
will avoid any map update latency for most requests.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
attrs[RGW_ATTR_ACL] = aclbl;
+ ret = rgw_add_bucket(s->user.user_id, s->bucket_str);
+ if (ret)
+ goto done;
+
ret = rgwstore->create_bucket(s->user.user_id, s->bucket_str, attrs,
s->user.auid);
+ if (ret)
+ rgw_remove_bucket(s->user.user_id, s->bucket_str);
- if (ret == 0)
- ret = rgw_add_bucket(s->user.user_id, s->bucket_str);
done:
send_response();
}