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

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

commit d487696094254b3aadc13a1dc5bbef2fcfa9cffd
Author: Benoit TELLIER <[email protected]>
AuthorDate: Sat Apr 26 07:19:08 2025 +0200

    Limit MinIO folder depth to 2
    
    Avoids creating tons of intermediate folders thus reduces inode pressure 
while still on disk splitting objects in 4.000 slots
---
 .../james/server/blob/deduplication/MinIOGenerationAwareBlobId.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/server/blob/blob-storage-strategy/src/main/java/org/apache/james/server/blob/deduplication/MinIOGenerationAwareBlobId.java
 
b/server/blob/blob-storage-strategy/src/main/java/org/apache/james/server/blob/deduplication/MinIOGenerationAwareBlobId.java
index ac0fd4b8cb..c612e17e53 100644
--- 
a/server/blob/blob-storage-strategy/src/main/java/org/apache/james/server/blob/deduplication/MinIOGenerationAwareBlobId.java
+++ 
b/server/blob/blob-storage-strategy/src/main/java/org/apache/james/server/blob/deduplication/MinIOGenerationAwareBlobId.java
@@ -74,13 +74,11 @@ public class MinIOGenerationAwareBlobId implements BlobId, 
GenerationAware {
         }
 
         private static String injectFoldersInBlobId(String blobIdPart) {
-            int folderDepthToCreate = 4;
+            int folderDepthToCreate = 2;
             if (blobIdPart.length() > folderDepthToCreate) {
                 return blobIdPart.charAt(0) + "/" +
                     blobIdPart.charAt(1) + "/" +
-                    blobIdPart.charAt(2) + "/" +
-                    blobIdPart.charAt(3) + "/" +
-                    blobIdPart.substring(4);
+                    blobIdPart.substring(2);
             }
             return blobIdPart;
         }


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

Reply via email to