-
Bug
-
Resolution: Fixed
-
Highest
-
6.8.0
-
13
-
Severity 1 - Critical
-
0
-
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
- Create a calendar and an event
- Add one user to the event
- Add several more users to the event
- 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.