imapserver: simplify and fix logic around processing changes while opening a mailbox (with SELECT or EXAMINE)

We were first getting UIDs in a transaction with a lock. Then getting the
changes and processing them in a special way. And then processing for qresync
in a new transaction. The special processing of changes is now gone, it seems
to have skipped adding/removing uids to the session, which can't be correct.
The new approach is just using a lock and transaction and process the whole
opening of the mailbox, and not processing any changes as part of the open, and
getting rid of the special "initial" mode processing a mailbox.
This commit is contained in:
Mechiel Lukkien
2025-04-11 20:28:35 +02:00
parent fd5167fdb3
commit af3e9351bc
3 changed files with 195 additions and 234 deletions

View File

@ -276,7 +276,7 @@ func (c *conn) cmdNotify(tag, cmd string, p *parser) {
select {
case <-c.comm.Pending:
overflow, changes := c.comm.Get()
c.xapplyChanges(overflow, changes, true, true)
c.xapplyChanges(overflow, changes, true)
default:
}