You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2025/05/05 15:43:56 UTC
(james-project) 01/01: Limit MinIO folder depth to 2
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 <bt...@linagora.com>
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: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org