projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More SPECsfs runs, this time with limited bandwidth.
[bluesky.git]
/
bluesky
/
store-s3.c
diff --git
a/bluesky/store-s3.c
b/bluesky/store-s3.c
index
4735de4
..
fd2da4f
100644
(file)
--- a/
bluesky/store-s3.c
+++ b/
bluesky/store-s3.c
@@
-102,8
+102,9
@@
static void s3store_task(gpointer a, gpointer s)
handler.responseHandler.completeCallback = s3store_response_callback;
handler.getObjectDataCallback = s3store_get_handler;
handler.responseHandler.completeCallback = s3store_response_callback;
handler.getObjectDataCallback = s3store_get_handler;
- S3_get_object(&store->bucket, async->key, NULL, 0, 0, NULL,
- &handler, &info);
+ S3_get_object(&store->bucket, async->key, NULL,
+ async->start, async->len, NULL, &handler, &info);
+ async->range_done = TRUE;
if (info.success) {
async->data = bluesky_string_new_from_gstring(info.buf);
if (info.success) {
async->data = bluesky_string_new_from_gstring(info.buf);
@@
-114,6
+115,7
@@
static void s3store_task(gpointer a, gpointer s)
} else if (async->op == STORE_OP_PUT) {
struct put_info info;
} else if (async->op == STORE_OP_PUT) {
struct put_info info;
+ info.success = 0;
info.val = async->data;
info.offset = 0;
info.val = async->data;
info.offset = 0;
@@
-126,7
+128,11
@@
static void s3store_task(gpointer a, gpointer s)
S3_put_object(&store->bucket, async->key, async->data->len, NULL, NULL,
&handler, &info);
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);
}
bluesky_store_async_mark_complete(async);
@@
-186,7
+192,7
@@
static gpointer s3store_new(const gchar *path)
else
store->bucket.bucketName = g_strdup(path);
store->bucket.protocol = S3ProtocolHTTP;
else
store->bucket.bucketName = g_strdup(path);
store->bucket.protocol = S3ProtocolHTTP;
- store->bucket.uriStyle = S3UriStyle
Path
;
+ store->bucket.uriStyle = S3UriStyle
VirtualHost
;
store->bucket.accessKeyId = getenv("AWS_ACCESS_KEY_ID");
store->bucket.secretAccessKey = getenv("AWS_SECRET_ACCESS_KEY");
store->bucket.accessKeyId = getenv("AWS_ACCESS_KEY_ID");
store->bucket.secretAccessKey = getenv("AWS_SECRET_ACCESS_KEY");