Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55887

Updating Event causes duplicated invitee in database and java.lang.OutOfMemoryError

      Summary

      When updating an event which has invitee, it will cause duplication on invitee in the database. If we still keep updating that event, it will cause OOME on Confluence when viewing the Calendar.

      Environment

      • Version 5.5.0 of TC and above

      Diagnosis

      This SQL query will return the duplicates

      PostgreSQL
      select "EVENT_ID", "INVITEE_ID", count(*) from "AO_950DC3_TC_EVENTS_INVITEES" group by "EVENT_ID", "INVITEE_ID";
      
      MySQL
      select EVENT_ID, INVITEE_ID, count(*) from AO_950DC3_TC_EVENTS_INVITEES group by EVENT_ID, INVITEE_ID;
      

      Steps to Reproduce

      1. Create a calendar and an event
      2. Add one user to the event
      3. Add several more users to the event
      4. Delete the users

      Expected Results

      There will be only one entry for each user in AO_950DC3_TC_EVENTS_INVITEES.

      Actual Results

      There are duplicates in AO_950DC3_TC_EVENTS_INVITEES. This will lead to java.lang.OutOfMemoryError.

      2018-06-06 16:07:08,425 ERROR [http-nio-8090-exec-2] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: Java heap space
       -- referer: https://confluence.mycompany.com/ | url: /rest/calendar-services/1.0/calendar/events.json | traceId: cb4b89b5605bbaf1 | userName: admin
      java.lang.OutOfMemoryError: Java heap space
      	at java.util.Arrays.copyOf(Arrays.java:3332)
      	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
      	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
      	at java.lang.StringBuffer.append(StringBuffer.java:270)
      	at net.fortuna.ical4j.model.component.VEvent.toString(VEvent.java:325)
      	at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.toSubCalendarEvent(DefaultCalendarManager.java:851)
      	at com.atlassian.confluence.extra.calendar3.ical4j.RecurrenceRuleProcessor.getRecurrenceEvents(RecurrenceRuleProcessor.java:115)
      	at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.getEvents(DefaultCalendarManager.java:715)
      

      Notes

      Heap Dump analysis shows one thread with most memory

      Workaround

      Upgrade TC.

        1. dominator_tree-1.png
          dominator_tree-1.png
          27 kB
        2. heapdump-1.png
          heapdump-1.png
          17 kB

            [CONFSERVER-55887] Updating Event causes duplicated invitee in database and java.lang.OutOfMemoryError

            April added a comment -

            As far as I can tell, after deploying TC-6.0.14, I had no new events with duplicate invitees, but still have the existing duplicates. Same result for TC-6.0.17.

            Perhaps the Server update contains a task to clear the existing bad data; not sure, as I am waiting for the .1 release.

            April added a comment - As far as I can tell, after deploying TC-6.0.14, I had no new events with duplicate invitees, but still have the existing duplicates. Same result for TC-6.0.17. Perhaps the Server update contains a task to clear the existing bad data; not sure, as I am waiting for the .1 release.

            Still no new version in Marketplace for Server installations. 

            Are we expected to upgrade Confluence to 6.10 to resolve a bug in Team Calendar?? 

            David Jansson added a comment - Still no new version in Marketplace for Server installations.  Are we expected to upgrade Confluence to 6.10 to resolve a bug in Team Calendar?? 

            Minh Tran added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 6.10.0
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Minh Tran added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 6.10.0 Upgrade now or check out the Release Notes to see what other issues are resolved.

            LAS added a comment -

            We were affected with the same issue... 6.0.14 didn't fix it.. duplicates remains. 6.0.15 fixed it as they have changed the code to ignore the duplicates and 6.0.16 will be released to remove the duplicates at a later date. 

            The question is why 6.0.15 which was released on the 19th has been taken off the market place now?

             

             

            Cheers,

            Gaj

            LAS added a comment - We were affected with the same issue... 6.0.14 didn't fix it.. duplicates remains. 6.0.15 fixed it as they have changed the code to ignore the duplicates and 6.0.16 will be released to remove the duplicates at a later date.  The question is why 6.0.15 which was released on the 19th has been taken off the market place now?     Cheers, Gaj

            Any update Atlassian?

            As usual the quality of team calendar is not so good..   I cant understand how you can have so much bugs on so few releases. Especially if you charge 6400USD for 10 000 users for very little development and even less testing.

             

             

            Filip Håkansson added a comment - Any update Atlassian? As usual the quality of team calendar is not so good..   I cant understand how you can have so much bugs on so few releases. Especially if you charge 6400USD for 10 000 users for very little development and even less testing.    

            April added a comment -

            I am getting the same results. Seems like this code may not have been included in the release?

            April added a comment - I am getting the same results. Seems like this code may not have been included in the release?

            Installing TC-6.0.14 did not resolve the problem for us. Duplicate entries in "AO_950DC3_TC_EVENTS_INVITEES" still exists.

            select "EVENT_ID", "INVITEE_ID", count(*)
            from "AO_950DC3_TC_EVENTS_INVITEES"
            group by "EVENT_ID", "INVITEE_ID"
            having count(*)>1
            order by "EVENT_ID" 

            Installing 6.0.14 in our test environment removed duplicates generated by following "Steps to reproduce" in description.
             

            David Jansson added a comment - Installing TC-6.0.14 did not resolve the problem for us. Duplicate entries in "AO_950DC3_TC_EVENTS_INVITEES" still exists. select "EVENT_ID" , "INVITEE_ID" , count (*) from "AO_950DC3_TC_EVENTS_INVITEES" group by "EVENT_ID" , "INVITEE_ID" having count (*)>1 order by "EVENT_ID" Installing 6.0.14 in our test environment removed duplicates generated by following "Steps to reproduce" in description.  

            This bug is reported to be solved in both TC 6.0.14 and TC 6.0.15 but status is still "AWAITING RELEASE".

            https://confluence.atlassian.com/teamcal/team-calendars-6-0-14-release-notes-952055185.html

            https://confluence.atlassian.com/teamcal/team-calendars-6-0-15-release-notes-952599592.html

             

            What is actually going on?  Is it solved? and in which version?

             

            Filip Håkansson added a comment - This bug is reported to be solved in both TC 6.0.14 and TC 6.0.15 but status is still "AWAITING RELEASE". https://confluence.atlassian.com/teamcal/team-calendars-6-0-14-release-notes-952055185.html https://confluence.atlassian.com/teamcal/team-calendars-6-0-15-release-notes-952599592.html   What is actually going on?  Is it solved? and in which version?  

              dluong Duy Truong Luong
              dluong Duy Truong Luong
              Affected customers:
              2 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: