Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008440TestLinkDatabase MySQLpublic2018-10-29 17:312018-10-31 16:55
Reporternoliveira 
Assigned Tofman 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version7.2
Product Version1.9.18 (2018 Q3) 
Fixed in Version1.9.19 (2019 Q1) 
Summary0008440: After the upgrade from 1.9.14 to 1.9.18 updating a Testcase is extremly slow
DescriptionAfter the upgrade from 1.9.14 to 1.9.18 updating a Testcase is extremly slow. We have to wait more than one minute after click at "Passed" on a testcase.

We can see at MySQL this:

| 2376 | testlink-user | localhost | testlink | Query | 2 | Sending data | /* Class:testcase - Method: closeOpenReqLinks */ UPDATE req_versions
               SET is_open = |

This process takes more than one minute
Steps To Reproduce1. Open a Test case
2. Select passed
3. Wait and wait
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserChrome
PHP Version5.6.38
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships
child of 0008397assignedfman Availables hot-fixes for 1.9.18 & How To get full fixed package from GitHub 

-  Notes
(0028123)
fman (administrator)
2018-10-29 18:34

1) the query you have provided do not have a where condition this is not good
2) information about number of test cases , requirements are needed in order to understand if due to missing condition on (1), tons of records are updated.

3) Please get latest code from github, do fresh install, retest and provide feedback
(0028126)
noliveira (reporter)
2018-10-29 20:37

1) The query that I've send were incomplete.
| 2318 | testlink-user | localhost | testlink | Query | 38 | Sending data | /* Class:testcase - Method: closeOpenReqLinks */ UPDATE req_versions
               SET is_open = 0
               WHERE id IN (
                 SELECT req_version_id
                 FROM req_coverage
                  WHERE tcversion_id = 1369256 AND link_status = 1
               )
2) I will get this information with our QA team
3) This fresh install will include the hotfixes mentioned at the link above?
http://mantis.testlink.org/view.php?id=8397 [^]
(0028127)
fman (administrator)
2018-10-29 20:39

can you run the query on a mysql client to get more info?

>> 3) This fresh install will include the hotfixes mentioned at the link above?
>> http://mantis.testlink.org/view.php?id=8397 [^] [^]
yes
(0028128)
noliveira (reporter)
2018-10-29 20:53

Here is the query result:

mysql> UPDATE req_versions
    -> SET is_open = 0
    -> WHERE id IN (
    -> SELECT req_version_id
    -> FROM req_coverage
    -> WHERE tcversion_id = 1369256 AND link_status = 1
    -> );
Query OK, 0 rows affected (1 min 8.47 sec)
Rows matched: 0 Changed: 0 Warnings: 0

3) I will do the fresh install in a few minutes. Remove testlink folder, unzip the code from github, copy config_db.inc.php and open Testlink. Is that ok? Am I missing any step?
(0028129)
fman (administrator)
2018-10-29 21:03

can you run
SELECT req_version_id
    -> FROM req_coverage
    -> WHERE tcversion_id = 1369256 AND link_status = 1

and provide time?
(0028130)
noliveira (reporter)
2018-10-29 21:05

1) Here is it:
mysql> SELECT req_version_id FROM req_coverage WHERE tcversion_id = 1369256 AND link_status = 1;
Empty set (0.00 sec)

2) I will do the fresh install in a few minutes. Remove testlink folder, unzip the code from github, copy config_db.inc.php and open Testlink. Is that ok? Am I missing any step?
(0028131)
noliveira (reporter)
2018-10-29 21:19

At the fresh install with 1.9.19 [DEV] do I need to do some migrations at DB? I have this version now and the UPDATE above takes more than I minute.
(0028132)
fman (administrator)
2018-10-29 21:21

There is something strange.
I'm going to do some tests tomorrow to avoid the update if select provide null set.
This seems to be the issue.
(0028139)
noliveira (reporter)
2018-10-30 10:56

If you want I can do some tests.
(0028140)
noliveira (reporter)
2018-10-30 14:43

New info!
This test case was FAILED by the user and the UPDATE have the same result(link_status=1) as a PASSED test case.

| 11309 | testlink-user | localhost | testlink | Query | 4 | Sending data | /* Class:testcase - Method: closeOpenReqLinks */ UPDATE req_versions
               SET is_open = 0
               WHERE id IN (
                 SELECT req_version_id
                 FROM req_coverage
                  WHERE tcversion_id = 1369134 AND link_status = 1
               ) |
(0028141)
fman (administrator)
2018-10-30 14:47

it's ok because it depends on execution, not execution result
(0028142)
noliveira (reporter)
2018-10-30 14:51

Ok thanks. Do you have any tip to solve this problem? I have our QA team take twice as long to run a test.
(0028143)
fman (administrator)
2018-10-30 21:04

Please try
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/f4a24c5aedf4ad696644c3c9e47a861931dd9ca8 [^]

and provide feedback
(0028147)
noliveira (reporter)
2018-10-31 15:10

This issue is solved. Thank you so much for your effort.
How do I apply the HOTFIXES? Only replace the files and copy config.inc.php and config_db.inc.php?

- Issue History
Date Modified Username Field Change
2018-10-29 17:31 noliveira New Issue
2018-10-29 18:30 fman QA Team - Task Workflow Status => TBD
2018-10-29 18:30 fman Priority urgent => normal
2018-10-29 18:34 fman Note Added: 0028123
2018-10-29 18:37 fman Assigned To => fman
2018-10-29 18:37 fman Status new => feedback
2018-10-29 20:37 noliveira Note Added: 0028126
2018-10-29 20:37 noliveira Status feedback => assigned
2018-10-29 20:39 fman Note Added: 0028127
2018-10-29 20:53 noliveira Note Added: 0028128
2018-10-29 21:03 fman Note Added: 0028129
2018-10-29 21:05 noliveira Note Added: 0028130
2018-10-29 21:19 noliveira Note Added: 0028131
2018-10-29 21:21 fman Note Added: 0028132
2018-10-29 21:23 noliveira Note Added: 0028133
2018-10-30 10:56 noliveira Note Added: 0028139
2018-10-30 14:43 noliveira Note Added: 0028140
2018-10-30 14:47 fman Note Added: 0028141
2018-10-30 14:49 noliveira Note Deleted: 0028133
2018-10-30 14:51 noliveira Note Added: 0028142
2018-10-30 21:04 fman Note Added: 0028143
2018-10-30 21:04 fman Status assigned => feedback
2018-10-30 21:04 fman Relationship added child of 0008397
2018-10-30 21:26 noliveira Note Added: 0028144
2018-10-30 21:26 noliveira Status feedback => assigned
2018-10-31 15:10 noliveira Note Added: 0028147
2018-10-31 15:28 noliveira Note Deleted: 0028144
2018-10-31 16:55 fman Status assigned => resolved
2018-10-31 16:55 fman Fixed in Version => 1.9.19 (2019 Q1)
2018-10-31 16:55 fman Resolution open => fixed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker