René Cordier created JAMES-4156:
-----------------------------------

             Summary: Deleted Message Vault: use a single bucket
                 Key: JAMES-4156
                 URL: https://issues.apache.org/jira/browse/JAMES-4156
             Project: James Server
          Issue Type: Improvement
    Affects Versions: 3.9.0
            Reporter: René Cordier


Today, the deleted message vault uses a bucket per month to store deleted 
messages. And when the bucket is older than the retention period, we delete it, 
via a GC task.

The goal here would be to use a single bucket instead, like 
`james-deleted-messages-vault`. S3 object stores are flat but we could simulate 
folders by using key prefixes to manage time with the following pattern: 
`2025/12/[blob_id]`.

We can keep the Cassandra tables for the distributed system, just the bucket 
name would be the single one and the blobId would be prefixed with year and 
month

We could have a BlobStoreDeletedMessageVaultV2 that would take care of the 
vault with a single bucket. We can have a BlobIdGenerator that generates BlobId 
having the year and month in the prefix.

BlobStoreDeletedMessageVaultV2 needs to be retro compatible with the current 
vault:
- write: only write to the new single bucket
- read: we need to be able to fall back to the old buckets
- delete: we need to be able to delete old blobs

Keep BlobStoreVaultGarbageCollectionTask where we would also add cleaning old 
object from the new single bucket too, among the old ones.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to