Details
Description
As part of a customer support contract, we noticed that a failure to update mailbox counters results in a delivery failures.
Log line:
2023-02-10T10:10:57,537 [WARN ] o.a.j.t.m.d.MailDispatcher - Error While storing mail. This error will be retried. com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during COUNTER write query at consistency ONE (1 replica were required but only 0 acknowledged the write)
Consistency level ONE usage is inherent to counter usage. Thus errors are to be expected in case of single Cassandra node failure.
I hereby proposes to IGNORE failure to update counters and just fire a WARNING log to inform the administrator.
Rationnals:
- The mail is already stored in a mailbox
- counters can be seen as not business critical but a mere indicator
- And we have the tools (applicative read repairs + corrective tasks) to fix the inconsistencies CF https://github.com/apache/james-project/blob/master/src/adr/0023-cassandra-mailbox-counters-inconsistencies.md https://github.com/apache/james-project/blob/master/src/adr/0042-applicative-read-repairs.md