On 06/10/2014 11:22 PM, Josh Hunt wrote:
On 06/05/2014 12:39 PM, Bhupesh Purandare wrote:
Hello AutoTest dev,
We have been trying to save performance counters created by the IoZone
test as key value pairs and are running into problems which may be
related to

https://github.com/autotest/autotest/issues/625

The error seems to be triggered by this code
/usr/local/autotest/tko/dbutils.py :: insert_test()  lines 94 - 107

for i in test.iterations:
         for key, value in i.attr_keyval.iteritems():
             tko_models.IterationAttribute.objects.create(
                 test=tko_test,
                 attribute=key,
                 iteration=i.index,
                 value=value)

         for key, value in i.perf_keyval.iteritems():
             tko_models.IterationResult.objects.create(
                 test=tko_test,
                 iteration=i.index,
                 attribute=key,
                 value=value)

Since the tko_iteration_result table has a primary key test_idx which
is used for writing all attribute value pairs for a given test with
the same value for test_idx, the primary key constraint is violated.

We worked around the issue by removing the foreign key and primary
constraints on the tko_iteration_result table and then adding a new
compound primary key constraint comprising the (test_idx, attribute
and iteration fields) and finally adding the foreign key constraint.
We did this through mysql. However we would like to work with you to
find a correct solution by possibly modifying the initial code which
creates this table.

Looking at        , it seems
that django south has limitations about using compound primary keys.
But we would like to have a discussion about coming up with the
correct solution.

I have attached the .parse.log for this test.

We would like to provide a solution to this problem, but need feedback
to make sure we are approaching this correctly. If you feel our analysis
is incorrect, please let us know.

Ok, I've been having some crazy weeks at work, so I'm out of the loop. Is there any issue/PR already opened besides this email? I'm going to take a look at this tomorrow.

Thanks,

Lucas

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to