Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-4396

Duplicate entry inserted in googleBudgetEstimates table For 1 BA/BL combination

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Mercury
    • Fix Version/s: Kirin
    • Component/s: Reseller UI
    • Labels:
      None
    • Environment:
    • Sprint:
      Sprint 2, Sprint 3

      Description

      Duplicate entry inserted in googleBudgetEstimates table For 1 BA/BL combination.

      1. Delete all the rows from budget_estimate.googleBudgetEstimates for a keyword list id .

      e.g Delete FROM budget_estimate.googleBudgetEstimates WHERE keywordListID= 1190;

      2. Create an order with the BA for which you deleted the rows.

      3. Run the below query

      SELECT * FROM budget_estimate.googleBudgetEstimates WHERE keywordListID= 1190;

      Expectation

      There should be one row in the table.

      Actual

      Two rows are getting inserted to the table .

      Note :

      Jboss log observed

      10:53:06,968 INFO [BudgetEstimateDAO] Query: SELECT gbe.id, gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.minPrice, gbe.maxPrice, gbe.minClicks, gbe.maxClicks, gbe.time FROM googleBudgetEstimates gbe WHERE gbe.keywordListID=? and gbe.googleLocationTargetID=? and gbe.currencyCode=? and gbe.languageCode=? ORDER BY gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.time DESC LIMIT 1
      10:53:06,968 DEBUG [JdbcTemplate] Executing prepared SQL query
      10:53:06,968 DEBUG [JdbcTemplate] Executing prepared SQL statement [SELECT gbe.id, gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.minPrice, gbe.maxPrice, gbe.minClicks, gbe.maxClicks, gbe.time FROM googleBudgetEstimates gbe WHERE gbe.keywordListID=? and gbe.googleLocationTargetID=? and gbe.currencyCode=? and gbe.languageCode=? ORDER BY gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.time DESC LIMIT 1]
      10:53:06,971 ERROR [BudgetEstimateDAO] A budget estimate was found with min/max prices = 110.31114/149.80527
      10:53:06,971 INFO [BudgetEstimateDAO] Query: INSERT INTO googleBudgetEstimates (keywordListID, googleLocationTargetID, currencyCode, languageCode, minPrice, maxPrice, minClicks, maxClicks, time) VALUES (?,?,?,?,?,?,?,?,?)
      10:53:06,971 DEBUG [JdbcTemplate] Executing prepared SQL update
      10:53:06,971 DEBUG [JdbcTemplate] Executing prepared SQL statement [INSERT INTO googleBudgetEstimates (keywordListID, googleLocationTargetID, currencyCode, languageCode, minPrice, maxPrice, minClicks, maxClicks, time) VALUES (?,?,?,?,?,?,?,?,?)]
      10:53:06,972 DEBUG [JdbcTemplate] SQL update affected 1 rows
      10:53:06,973 DEBUG [JdbcTemplate] Executing SQL query [select last_insert_id()]
      10:53:06,974 INFO [BudgetEstimateDAO] Requesting most recent budget estimate
      10:53:06,974 INFO [BudgetEstimateDAO] Query: SELECT gbe.id, gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.minPrice, gbe.maxPrice, gbe.minClicks, gbe.maxClicks, gbe.time FROM googleBudgetEstimates gbe WHERE gbe.keywordListID=? and gbe.googleLocationTargetID=? and gbe.currencyCode=? and gbe.languageCode=? ORDER BY gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.time DESC LIMIT 1
      10:53:06,974 DEBUG [JdbcTemplate] Executing prepared SQL query
      10:53:06,974 DEBUG [JdbcTemplate] Executing prepared SQL statement [SELECT gbe.id, gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.minPrice, gbe.maxPrice, gbe.minClicks, gbe.maxClicks, gbe.time FROM googleBudgetEstimates gbe WHERE gbe.keywordListID=? and gbe.googleLocationTargetID=? and gbe.currencyCode=? and gbe.languageCode=? ORDER BY gbe.keywordListID, gbe.googleLocationTargetID, gbe.currencyCode, gbe.languageCode, gbe.time DESC LIMIT 1]
      10:53:06,975 ERROR [BudgetEstimateDAO] A budget estimate was found with min/max prices = 65.99377/89.62117
      10:53:06,975 INFO [BudgetEstimateDAO] Query: INSERT INTO googleBudgetEstimates (keywordListID, googleLocationTargetID, currencyCode, languageCode, minPrice, maxPrice, minClicks, maxClicks, time) VALUES (?,?,?,?,?,?,?,?,?)
      10:53:06,976 DEBUG [JdbcTemplate] Executing prepared SQL update
      10:53:06,976 DEBUG [JdbcTemplate] Executing prepared SQL statement [INSERT INTO googleBudgetEstimates (keywordListID, googleLocationTargetID, currencyCode, languageCode, minPrice, maxPrice, minClicks, maxClicks, time) VALUES (?,?,?,?,?,?,?,?,?)]
      10:53:06,976 DEBUG [JdbcTemplate] SQL update affected 1 rows
      10:53:06,977 DEBUG [JdbcTemplate] Executing SQL query [select last_insert_id()]

        Attachments

          Activity

            People

            • Assignee:
              atul.sanagar Atul Sanagar (Inactive)
              Reporter:
              sanjaykumar.biswal Sanjay Kumar Biswal
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: