quantranhong1999 commented on code in PR #2894:
URL: https://github.com/apache/james-project/pull/2894#discussion_r2660180133


##########
src/adr/0076-deleted-message-vault-single-bucket.md:
##########
@@ -0,0 +1,40 @@
+# 76. Deleted Message Vault: single bucket usage
+
+Date: 2026-02-01
+
+## Status
+
+Accepted (lazy consensus).
+
+## Context
+
+At the moment, the current deleted message vault uses multiple buckets to 
store deleted messages of users. Each bucket is generated
+with a name corresponding to a year and a month, following this pattern: 
`deleted-messages-[year]-[month]-01`.
+
+Then we when run the GC tasks, every bucket that is older than the defined 
retention period is being deleted.
+
+However, this solution can be a bit costly in terms of bucket count with S3 
object storages and can affect performance by 
+doing multiple API calls on multiple buckets at once.
+
+## Decision
+
+Using a single bucket for storing deleted messages instead! The objects in the 
single bucket would be following this name pattern:
+`[year]/[month]/[blob_id]`. S3 buckets are flat but we cna still use the year 
and month as a prefix for the object name.

Review Comment:
   ```suggestion
   `[year]/[month]/[blob_id]`. S3 buckets are flat but we can still use the 
year and month as a prefix for the object name.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to