mox/store
Mechiel Lukkien 141637df43
when creating a mailbox subscription, don't just try to insert a record into the database and handle bstore.ErrUnique, the transaction will have been marked as botched
behaviour around failing DB calls that change data (insert/update) was changed
in bstore quite some time ago. the tx state in bstore would become inconsistent
when one or more (possibly unique) indexes had been modified, but then an
ErrUnique would occur for the next index. bstore doesn't know how to roll back
the partial changes during a transaction, so it marks the tx as botched and
refuses further operations. so, we cannot just try to insert, wait for a
possible ErrUnique, but then still try to continue with the transaction.
instead, we check if the record exists and only insert it if we couldn't find
it.

found while working on webmail.
2023-08-01 10:14:02 +02:00
..
account.go when creating a mailbox subscription, don't just try to insert a record into the database and handle bstore.ErrUnique, the transaction will have been marked as botched 2023-08-01 10:14:02 +02:00
account_test.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
export.go update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations. 2023-05-22 14:40:36 +02:00
export_test.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
import.go implement storing non-system/well-known flags (keywords) for messages and mailboxes, with imap 2023-06-24 00:24:43 +02:00
import_test.go add funtionality to import zip/tgz with maildirs/mboxes to account page 2023-02-16 09:57:27 +01:00
msgreader.go mox! 2023-01-30 14:27:06 +01:00
msgreader_test.go mox! 2023-01-30 14:27:06 +01:00
search.go implement decoding charsets (other than ascii and utf-8) while reading textual message parts, and improve search 2023-07-28 22:15:23 +02:00
state.go add condstore & qresync imap extensions 2023-07-24 21:25:50 +02:00
tmp.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
train.go update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations. 2023-05-22 14:40:36 +02:00
validation.go mox! 2023-01-30 14:27:06 +01:00