Bug 1027564

Summary: TestCaseRunStatus cached in a non thread-safe way
Product: [Other] TCMS Reporter: Chaobin Tang <ctang>
Component: ApplicationAssignee: Yang Ren <ryang>
Status: CLOSED NOTABUG QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.8.5CC: aigao, cqi, dli, fhuang, jianchen, junzhang, nli, ryang, vchen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-20 02:18:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chaobin Tang 2013-11-07 06:13:21 UTC
Description of problem:

In 3.8.5, as a quick solution to the performance headache in aggregating the progress for one testrun, the case_run_status is cached using a class level dictionary which basically is a global variable. In a shared-nothing environment such as Apache WSGI, this is a thread-unsage. Because in one process, this dictionary gets outdated, it doesn't in other running processes.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Need to change it to a thread-safe way. Possible solution might be to utilize a robust caching backend, such as memcached or better redis.

Comment 1 cqi 2013-11-18 03:52:26 UTC
Related to 1027589

Comment 4 fhuang 2014-10-20 02:18:34 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1027589 has been modified.