You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rc...@apache.org on 2020/07/08 02:18:30 UTC

[james-project] 01/02: JAMES-3265 MailboxManager copy/move initial read only need metadata level

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 2d5cb9e7b0e8081ad978dce3af80ae5d0fa2861f
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Jul 7 16:30:09 2020 +0700

    JAMES-3265 MailboxManager copy/move initial read only need metadata level
    
    Full was used, significantly slowing down IMAP COPY & MOVE operations,
    especially for large batches.
    
    Also this trashed the heap memory: for some MOVE of thousands of messages,
    over 4GB where allocated totally.
---
 .../main/java/org/apache/james/mailbox/store/StoreMessageManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
index a90e81b..d4a8c6a 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
@@ -819,7 +819,7 @@ public class StoreMessageManager implements MessageManager {
 
     private Iterator<MailboxMessage> retrieveOriginalRows(MessageRange set, MailboxSession session) throws MailboxException {
         MessageMapper messageMapper = mapperFactory.getMessageMapper(session);
-        return messageMapper.findInMailbox(mailbox, set, FetchType.Full, UNLIMITED);
+        return messageMapper.findInMailbox(mailbox, set, FetchType.Metadata, UNLIMITED);
     }
 
     private SortedMap<MessageUid, MessageMetaData> collectMetadata(Iterator<MessageMetaData> ids) {


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