Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1823

quotaUpdater is invoked more than one time for a message addition or deletion

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: master
    • Labels:
      None

      Description

      The following code snippet in 'init' method in 'StoreMailboxManager.java' is executed multiple times such that the same quotaUpdater is registered as a global listener more than once.
      if (quotaUpdater != null && quotaUpdater instanceof MailboxListener)

      { this.addGlobalListener((MailboxListener) quotaUpdater, null); }

      The above code is invoked multiple times by the below configuration in 'spring-mailbox.xml'.
      <import resource="classpath:META-INF/spring/mailbox-jpa.xml"/>
      <import resource="classpath:META-INF/spring/mailbox-maildir.xml"/>

      The quota increase or decrease is currently being executed twice for each message addition or deletion in our tests because the same quota updater is registered twice by the above config. For example, if a message of 1MB is appended to a mailbox, 'getCurrentStorage' method in 'InMemoryCurrentQuotaManager.java' returns a size which is 2MBs larger than before.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              leepaul21 Paul Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: