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

Add support for MULTIAPPEND #2710

Closed
wants to merge 3 commits into from
Closed

Add support for MULTIAPPEND #2710

wants to merge 3 commits into from

Conversation

rhari991
Copy link

As specified in RFC 3502

@cketti
Copy link
Member

cketti commented Aug 28, 2017

As far as I can tell we never call appendMessages() with more than one message. And if we did I'm still not sure MULTIAPPEND is a good idea because it's an atomic operation. The server discarding n-1 successfully uploaded messages when appending the nth message fails doesn't sound like something we want to do e.g. when using a metered and/or slow network.

@rhari991
Copy link
Author

I added this to improve PR #2697 .
Maybe we could add a setting for this ?

@cketti
Copy link
Member

cketti commented Aug 28, 2017

I see. Makes sense. But it probably needs some additional logic to create sensible batches (e.g. don't try to send 100 MB in one transaction).

Another issue is that pending actions are persisted. You can't change the format without migrating existing pending actions stored in the database.

@rhari991 rhari991 force-pushed the support-multiappend branch from 78d6623 to f39fd1a Compare August 29, 2017 00:14
@rhari991
Copy link
Author

@cketti I'm not sure what a reasonable limit would be, I've set it to 10MB for now.

/*
* We need uidMap to be null if new UIDs are not available to maintain consistency
* with the behavior of other similar methods (copyMessages, moveMessages) which
* return null.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should really change this. Returning null is bad and an empty map would suffice.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd leave this for another PR, since this touches other methods besides append

@philipwhiuk
Copy link
Contributor

philipwhiuk commented Sep 2, 2017

Regarding size limits, we could add support for https://tools.ietf.org/html/rfc7889

Although even with that we would want a sensible maximum.

@Valodim
Copy link
Contributor

Valodim commented Sep 2, 2017

that's most likely not worth it, since it doesn't seem to be supported by a single server implementation: https://web.archive.org/web/20170315000338/https://imapwiki.org/Specs

(unfortunately, the imapwiki.org website is down. I hope this is only a temporary issue...)

@philipwhiuk
Copy link
Contributor

Huh that's a really useful link :)

@rhari991
Copy link
Author

rhari991 commented Sep 3, 2017

Gmail seems to support it though

@Valodim
Copy link
Contributor

Valodim commented Sep 3, 2017

Oh, interesting. What's the limit they give?

@rhari991
Copy link
Author

rhari991 commented Sep 3, 2017

35651584

@Valodim
Copy link
Contributor

Valodim commented Sep 3, 2017

so 34MB. I wonder what a sane limit would be for us to set? 34M sounds like a lot

@corbolais
Copy link

Huh that's a really useful link :)

Also available in the actual internet ;)

https://imapwiki.org/Specs

Base automatically changed from master to main January 21, 2021 00:00
@cketti cketti closed this Dec 28, 2022
@cketti cketti deleted the support-multiappend branch January 28, 2023 18:07
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