} else if (async->op == STORE_OP_PUT) {
struct put_info info;
+ info.success = 0;
info.val = async->data;
info.offset = 0;
S3_put_object(&store->bucket, async->key, async->data->len, NULL, NULL,
&handler, &info);
- async->result = 0;
+ if (info.success) {
+ async->result = 0;
+ } else {
+ g_warning("Error completing S3 put operation; client must retry!");
+ }
}
bluesky_store_async_mark_complete(async);
else
store->bucket.bucketName = g_strdup(path);
store->bucket.protocol = S3ProtocolHTTP;
- store->bucket.uriStyle = S3UriStylePath;
+ store->bucket.uriStyle = S3UriStyleVirtualHost;
store->bucket.accessKeyId = getenv("AWS_ACCESS_KEY_ID");
store->bucket.secretAccessKey = getenv("AWS_SECRET_ACCESS_KEY");
void bluesky_store_init_s3(void)
{
- S3_initialize(NULL, S3_INIT_ALL);
+ S3_initialize(NULL, S3_INIT_ALL, NULL);
bluesky_store_register(&store_impl, "s3");
}