Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18029

All Live notifications emails are received again after every instance restart

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 12.6.5, 12.10
    • 12.6.3, 12.6.4, 12.9
    • Notifications
    • Windows 10 Pro 64 bit, Chrome 86, using a local instance of XWiki 12.6.4 on PostgreSQL 13, Tomcat 9.0.39
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE:

      Preconditions: Mail Sending on Administration is configured. Eventually, go to

      webapps\xwiki\WEB-INF\xwiki.properties

      and set/un-comment

      notifications.emails.live.graceTime = 1

      to enable the sending of e-mails after 1 minute.

      1. Login as Admin
      2. Create an user (e.g. U1) with a valid email address in its profile
      3. Login with U1
      4. Go to Notifications Settings and set Pages toggles to ON
      5. Set Email Frequency to 'Live'
      6. Login as Admin
      7. Create/update/comment a page
      8. Observe the emails received by U1
      9. Restart the XWiki instance

      EXPECTED RESULTS

      No emails are received after the instance is restarted, since all notifications emails for events were sent already.

      ACTUAL RESULTS

      After restart, the user receives again emails with all events that took place all the way since the Email Frequency preference was set to 'Live' (even events related to Administration settings made by Admin: Mail_Config_event.png).

      Every time the instance is restarted, all emails are received again, which can cause important issues if there are a lot of events to be sent (and to multiple users).

      In console, there is the following WARN when the mails are sent:

      2020-11-04 13:05:45,354 [Mail Prepare Thread] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Warning Code: -1100, SQLState: 02000
      2020-11-04 13:05:45,354 [Mail Prepare Thread] WARN  o.h.e.j.s.SqlExceptionHelper   - no data
      

      This issue could not be reproduced on XWiki 12.5.1.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: