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

fix(imap): Chunk MessageMapper::findByIds by command length #8383

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

ChristophWurst
Copy link
Member

Continuation of #8367

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst added bug 3. to review nextcloud-gmbh Tickets with importance for Nextcloud Gmbh labels Apr 19, 2023
@ChristophWurst ChristophWurst self-assigned this Apr 19, 2023
@ChristophWurst ChristophWurst requested a review from hamza221 April 19, 2023 15:48
@ChristophWurst
Copy link
Member Author

/backport to stable3.1

@ChristophWurst
Copy link
Member Author

/backport to stable2.2

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

I did some testing, sent mails, cleared caches of mailboxes and it worked fine. Anything else that should be tested specifically?

@ChristophWurst
Copy link
Member Author

It's mainly the sync of a mailbox. E.g. by running occ mail:account:sync 123. If you attach a debugger you might be able to see if the new code is used.

$newMessages = $this->messageMapper->findByIds($imapClient, $request->getMailbox(), new Horde_Imap_Client_Ids($newUids), $userId);
$changedMessages = $this->messageMapper->findByIds($imapClient, $request->getMailbox(), new Horde_Imap_Client_Ids($changedUids), $userId);
$newMessages = $this->messageMapper->findByIds($imapClient, $request->getMailbox(), $newUids, $userId);
$changedMessages = $this->messageMapper->findByIds($imapClient, $request->getMailbox(), $changedUids, $userId);
Copy link
Member Author

Choose a reason for hiding this comment

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

@st3iny this is the problematic call. You can mod getChangedMessageUids to just return $request->getUids(). It will fake that all messages changed and therefore trigger a re-fetch.

@st3iny
Copy link
Member

st3iny commented Apr 21, 2023

It's mainly the sync of a mailbox. E.g. by running occ mail:account:sync 123. If you attach a debugger you might be able to see if the new code is used.

I did and the new code is run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug nextcloud-gmbh Tickets with importance for Nextcloud Gmbh
Projects
Development

Successfully merging this pull request may close these issues.

2 participants