Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-4312

report_event table can contain duplicates during hashing in migration 67

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 6.3.0
    • Component/s: PuppetDB
    • Labels:
    • Template:
    • Team:
      PuppetDB
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Bug caught before release
    • QA Risk Assessment:
      Needs Assessment

      Description

      During a migration to add a primary key to the resource_events table, the following error occurred:

      2019-03-18T14:46:11.220-07:00 ERROR [p.p.s.migrate] Caught SQLException during migration
      org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_events_transform_pkey"
      Detail: Key (event_hash)=(\x766eb99a3d40d81416446c565fed3866cf8226f6) already exists.
          at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
          at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
          at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
      

      Investigate if there's an issue with the migration, and add the hash lookup logic from the reports table migration if necessary.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  robert.roland Robert Roland
                  Reporter:
                  robert.roland Robert Roland
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support