Skip to content

Commit d487696

Browse files
committed
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
1 parent 755aa56 commit d487696

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server/blob/blob-storage-strategy/src/main/java/org/apache/james/server/blob/deduplication/MinIOGenerationAwareBlobId.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,11 @@ public BlobId parse(String id) {
7474
}
7575

7676
private static String injectFoldersInBlobId(String blobIdPart) {
77-
int folderDepthToCreate = 4;
77+
int folderDepthToCreate = 2;
7878
if (blobIdPart.length() > folderDepthToCreate) {
7979
return blobIdPart.charAt(0) + "/" +
8080
blobIdPart.charAt(1) + "/" +
81-
blobIdPart.charAt(2) + "/" +
82-
blobIdPart.charAt(3) + "/" +
83-
blobIdPart.substring(4);
81+
blobIdPart.substring(2);
8482
}
8583
return blobIdPart;
8684
}

0 commit comments

Comments
 (0)