Details
-
Type: Bug
-
Status: Closed
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: Point Radii Implementation
-
Fix Version/s: None
-
Component/s: Point Radii Migration
-
Labels:None
Description
When we run the insert script for gce_campaign_location_target_summary then its throwing time out error in mysql.
Following is the query.
mysql> insert into content_editor_google.gce_campaign_location_target_summary (searchEngineUserID, customerID, campaignID, campaignSEID, campaignName, targetID, targetType)(select searchEngineUsers.id as searchEngineUserID, searchEngineUsers.searchEngineIdentifier as customerID, gce_campaignTargetMap.campaignID, gce_campaign.searchEngineIdentifier as campaignSEID, gce_campaign.name as campaignName, gce_campaignTargetMap.targetID as targetID, gce_target.targetType as targetType from content_editor_google.gce_campaignTargetMap inner join content_editor_google.gce_target on gce_campaignTargetMap.targetID = gce_target.id inner join content_editor_google.gce_campaign on (gce_campaign.id = gce_campaignTargetMap.campaignID) inner join tsacommon.searchEngineUsers on (searchEngineUsers.id = gce_campaign.searchEngineUserID) where gce_target.targetType in ('city') and gce_campaign.name like '%GT' and gce_campaign.status != 'Deleted');
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
We queried and check how many rows the script trying to insert in the table. We found 108541. We feel this issue may occur in production.
mysql> select count from content_editor_google.gce_campaignTargetMap inner join content_editor_google.gce_target on gce_campaignTargetMap.targetID = gce_target.id inner join content_editor_google.gce_campaign on (gce_campaign.id = gce_campaignTargetMap.campaignID) inner join tsacommon.searchEngineUsers on (searchEngineUsers.id = gce_campaign.searchEngineUserID) where gce_target.targetType in ('city') and gce_campaign.name like '%GT' and gce_campaign.status != 'Deleted';
----------
count |
----------
108541 |
----------