This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 86fcef0f0a60c4e3b4723a45807ad3a0267b19a4
Author: LanKhuat <[email protected]>
AuthorDate: Tue Apr 28 18:49:30 2020 +0700

    JAMES-3158 Deprecate HybridBlobStore
---
 CHANGELOG.md                                                      | 5 +++++
 .../cassandra-rabbitmq-ldap/destination/conf/blob.properties      | 4 +++-
 .../run/guice/cassandra-rabbitmq/destination/conf/blob.properties | 4 +++-
 .../main/java/org/apache/james/blob/union/HybridBlobStore.java    | 8 ++++++++
 src/site/xdoc/server/config-blobstore.xml                         | 5 +++--
 5 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5d57c9..8ce0abd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -58,6 +58,11 @@ of tasks being currently executed.
 - JAMES-2964 Forbid to create User quota/ Domain quota/ Global quota using 
negative number
 - JAMES-3074 Fixing UidValidity generation, sanitizing of invalid values upon 
reads. Read upgrade instructions.
 
+### Deprecated
+- HybridBlobStore. This will be removed after 3.6.0 release. Introduced to 
fasten small blob access, its usage could be 
+compared to a cache, but with a sub-optimal implementation (no eviction, 
default replication factor, no  circuit breaking).
+Use BlobStore cache instead.
+
 ### Removed
 - Classes marked as deprecated whose removal was planned after 3.4.0 release 
(See JAMES-2703). This includes:
   - SieveDefaultRepository. Please use SieveFileRepository instead.
diff --git 
a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/blob.properties
 
b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/blob.properties
index e502373..4fa1dcd 100644
--- 
a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/blob.properties
+++ 
b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/blob.properties
@@ -2,8 +2,10 @@
 # Read https://james.apache.org/server/config-blobstore.html for further 
details
 
 # Choose your BlobStore implementation
-# Mandatory, allowed values are: cassandra, objectstorage, hybrid
+# Mandatory, allowed values are: cassandra, objectstorage, hybrid (deprecated)
 # hybrid is using both objectstorage for unfrequently read or big blobs & 
cassandra for small, often read blobs
+# Deprecated. Use CachedBlobStore instead. Introduced to fasten small blob 
access, its usage could be compared
+# to a cache, but with a sub-optimal implementation (no eviction, default 
replication factor, no  circuit breaking).
 implementation=objectstorage
 
 # ========================================= Hybrid BlobStore 
======================================
diff --git 
a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/blob.properties 
b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/blob.properties
index 9c89c2d..da0945f 100644
--- a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/blob.properties
+++ b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/blob.properties
@@ -2,8 +2,10 @@
 # Read https://james.apache.org/server/config-blobstore.html for further 
details
 
 # Choose your BlobStore implementation
-# Mandatory, allowed values are: cassandra, objectstorage, hybrid
+# Mandatory, allowed values are: cassandra, objectstorage, hybrid (deprecated)
 # hybrid is using both objectstorage for unfrequently read or big blobs & 
cassandra for small, often read blobs
+# Deprecated. Use CachedBlobStore instead. Introduced to fasten small blob 
access, its usage could be compared
+# to a cache, but with a sub-optimal implementation (no eviction, default 
replication factor, no  circuit breaking).
 implementation=objectstorage
 
 # ========================================= Cassandra BlobStore Cache 
======================================
diff --git 
a/server/blob/blob-union/src/main/java/org/apache/james/blob/union/HybridBlobStore.java
 
b/server/blob/blob-union/src/main/java/org/apache/james/blob/union/HybridBlobStore.java
index 0d700d8..6dd06ad 100644
--- 
a/server/blob/blob-union/src/main/java/org/apache/james/blob/union/HybridBlobStore.java
+++ 
b/server/blob/blob-union/src/main/java/org/apache/james/blob/union/HybridBlobStore.java
@@ -37,6 +37,14 @@ import com.google.common.base.Preconditions;
 
 import reactor.core.publisher.Mono;
 
+/**
+ * Will be removed in future release (3.6.0).
+ * Prefer using CachedBlobStore.
+ *
+ * Introduced to fasten small blob access, its usage could be compared to a 
cache, but with a sub-optimal
+ * implementation (no eviction, default replication factor, no  circuit 
breaking).
+ */
+@Deprecated
 public class HybridBlobStore implements BlobStore {
     @FunctionalInterface
     public interface RequireLowCost {
diff --git a/src/site/xdoc/server/config-blobstore.xml 
b/src/site/xdoc/server/config-blobstore.xml
index 8f7997f..389aee8 100644
--- a/src/site/xdoc/server/config-blobstore.xml
+++ b/src/site/xdoc/server/config-blobstore.xml
@@ -46,7 +46,8 @@
                 <dt><strong>implementation</strong></dt>
                 <dd>cassandra: use cassandra based BlobStore</dd>
                 <dd>objectstorage: use Swift/AWS S3 based BlobStore</dd>
-                <dd>hybrid: Using both objectstorage for unfrequently read or 
big blobs &amp; cassandra for small, often read blobs</dd>
+                <dd>hybrid (deprecated, use CachedBlobStore instead): Using 
both objectstorage for unfrequently read or big blobs &amp; cassandra for 
small, often read blobs.
+                    Introduced to fasten small blob access, its usage could be 
compared to a cache, but with a sub-optimal implementation (no eviction, 
default replication factor, no  circuit breaking).</dd>
             </dl>
 
 
@@ -78,7 +79,7 @@
                 </dl>
             </subsection>
 
-            <subsection name="Hybrid BlobStore size threshold">
+            <subsection name="Hybrid BlobStore size threshold (deprecated)">
                 <dl>
                     <dt><strong>hybrid.size.threshold</strong></dt>
                     <dd>DEFAULT: 32768 bytes (32KB), must be positive. Size 
threshold for considering a blob as 'big', causing it to be saved in the low 
cost blobStore.</dd>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to