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

ASF GitHub Bot commented on JAMES-2298:
---------------------------------------

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

    https://github.com/apache/james-project/pull/129#discussion_r205014392
  
    --- Diff: 
server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueue.java
 ---
    @@ -395,21 +411,45 @@ public long clear() throws MailQueueException {
          */
         @Override
         public long remove(Type type, String value) throws MailQueueException {
    --- End diff --
    
    I **guess** yes we are. Here I see two sources of potential danger for 
concurrency.
    
    * `keyMappings::remove` - is a bulletproof.
    * `indexWriter::deleteDocuments` - Again quote from javadoc
    
    > All given deletes are applied and flushed atomically at the same time.
    
    Maybe I should write tests on it to not **guess**.


> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to