Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAMES-3544 Attachment refactoring (step 2) #584

Merged
merged 11 commits into from Aug 20, 2021

Conversation

chibenwa
Copy link
Contributor

@chibenwa chibenwa commented Aug 9, 2021

  • Hold messageId within mail table
  • Rework JMAP draft to reduce queries related to attachments
  • Migration to add messageId to attachment table
  • Group reads on the BlobManager - this allows querying only once the message/mailbox context of attachments

@chibenwa
Copy link
Contributor Author

Force pushed to solve conflict

In order to simplify the query flow, and reduce the amount on primary key reads when working with attachments when using
JMAP, we did add the messageId property to the `attachmentV2` table.

Newly stored attachment will then store their corresponding messageId alongside `attachmentV2` and will no longer need
to read `messageIdTable`.
This allows dropping a MessageId hack, due to the
use of wrong types.

Furthermore, this makes a single call for
each attachment to the underlying BlobManager,
thus fasten things up.
The access rights is done at access time, we
can get rid of this double read pattern.
Required for authentication in Thunderbird. Failure to do so will cause issues.
@chibenwa chibenwa merged commit 42a2eba into apache:master Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants