After the D7 upgrade, pift-cron is crashing due to PDO duplicate key issues during a db_update of pift_data.
This is likely coming from pift_test_sent(), which updates test request records with a test_id, after qa.d.o has assigned one for that test. The code assumes we have a unique identifier for test_id; but we are somehow getting a number of tests with '0' instead.
I suspect this may be occuring when a file is uploaded, the node is saved, and then it is saved and edited again before pift-cron has assigned the file a test_id. Either that, or the pift_test_add_files logic is broken ... but somehow tests are being double-queued.
Comments
Comment #1
jthorson CreditAttribution: jthorson commentedAh ... figured out what's happening. Looks like something is triggering the re-testing of 'hidden' files, which are causing the duplicate records.
Comment #2
jthorson CreditAttribution: jthorson commentedBelieve I need to rewrite pift_extract_untested_files() and pift_extract_files() to use EntityFieldQuery, and only queue up nodes which do not have display=0. Testing is temporarily unblocked again, and I'll tackle this tommorrow.
Comment #3
yched CreditAttribution: yched commentedFWIW, it happened to me on #2019055: Switch from field-level language fallback to entity-level language fallback, in comment #168 where I changed the issue to RTBC. Upon submitting the form, the next page displayed a sh*tload of "patch 2019055-xx.patch set to be retested" confirmation messages (one per patch in the issue, which was a *lot*).
Comment #4
jthorson CreditAttribution: jthorson commentedyched: And thanks for doing that ... because it wasn't until I realized all 46 duplicate records were from that same issue that I was able to deduce what was actually going on. :D
Comment #5
jthorson CreditAttribution: jthorson commentedShould be resolved by http://drupalcode.org/project/project_issue_file_test.git/commit/f04f74d...
Comment #6
jthorson CreditAttribution: jthorson commentedStill occurs ... happened this morning on a 'retest' request in https://drupal.org/node/2123897
Comment #7
jthorson CreditAttribution: jthorson commentedOnly did half the job last time ... here's the other half.
http://drupalcode.org/project/project_issue_file_test.git/commit/c6fca85...
Merged into BZR, ready for the next drupal.org deploy.