mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
141637df43
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. |
||
---|---|---|
.. | ||
account.go | ||
account.html | ||
account_test.go | ||
accountapi.json | ||
admin.go | ||
admin.html | ||
admin_test.go | ||
adminapi.json | ||
autoconf.go | ||
autoconf_test.go | ||
import.go | ||
mtasts.go | ||
mtasts_test.go | ||
web.go | ||
web_test.go | ||
webserver.go | ||
webserver_test.go |