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

Read status is still wrong sometimes for some notifications events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 11.4, 11.3.1, 11.5-rc-1
    • 11.3-rc-1
    • Notifications
    • None
    • Windows 10 Pro 64 bit, IE11, using a local instance of XWiki 11.3RC1 on PostgreSQL 11
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Login as Admin
      2. Set all Notifications to ON
      3. Watch the wiki
      4. Login as another user (e.g. U1)
      5. Create/update/comment/delete a page
      6. Update the U1's profile page (e.g. add some info about company or phone no.)
      7. Login as Admin
      8. Mark 2 events as read (including the profile update event)
      9. Refresh the page

      EXPECTED RESULTS

      The notification list displays 5 events out of which 2 are marked as read.

      ACTUAL RESULTS

      After refresh, the notification event related to user's profile edit(s) is still marked as unread. As a consequence of the wrong read status, if the respective event is marked as read once again, the following stacktrace is displayed in console:

      2019-04-25 12:27:40,997 [http://localhost:1133/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] WARN  o.h.u.JDBCExceptionReporter    - SQL Error: 0, SQLState: 23505
      2019-04-25 12:27:40,997 [http://localhost:1133/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] ERROR o.h.u.JDBCExceptionReporter    - Batch entry 0 insert into activitystream_events_status (ases_read, ases_eventid, ases_entityid) values ('TRUE', '26919594-1556183666000-DSpmgeN9', 'xwiki:XWiki.ILIE') was aborted: ERROR: duplicate key value violates unique constraint "activitystream_events_status_pkey"
        Detail: Key (ases_eventid, ases_entityid)=(26919594-1556183666000-DSpmgeN9, xwiki:XWiki.ILIE) already exists.  Call getNextException to see other errors in the batch.
      2019-04-25 12:27:40,999 [http://localhost:1133/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] WARN  o.h.u.JDBCExceptionReporter    - SQL Error: 0, SQLState: 23505
      2019-04-25 12:27:40,999 [http://localhost:1133/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] ERROR o.h.u.JDBCExceptionReporter    - ERROR: duplicate key value violates unique constraint "activitystream_events_status_pkey"
        Detail: Key (ases_eventid, ases_entityid)=(26919594-1556183666000-DSpmgeN9, xwiki:XWiki.ILIE) already exists.

      It is to be mentioned that the problem did not reproduced all the times, but most of the times.

      The issue could not be reproduced on XWiki 11.1 and 10.11.7.

      Attachments

        1. After_refresh.jpg
          409 kB
          Ilie Andriuta
        2. Before_refresh.jpg
          403 kB
          Ilie Andriuta
        3. ReadNotificationsAfterRefresh11.3.jpg
          68 kB
          Gabriela Anechitoaei

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: