james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Duprat (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (MAILBOX-285) CassandraMesageIdMapper update flags only on last message
Date Wed, 18 Jan 2017 07:59:26 GMT

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

Antoine Duprat resolved MAILBOX-285.
------------------------------------
    Resolution: Fixed

merged

> CassandraMesageIdMapper update flags only on last message
> ---------------------------------------------------------
>
>                 Key: MAILBOX-285
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-285
>             Project: James Mailbox
>          Issue Type: Bug
>          Components: cassandra
>            Reporter: Tellier Benoit
>
> eproduced your issue with a unit test : MessageIdMapperTest
>     @ContractTest
>     public void toto() throws Exception {
>         message1.setUid(mapperProvider.generateMessageUid());
>         message1.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));
>         sut.save(message1);
>         message2.setUid(mapperProvider.generateMessageUid());
>         message2.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));
>         sut.save(message2);
>         message3.setUid(mapperProvider.generateMessageUid());
>         message3.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));
>         sut.save(message3);
>         message4.setUid(mapperProvider.generateMessageUid());
>         message4.setModSeq(mapperProvider.generateModSeq(benwaInboxMailbox));
>         sut.save(message4);
>         MessageId messageId = message1.getMessageId();
>         sut.setFlags(messageId, ImmutableList.of(message1.getMailboxId(), benwaInboxMailbox.getMailboxId()),
new Flags(Flag.ANSWERED), FlagsUpdateMode.ADD);
>         List<MailboxMessage> messages = sut.find(ImmutableList.of(messageId), MessageMapper.FetchType.Body);
>         assertThat(messages).hasSize(1);
>         assertThat(messages.get(0).isAnswered()).isTrue();
>     }
> I can not investigate more, I should go to Vietnamese class
>         11:50
>                  
>           
> And execution result : 
> java.lang.RuntimeException: org.apache.james.backends.cassandra.utils.LightweightTransactionException:
Can not execute Optional Supplier. 1000 retries.
>     at com.google.common.base.Throwables.propagate(Throwables.java:160)
>     at org.apache.james.mailbox.cassandra.mail.CassandraMessageIdMapper.flagsUpdateWithRetry(CassandraMessageIdMapper.java:232)
>     at org.apache.james.mailbox.cassandra.mail.CassandraMessageIdMapper.lambda$setFlags$14(CassandraMessageIdMapper.java:216)
>     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>     at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
>     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>     at java.util.Iterator.forEachRemaining(Iterator.java:116)
>     at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
>     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
>     at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
>     at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
>     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>     at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
>     at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
>     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>     at java.util.Iterator.forEachRemaining(Iterator.java:116)
>     at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
>     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
>     at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
>     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>     at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
>     at org.apache.james.mailbox.cassandra.mail.CassandraMessageIdMapper.setFlags(CassandraMessageIdMapper.java:219)
>     at org.apache.james.mailbox.store.mail.model.MessageIdMapperTest.toto(MessageIdMapperTest.java:567)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>     at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
>     at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
>     at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>     at org.xenei.junit.contract.ContractSuite.runChild(ContractSuite.java:344)
>     at org.xenei.junit.contract.ContractSuite.runChil



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message