Bug 1115922 - [R|W separation] There is a query action happened on master db when invoke TestCaseRun.attach_bug method.
Summary: [R|W separation] There is a query action happened on master db when invoke Te...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: TCMS
Classification: Other
Component: XMLRPC
Version: 3.8.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Xu Lei
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-03 10:53 UTC by yangqiu
Modified: 2016-02-22 00:48 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-04 08:30:37 UTC
Embargoed:


Attachments (Terms of Use)
[R|W separation] There is a query action happened on master db when invoke TestCaseRun.attach_bug method. (253.06 KB, image/jpeg)
2014-07-03 10:53 UTC, yangqiu
no flags Details

Description yangqiu 2014-07-03 10:53:11 UTC
Created attachment 914443 [details]
[R|W separation] There is a query action happened on master db when invoke TestCaseRun.attach_bug method.

Description of problem:
as summary.

Version-Release number of selected component (if applicable):
v3.8.9-1 on test server.

How reproducible:
100%

Steps to Reproduce:
1.Invoke TestCaseRun.attach_bug method like:
n.TestCaseRun.attach_bug({
    'case_run_id': 5376601,
    'bug_id': 22222,
    'bug_system_id': 1,
    'summary': 'Testing TCMS',
    'description': 'qiyang test',
})
2.Check whether there is query action happened on master db. 

Actual results:
There is a query action happened on master db, like:
| 2014-07-03 18:45:34 | nitrate[nitrate] @ tcms-test.app.eng.nay.redhat.com [10.66.78.233] |       318 |     10133 | Query        | SELECT `test_case_bugs`.`id`, `test_case_bugs`.`bug_id`, `test_case_bugs`.`case_run_id`, `test_case_bugs`.`case_id`, `test_case_bugs`.`bug_system_id`, `test_case_bugs`.`summary`, `test_case_bugs`.`description` FROM `test_case_bugs` WHERE (`test_case_bugs`.`case_id` = 46490  AND `test_case_bugs`.`case_id` = 46490  AND `test_case_bugs`.`bug_id` = '22222'  AND `test_case_bugs`.`description` = 'qiyang test'  AND `test_case_bugs`.`summary` = 'Testing TCMS'  AND `test_case_bugs`.`bug_system_id` = 1  AND `test_case_bugs`.`case_run_id` = 5376601 ) |

Expected results:
There is no query action happened on master db.

Additional info:

Comment 1 Xu Lei 2014-07-04 07:29:53 UTC
it's django get_or_create() method behavior, we can not modify its source code.

Comment 2 Xu Lei 2014-07-04 07:35:22 UTC
won't fix

Comment 3 yangqiu 2014-07-04 08:30:37 UTC
Confirm with dev, can not modify the source code, so close the issue.


Note You need to log in before you can comment on or make changes to this bug.