⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Arsnael
Copy link
Contributor

@Arsnael Arsnael commented Jan 2, 2026

No description provided.

@@ -0,0 +1,40 @@
# 76. Deleted Message Vault: single bucket usage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect src/adr to be about James architecture.
If I understand correctly, this one is about Delete Message Vault extension.
If so, maybe introducing a way to split extensions ADRs from the main codebase would help limit the amount of ADRs one has to read to understand James?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on the overall goal to keep James understandable.

On my side a conflicting goal come to mind: discoverability. Having a single folder for ADRs makes it a single place to speak architecture and at least I know where to look.

There might exist nice solution to conciliate both goals (like referencing new ADR locations in James main ADR location like establishing mailbox/src/adr ?) - maybe other projects using ADRs have already soved this problem.

Also would we intend to relocate the concerned ADRs?

IMO it would be a awesome mailing list topic!

Copy link
Contributor Author

@Arsnael Arsnael Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbaechler Not against it, but I agree with @chibenwa on the fact that then it should be discussed with the community (ML) and should be treated in an other PR when we reach a proper consensus

If we start having adrs all around the place though I'm afraid it might be confusing. What about subfolders instead?

src/
  - adr/
    + core/
    + extensions/
[...]

I think it's clear, it's still in one place, subfolders allow easily for someone to just look at the core James ADRs if he just wishes to understand James basic core concepts, and also still easy to find extensions ADRs if one needs them? It would be confusing IMO to go look into the module of those extensions to find potential ADRs related to it.

? Will start a ML anyways on this today :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be discussed with the community (ML) and should be treated in an other PR when we reach a proper consensus

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML started

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arsnael your proposal seems nice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm seems my mail did not reach the server-dev ML for some reason sorry... Will see

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright mistake on the destination first time (I changed laptop sorry)... Now the ML is created.

@mbaechler are you ok if we merge this ADR now and reorganize later when the consensus is reached via the ML discussion? :)

@jeantil
Copy link
Contributor

jeantil commented Jan 7, 2026

The pattern of using several "buckets" exists in several places ( and caused me a lot of pain for message queues ) I wonder if it ever was such a good idea and if the scope of the ADR shouldn't be expanded to a more general definition...
(which would also make the ADR relevant for core and make the whole discussion on splitting irrelevant)

@chibenwa
Copy link
Contributor

chibenwa commented Jan 7, 2026

The pattern of using several "buckets" exists in several places ( and caused me a lot of pain for message queues ) I wonder if it ever was such a good idea and if the scope of the ADR shouldn't be expanded to a more general definition...
(which would also make the ADR relevant for core and make the whole discussion on splitting irrelevant)

I see the point.

We could actally then consider this a rework of "how the bucket is encoded at the S3 level"

It "would then just be a S3 concern" and could likely be implemented as a prefix (instead of encoding a James bucket as a S3 bucket).

  • + no code changes in other places, single bucket etc
  • - migration is not trivial.
    • if we use `` (empty) as the default 'prefix' it could lead to conflict in the hierarchy (though we operate atop a well identified set of blboIdFactories so there might be tricks...)
    • But using a non empty default (james) bucket prefix means migration for significant amount of data
    • A fallback implemented at the object store level COULD be valid functionnally speacking but not acceptable from a performance perspective.
    • We could however dis-anbiguate things by moving non default buckets in a known prefix.

=> No need of migration for #default (mailbox, mailqueue)
=> james-uploads are not performance-important so do the deleted message vault so a fallback is enough awaiting expiration / data drop (which is ok)...

So I would propose:

[all #default at the base of the hierarchy]
buckets/jmap-uploads
buckets/deleted-message-vault-2025-12
buckets/deleted-message-vault-2025-11
...

(GC would then skip buckets/)

Side benefits: refactoring the bucket name translation, and the bucket auto-creation, which is a mess.

(which would also make the ADR relevant for core and make the whole discussion on splitting irrelevant)

The start of the discussion becomes irrelevant but not the discussion itself.

BTW One might also argue "I want to undersntand James while I am not using S3".

@jeantil
Copy link
Contributor

jeantil commented Jan 7, 2026

BTW One might also argue "I want to undersntand James while I am not using S3".

then skip the S3 related ADRs but they are still part of the core ADRs :P

The start of the discussion becomes irrelevant but not the discussion itself.

I don't know : ADRs should represent architecturally structural decisions, if an ADR only impacts a single extension/module then it's an implementation detail not an architectural decision and it should probably be documented along the corresponding extension.

@chibenwa
Copy link
Contributor

chibenwa commented Jan 7, 2026

#2904 is a tiny step toward implementing "James buckets" as "object prefixes".

@Arsnael
Copy link
Contributor Author

Arsnael commented Jan 15, 2026

Closing related changes to deleted message vault for a lack of consensus reason. Moving work to linagora tmail.

@Arsnael Arsnael closed this Jan 15, 2026
@jeantil
Copy link
Contributor

jeantil commented Jan 15, 2026

I think there is a misunderstanding :

  • I don't think this requires an ADR but I do agree it's a worthwhile change
  • I didn't completely agree with Benoit's proposed implementation direction and reminded him of an alternative which already exists in the code base and encodes the virtual path/virtual folder in the blob id instead of changing the bucketname

Note that my only concern with Benoit's change was that it resulted in a breaking change in the BucketNameResolver api contract.
The change didn't break code in james but since this is a public contract which has been published in official releases we must follow the process for introducing breaking changes. I don't even dispute the point that it is unlikely to actually have been used, but there is no way to know for sure.
Benoit closed the MR at this point and you are doing the same saying you will move the development to your closed source extension, which is your right but also a bit sad.

@chibenwa
Copy link
Contributor

Hello @jeantil

I didn't completely agree with Benoit's proposed implementation direction and reminded him of an alternative which already exists in the code base and encodes the virtual path/virtual folder in the blob id instead of changing the bucketname

While conceptually better this direction indeed have broad impact; I must confess it do not seem like a reachable goal to consensually achieve a full refactoring of S3BlobStoreDAO to operate off a single bucket.

Marginal gains compared to just "rewritting the Deleted Message Vault" to use a single bucket do not seem in favor of the full-s3-refactoring idea.

the virtual path/virtual folder in the blob id instead of changing the bucketname

This is somewhat what #2902 achieves, and is in line with the current ADR.

BTW this is the direction we (linagorians) chose to move on with for Twake Mail.

you will move the development to your closed source extension, which is your right but also a bit sad.

I think there's a misunderstanding here indeed.

As employee I am accountable for time spent on the project and that it results in fixing the problem my employer faces.

If to reach this end this means moving forward on a separate, company owned repo then be it (Twake mail is not closed source, but AGPL v3 and owned by LINAGORA).

But indeed this is a problem others in the James community will face and indeed maintenance costs will be lower with this code change within James. And carrying the two approaches are not mutually exclusive, and could even converge later depending on feedback !

I propose to bring this to the mailing list thread, and to a vote:

Cheers,

Benoit

@jeantil
Copy link
Contributor

jeantil commented Jan 15, 2026

I propose to bring this to the mailing list thread
👌

@chibenwa chibenwa reopened this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants