[ 
https://issues.apache.org/jira/browse/JAMES-4014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

René Cordier resolved JAMES-4014.
---------------------------------
    Resolution: Fixed

https://github.com/apache/james-project/pull/2071 fix this and has been merged

> Cannot Email/set destroy with twice the same id
> -----------------------------------------------
>
>                 Key: JAMES-4014
>                 URL: https://issues.apache.org/jira/browse/JAMES-4014
>             Project: James Server
>          Issue Type: Bug
>          Components: cassandra, JMAP
>    Affects Versions: master, 3.8.0
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>             Fix For: 3.9.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When using the Cassandra backend
> {code:java}
> java.lang.IllegalArgumentException: Multiple entries with same key: 
> org.apache.james.mailbox.MetadataWithMailboxId@25f2478=org.apache.james.mailbox.model.MessageMetaData@2bf16090
>  and 
> org.apache.james.mailbox.MetadataWithMailboxId@25f2478=org.apache.james.mailbox.model.MessageMetaData@c4079465
> at 
> com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:378)
> at 
> com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:372)
> at 
> com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:246)
> at 
> com.google.common.collect.RegularImmutableMap.fromEntryArrayCheckingBucketOverflow(RegularImmutableMap.java:133)
> at 
> com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:95)
> at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:572)
> at 
> com.google.common.collect.ImmutableMap$Builder.buildOrThrow(ImmutableMap.java:600)
> at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:587)
> at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
> at 
> org.apache.james.mailbox.store.StoreMessageIdManager.deleteWithPreHooks(StoreMessageIdManager.java:281)
> at 
> org.apache.james.mailbox.store.StoreMessageIdManager.deleteInAllowedMailboxes(StoreMessageIdManager.java:272)
> at 
> org.apache.james.mailbox.store.StoreMessageIdManager.lambda$delete$12(StoreMessageIdManager.java:259)
> at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
> at 
> reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2097)\n\tat
>  
> reactor.core.publisher.MonoStreamCollector$StreamCollectorSubscriber.onComplete(MonoStreamCollector.java:159)\n\tat
>  
> reactor.core.publisher.FluxFilterWhen$FluxFilterWhenSubscriber.drain(FluxFilterWhen.java:236)\n\tat
>  
> reactor.core.publisher.FluxFilterWhen$FluxFilterWhenSubscriber.innerResult(FluxFilterWhen.java:369)\n\tat
>  
> reactor.core.publisher.FluxFilterWhen$FilterWhenInner.onNext(FluxFilterWhen.java:450)\n\tat
>  
> reactor.core.publisher.FluxFilterWhen$FilterWhenInner.onNext(FluxFilterWhen.java:414)\n\tat
>  
> reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)\n\tat
>  reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)\n\tat 
> reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)\n\tat 
> reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74)\n\tat
>  reactor.core.publisher.MonoZip$ZipCoordinator.signal(MonoZip.java:297)\n\tat 
> reactor.core.publisher.MonoZip$ZipInner.onNext(MonoZip.java:478)\n\tat 
> reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245)\n\tat
>  
> reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305)\n\tat
>  
> reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)\n\tat
>  
> reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2571)\n\tat
>  
> reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)\n\tat
>  
> reactor.core.publisher.MonoFlatMap$FlatMapInner.onSubscribe(MonoFlatMap.java:291)\n\tat
>  
> reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)\n\tat
>  reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)\n\tat 
> reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76)\n\tat
>  
> reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165)\n\tat
>  
> reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)\n\tat
>  
> reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82)\n\tat 
> com.datastax.dse.driver.internal.core.cql.reactive.ReactiveResultSetSubscription.doOnNext(ReactiveResultSetSubscription.java:364)\n\tat
>  
> com.datastax.dse.driver.internal.core.cql.reactive.ReactiveResultSetSubscription.drain(ReactiveResultSetSubscription.java:236)\n\tat
>  
> com.datastax.dse.driver.internal.core.cql.reactive.ReactiveResultSetSubscription.lambda$fetchNextPageAndEnqueue$2(ReactiveResultSetSubscription.java:358)\n\tat
>  java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown 
> Source)\n\tat 
> java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown 
> Source)\n\tat 
> java.base/java.util.concurrent.CompletableFuture.complete(Unknown 
> Source)\n\tat 
> com.datastax.oss.driver.internal.core.cql.CqlRequestHandler.setFinalResult(CqlRequestHandler.java:324)\n\tat
>  
> com.datastax.oss.driver.internal.core.cql.CqlRequestHandler.access$1500(CqlRequestHandler.java:95)\n\tat
>  
> com.datastax.oss.driver.internal.core.cql.CqlRequestHandler$NodeResponseCallback.onResponse(CqlRequestHandler.java:655)\n\tat
>  
> com.datastax.oss.driver.internal.core.channel.InFlightHandler.channelRead(InFlightHandler.java:257)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat
>  
> io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat
>  
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat
>  
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)\n\tat
>  
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat
>  
> io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)\n\tat
>  
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat
>  
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\n\tat
>  
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\n\tat
>  
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)\n\tat
>  
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)\n\tat
>  
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)\n\tat
>  io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)\n\tat 
> io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)\n\tat
>  
> io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat
>  
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat
>  java.base/java.lang.Thread.run(Unknown Source)\n
> {code}
> Impact: cannot clean trash
> -> Front likely should not ask twice the delete on the same id in the same 
> request
> -> Back should not fail!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to