james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2298) FileMailQueue do not support remove
Date Tue, 06 Nov 2018 02:28:00 GMT

    [ https://issues.apache.org/jira/browse/JAMES-2298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676044#comment-16676044

ASF GitHub Bot commented on JAMES-2298:

Github user chibenwa commented on a diff in the pull request:

    --- Diff: server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueue.java
    @@ -197,20 +192,14 @@ public void enQueue(Mail mail, long delay, TimeUnit unit) throws
    +            indexWriter.addDocument(toIndexDocument(mail, key));
    +            indexWriter.commit();
    --- End diff --
    I would say that `committing on each document` is slightly overkill.
    We can tolerate IMO the searched vue to be eventually consistent.
    Hence I would not commit at all.
    But I do understand this commit is useful for test correctness.
    What I would propose is to add a `commitIndex` method on the file mail queue. This method
could be called by a `await` method in the MailQueueContract. By calling `await` where appropriate
you can then correct the tests.

> FileMailQueue do not support remove
> -----------------------------------
>                 Key: JAMES-2298
>                 URL: https://issues.apache.org/jira/browse/JAMES-2298
>             Project: James Server
>          Issue Type: Bug
>          Components: Queue
>    Affects Versions: master
>            Reporter: Tellier Benoit
>            Priority: Major
> An exception is thrown or the code badly modify the state of the queue

This message was sent by Atlassian JIRA

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

View raw message