Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335932

Summary: Nightly regression tests - delete all projects from database took 9h instead of 3,5h
Product: [Technology] Jubula Reporter: Markus Tiede <markus.tiede>
Component: CoreAssignee: Zeb Ford-Reitz <zeb.ford-reitz>
Status: CLOSED FIXED QA Contact: Tim Winselmann <tim.winselmann>
Severity: blocker    
Priority: P1 CC: Achim.Loerke, tim.winselmann
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
9h deletion none

Description Markus Tiede CLA 2011-02-01 03:27:59 EST
During the nightly regression test preparation the step "delete all projects from database" took 9h instead of (as normally) 3,5h. (s. the attached log files)
Comment 1 Markus Tiede CLA 2011-02-01 04:42:40 EST
Created attachment 188033 [details]
9h deletion
Comment 2 Markus Tiede CLA 2011-02-04 05:11:38 EST
This problem re-occured during the latest nightly regression tests.
Comment 3 Achim Loerke CLA 2011-02-04 07:32:45 EST
Restarted the hung DB instance.
Removed test result (details) from DB using SQL.
"delete all projects from database" took about 10 minutes afterwards.
Comment 4 Tim Winselmann CLA 2011-02-09 07:51:23 EST
The problem reoccurred in the nightly build today. Deleting all projects took 7,5 hours.
Comment 5 Tim Winselmann CLA 2011-02-10 02:27:54 EST
Also today the deletion of all projects took more than 8 hours.
Comment 6 Tim Winselmann CLA 2011-02-11 03:24:37 EST
Tonight the deletion of all projects took over 13 hours.
Comment 7 Achim Loerke CLA 2011-02-11 03:35:02 EST
Please look into this issue.

I have added indices to PARAMETER_LIST and TESTRESULT the tables, obvious with no (positive) effect.
Comment 8 Zeb Ford-Reitz CLA 2011-02-11 08:17:43 EST
I have dropped the index on PARAMETER_LIST for column IDX and added an index on PARAMETER_LIST for column CHILD. That should solve the problem temporarily, as full table scans can be avoided now when deleting one or more Parameter Details (PARAMETER_LIST has a FK to PARAMETER_DETAILS). In the performance tests that I performed locally the results were very good, deleting about 260,000 Parameter Details in under one minute.

This a temporary solution: I've added the index directly to the table, rather than generating it via ORM configuration. For this we will need to use a newer version of EclipseLink that supports the @Index annotation.
Comment 9 Zeb Ford-Reitz CLA 2011-02-15 08:01:00 EST
The added index greatly reduced the deletion time. I have updated Jubula's target platform definition for EclipseLink from 2.1 to 2.2 in order to allow use of the @Index annotation. I have also added the @Index annotation so that tables generated by EclipseLink will have the necessary indexes. I pushed these changes to the repository this morning, so they should be included starting with version 0.9.0.201102150428.
Comment 10 Tim Winselmann CLA 2011-02-16 08:53:14 EST
Deletion of projects is much faster now. In the nightly tests it took just 8 minutes.