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 "Robert Burrell Donkin (JIRA)" <se...@james.apache.org> on 2009/05/12 14:35:46 UTC

[jira] Created: (IMAP-83) Concurrent EXPUNGE

Concurrent EXPUNGE 
-------------------

                 Key: IMAP-83
                 URL: https://issues.apache.org/jira/browse/IMAP-83
             Project: JAMES Imap
          Issue Type: Bug
          Components: Mailbox, Protocol
    Affects Versions: 0.1
            Reporter: Robert Burrell Donkin
            Assignee: Robert Burrell Donkin
             Fix For: 0.1


Use Case: 

User A
 1. Login
 2. Select mailbox alpha
 3. Mark some messages as deleted

User B
 4. Login
 5. Select mailbox alpha
 6. Expunge

Expected:
* OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 127.0.1.1 ready
a0 login gravitonian xxxxxxxxxx
a0 OK LOGIN completed.
a1 SELECT "INBOX/Company Home/User Homes/gravitonian/test"
* FLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)
* 2 RECENT
* OK [UIDVALIDITY 54]
* 28 EXISTS
* OK [UNSEEN 17] Message 17 is the first unseen
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
a1 OK [READ-WRITE] SELECT completed.
a2 EXPUNGE
* 23 EXPUNGE
* 23 EXPUNGE
* 26 EXPUNGE
a2 OK EXPUNGE completed.

Was:
* OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 192.168.2.3 is ready.
a0 login mbergljung xxxxxxxxx
a0 OK LOGIN completed.
a1 SELECT "INBOX/Company Home/User Homes/mbergljung"
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
* 7 EXISTS
* 1 RECENT
* OK [UIDVALIDITY 34]
* OK [UNSEEN 4]
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
* OK [UIDNEXT 8]
a1 OK [READ-WRITE] SELECT completed.
a2 EXPUNGE
a2 OK EXPUNGE complete

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Re: [jira] Closed: (IMAP-83) Concurrent EXPUNGE

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Wed, May 13, 2009 at 2:56 PM, Martin.Bergljung
<Ma...@opsera.com> wrote:
> Hi,
>
> I now know why my EXPUNGEs did not work.
>
> I was creating a new Mailbox for every call to MailboxManager.getMailbox().
>
> This was because I create 2 different mailboxes dependent on the user's permission.
> Either AlfrescoMailbox or AlfrescoNoAccessMailbox.
>
> I have now changed to cache the mailboxes as you do in TorqueMailboxManager:
>
> private final Map<String, AlfrescoMailbox> m_cachedWritableMailboxes;
> private final Map<String, AlfrescoNoAccessMailbox> m_cachedReadOnlyMailboxes;
>
> That works better as I can see the Outlook UI removing the messages after an EXPUNGE.
> And it is much faster and I save heap space, which I have seen in one or our client installs
> being heavily consumed, returned (GCed) eventually but you risk hitting OOM exceptions.

yep

the legacy MailboxListener stuff means that mailboxes need to be kept
around until all listeners are done. been wondering for a while
whether per mailbox listeners are a good idea...

> However, the Message Sequence Numbers for the expunged messages are not responded with
> in the correct order. I need to check my code and see what is going on.
> What this means is that Outlook can remove messages from the UI that has not really been removed.

MSNs are a real PITA and i doubt that the legacy solution used by
torque and store scales well enough. maintaining lists per client
connection is easiest way to get them right but is very expensive for
large mailboxes and many users.

need a better solution, i think...

- robert

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


RE: [jira] Closed: (IMAP-83) Concurrent EXPUNGE

Posted by "Martin.Bergljung" <Ma...@opsera.com>.
Hi,

I now know why my EXPUNGEs did not work. 

I was creating a new Mailbox for every call to MailboxManager.getMailbox().

This was because I create 2 different mailboxes dependent on the user's permission. 
Either AlfrescoMailbox or AlfrescoNoAccessMailbox.

I have now changed to cache the mailboxes as you do in TorqueMailboxManager:

private final Map<String, AlfrescoMailbox> m_cachedWritableMailboxes;
private final Map<String, AlfrescoNoAccessMailbox> m_cachedReadOnlyMailboxes;

That works better as I can see the Outlook UI removing the messages after an EXPUNGE.
And it is much faster and I save heap space, which I have seen in one or our client installs 
being heavily consumed, returned (GCed) eventually but you risk hitting OOM exceptions.

However, the Message Sequence Numbers for the expunged messages are not responded with
in the correct order. I need to check my code and see what is going on.
What this means is that Outlook can remove messages from the UI that has not really been removed.

Cheers,
Martin

-----Original Message-----
From: Robert Burrell Donkin (JIRA) [mailto:server-dev@james.apache.org] 
Sent: 13 May 2009 10:27
To: server-dev@james.apache.org
Subject: [jira] Closed: (IMAP-83) Concurrent EXPUNGE


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

Robert Burrell Donkin closed IMAP-83.
-------------------------------------

    Resolution: Fixed

Added support for passing flags to APPEND and a couple of concurrent EXPUNGE tests. This seems to be working now.

> Concurrent EXPUNGE 
> -------------------
>
>                 Key: IMAP-83
>                 URL: https://issues.apache.org/jira/browse/IMAP-83
>             Project: JAMES Imap
>          Issue Type: Bug
>          Components: Mailbox, Protocol
>    Affects Versions: 0.1
>            Reporter: Robert Burrell Donkin
>            Assignee: Robert Burrell Donkin
>             Fix For: 0.1
>
>
> Use Case: 
> User A
>  1. Login
>  2. Select mailbox alpha
>  3. Mark some messages as deleted
> User B
>  4. Login
>  5. Select mailbox alpha
>  6. Expunge
> Expected:
> * OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 127.0.1.1 ready
> a0 login gravitonian xxxxxxxxxx
> a0 OK LOGIN completed.
> a1 SELECT "INBOX/Company Home/User Homes/gravitonian/test"
> * FLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)
> * 2 RECENT
> * OK [UIDVALIDITY 54]
> * 28 EXISTS
> * OK [UNSEEN 17] Message 17 is the first unseen
> * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
> a1 OK [READ-WRITE] SELECT completed.
> a2 EXPUNGE
> * 23 EXPUNGE
> * 23 EXPUNGE
> * 26 EXPUNGE
> a2 OK EXPUNGE completed.
> Was:
> * OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 192.168.2.3 is ready.
> a0 login mbergljung xxxxxxxxx
> a0 OK LOGIN completed.
> a1 SELECT "INBOX/Company Home/User Homes/mbergljung"
> * FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
> * 7 EXISTS
> * 1 RECENT
> * OK [UIDVALIDITY 34]
> * OK [UNSEEN 4]
> * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
> * OK [UIDNEXT 8]
> a1 OK [READ-WRITE] SELECT completed.
> a2 EXPUNGE
> a2 OK EXPUNGE complete

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Closed: (IMAP-83) Concurrent EXPUNGE

Posted by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin closed IMAP-83.
-------------------------------------

    Resolution: Fixed

Added support for passing flags to APPEND and a couple of concurrent EXPUNGE tests. This seems to be working now.

> Concurrent EXPUNGE 
> -------------------
>
>                 Key: IMAP-83
>                 URL: https://issues.apache.org/jira/browse/IMAP-83
>             Project: JAMES Imap
>          Issue Type: Bug
>          Components: Mailbox, Protocol
>    Affects Versions: 0.1
>            Reporter: Robert Burrell Donkin
>            Assignee: Robert Burrell Donkin
>             Fix For: 0.1
>
>
> Use Case: 
> User A
>  1. Login
>  2. Select mailbox alpha
>  3. Mark some messages as deleted
> User B
>  4. Login
>  5. Select mailbox alpha
>  6. Expunge
> Expected:
> * OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 127.0.1.1 ready
> a0 login gravitonian xxxxxxxxxx
> a0 OK LOGIN completed.
> a1 SELECT "INBOX/Company Home/User Homes/gravitonian/test"
> * FLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)
> * 2 RECENT
> * OK [UIDVALIDITY 54]
> * 28 EXISTS
> * OK [UNSEEN 17] Message 17 is the first unseen
> * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
> a1 OK [READ-WRITE] SELECT completed.
> a2 EXPUNGE
> * 23 EXPUNGE
> * 23 EXPUNGE
> * 26 EXPUNGE
> a2 OK EXPUNGE completed.
> Was:
> * OK JAMES IMAP4rev1 Server 3.0-SNAPSHOT Server 192.168.2.3 is ready.
> a0 login mbergljung xxxxxxxxx
> a0 OK LOGIN completed.
> a1 SELECT "INBOX/Company Home/User Homes/mbergljung"
> * FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
> * 7 EXISTS
> * 1 RECENT
> * OK [UIDVALIDITY 34]
> * OK [UNSEEN 4]
> * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Recent \Seen)]
> * OK [UIDNEXT 8]
> a1 OK [READ-WRITE] SELECT completed.
> a2 EXPUNGE
> a2 OK EXPUNGE complete

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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