melib/jmap: respect max_objects_in_get when fetching email #193

Closed
Manos Pitsidianakis wants to merge 1 commits from jmap-batch-fetch into master
There is no content yet.
Manos Pitsidianakis added the
JMAP
label 2022-10-15 18:12:34 +03:00

Thank you very much for the work on this so far @epilys!

Unfortunately it seems like this PR still produces an error respons from the jmap server when opening large mailboxes:

Reply from server: ["error",{"type":"invalidResultReference","description":"Failed to evaluate #ids result reference."},"m4"]

I think it still works fine on smaller mailboxes, but can try debugging a little more.

Thank you very much for the work on this so far @epilys! Unfortunately it seems like this PR still produces an error respons from the jmap server when opening large mailboxes: ``` Reply from server: ["error",{"type":"invalidResultReference","description":"Failed to evaluate #ids result reference."},"m4"] ``` I think it still works fine on smaller mailboxes, but can try debugging a little more.

Thanks a lot for the test @rudihorn . I am busy with work these past few weeks and when I had the time to work on this, I didn't make progress on a way to upload lots of mail into a local stalwart server. I had a fastmail dev account that someone donated but it has since expired and I can't test that. So this is the blocking issue with progress on proper functionality; I suspect when a dev env is available it will be fast to fix it.

Thanks a lot for the test @rudihorn . I am busy with work these past few weeks and when I had the time to work on this, I didn't make progress on a way to upload lots of mail into a local stalwart server. I had a fastmail dev account that someone donated but it has since expired and I can't test that. So this is the blocking issue with progress on proper functionality; I suspect when a dev env is available it will be fast to fix it.

So doing some more debugging, the requests contain the following email methods:

["Email/query",{"accountId":"c","calculateTotal":false,"collapseThreads":false,"filter":{"inMailbox":"a"},"position":0,"sort":null},"5"],["Email/get",{"#ids":{"name":"Email/query","path":"/ids","resultOf":"5"},"accountId":"c","fetchAllBodyValues":false,"fetchHTMLBodyValues":false,"fetchTextBodyValues":false,"properties":["threadId"]},"6"],...

Method 5 succeeds and returns 5000 (max is 500) entries and then method 6 fails with ["error",{"type":"requestTooLarge","description":"The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call."},"6"] and all remaining method calls also fail if this helps.

So doing some more debugging, the requests contain the following email methods: ``` ["Email/query",{"accountId":"c","calculateTotal":false,"collapseThreads":false,"filter":{"inMailbox":"a"},"position":0,"sort":null},"5"],["Email/get",{"#ids":{"name":"Email/query","path":"/ids","resultOf":"5"},"accountId":"c","fetchAllBodyValues":false,"fetchHTMLBodyValues":false,"fetchTextBodyValues":false,"properties":["threadId"]},"6"],... ``` Method 5 succeeds and returns 5000 (max is 500) entries and then method 6 fails with `["error",{"type":"requestTooLarge","description":"The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call."},"6"]` and all remaining method calls also fail if this helps.
Manos Pitsidianakis force-pushed jmap-batch-fetch from b6bcf45fb9 to e64f2077a8 2022-10-24 03:42:48 +03:00 Compare

@rudihorn fixed :)

@rudihorn fixed :)
Manos Pitsidianakis deleted branch jmap-batch-fetch 2023-07-18 16:17:32 +03:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#193
There is no content yet.