scanner / asimap

Pure python based IMAP server with a MH based file store
BSD 3-Clause "New" or "Revised" License
42 stars 7 forks source link

GH-312: management task and task queues per mailbox. No longer needing to store uid in the message itself. #348

Closed scanner closed 3 weeks ago

scanner commented 3 weeks ago

Very large changes.

  1. Instead of every IMAP Command fighting to lock the resources they need (resync'ing on the mailbox), we have a task per mailbox that handles all resync'ing, and decides when IMAP Client commands that want to execute can execute.
  2. Added command conflict detection so now if two fetches operate on different messages while a store is running that also operations on different messages they will be allowed to run at the same time.
  3. we no longer store uid's in messages. Now that we have decided that an external service can only add messages on to the end of a mailbox, this makes resync and detection logic trivial and we can rely on existing messages in a mailbox to not change their order, or vanish, or appear. So the list of uids we already have will always remain consistent.
  4. Oh, also you can NOT ask for the mailbox "" (empty string). Mneh.
scanner commented 3 weeks ago

Fixed GH-312