From 5fabd87685cc6326e5aaf813a9f045dddf4da577 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 9 Apr 2014 16:05:42 -0700 Subject: [PATCH] Mark Swift blobstores as eventually consistent This allows tests to retry correctly. Most blobstores, including Swift[1], offer eventual consistency, although Azure[2] and the jclouds test blobstores offer strong consistency. [1] https://lists.launchpad.net/openstack/msg06788.html [2] http://blogs.msdn.com/b/windowsazure/archive/2011/11/21/windows-azure-storage-a-highly-available-cloud-storage-service-with-strong-consistency.aspx --- .../swift/blobstore/config/SwiftBlobStoreContextModule.java | 2 +- .../config/HPCloudObjectStorageBlobStoreContextModule.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/config/SwiftBlobStoreContextModule.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/config/SwiftBlobStoreContextModule.java index 1156be9a3d..a3c6313b76 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/config/SwiftBlobStoreContextModule.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/config/SwiftBlobStoreContextModule.java @@ -36,7 +36,7 @@ public class SwiftBlobStoreContextModule extends AbstractModule { @Override protected void configure() { - bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT); + bind(ConsistencyModel.class).toInstance(ConsistencyModel.EVENTUAL); bind(AsyncBlobStore.class).to(SwiftAsyncBlobStore.class).in(Scopes.SINGLETON); bind(BlobStore.class).to(SwiftBlobStore.class).in(Scopes.SINGLETON); } diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/config/HPCloudObjectStorageBlobStoreContextModule.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/config/HPCloudObjectStorageBlobStoreContextModule.java index a321033533..ef634b7836 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/config/HPCloudObjectStorageBlobStoreContextModule.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/config/HPCloudObjectStorageBlobStoreContextModule.java @@ -97,7 +97,7 @@ public class HPCloudObjectStorageBlobStoreContextModule extends SwiftBlobStoreCo @Override protected void configure() { - bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT); + bind(ConsistencyModel.class).toInstance(ConsistencyModel.EVENTUAL); bind(AsyncBlobStore.class).to(HPCloudObjectStorageAsyncBlobStore.class); bind(BlobStore.class).to(HPCloudObjectStorageBlobStore.class); bind(ObjectToBlobMetadata.class).to(HPCloudObjectStorageObjectToBlobMetadata.class);