[ https://issues.apache.org/jira/browse/JAMES-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed JAMES-3726. --------------------------------- Resolution: Fixed > Allow relaxing CassandraMailRepository LWT usage > ------------------------------------------------ > > Key: JAMES-3726 > URL: https://issues.apache.org/jira/browse/JAMES-3726 > Project: James Server > Issue Type: Improvement > Components: cassandra, MailStore & MailRepository > Affects Versions: 3.7.0 > Reporter: Benoit Tellier > Priority: Major > Fix For: 3.8.0 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > At a customer place I discovered CassandraMailRepository extensive relies on > lightweight transactions, which turns out not playing well when doing massive > error recovery operations on mail repositories: > {code:java} > 2022-03-10T11:09:40,137 [ERROR] o.a.j.m.i.JamesMailSpooler - Failed > Mail1645005443013-a8c3d070-afd7-4821-990d-7c309ff38970 processing 1 > consecutive times. Mail is requeued with increased failure count. > com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout > during CAS write query at consistency LOCAL_SERIAL (2 replica were required > but only 1 acknowledged the write) > at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:87) > at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:65) > at > com.datastax.driver.core.Message$ProtocolDecoder.decode(Message.java:297) > at > com.datastax.driver.core.Message$ProtocolDecoder.decode(Message.java:268) > at > com.datastax.shaded.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) > ... 25 common frames omitted > Wrapped by: com.datastax.driver.core.exceptions.WriteTimeoutException: > Cassandra timeout during CAS write query at consistency LOCAL_SERIAL (2 > replica were required but only 1 acknowledged the write) > at > com.datastax.driver.core.exceptions.WriteTimeoutException.copy(WriteTimeoutException.java:113) > at > com.datastax.driver.core.Responses$Error.asException(Responses.java:167) > Suppressed: java.lang.Exception: #block terminated with an error > at > reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99) > at reactor.core.publisher.Mono.block(Mono.java:1703) > at > org.apache.james.mailrepository.cassandra.CassandraMailRepository.store(CassandraMailRepository.java:74) > at > org.apache.james.transport.mailets.ToRepository.service(ToRepository.java:79) > at > org.apache.james.mailetcontainer.impl.camel.CamelProcessor.process(CamelProcessor.java:75) > at > org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor$MailetContainerRouteBuilder.handleMailet(CamelMailetProcessor.java:176) > at > org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor$MailetContainerRouteBuilder.lambda$configure$0(CamelMailetProcessor.java:153) > {code} > In my opinion these LWT are far from relevant and could be replaced by an > idempotent behaviour. We should expose a configuration option allowing to do > just that. > Proposal: cassandra.properties > {code:java} > mailrepository.strong.consistency=false > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org