Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-1830

Account creation can error for constraint "accounts_org_id_key"

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • Provisioning
    • None
    • EnVision Sprint 29, EnVision Sprint 30, EnVision Sprint 31
    • None

      We made a conscious decision not to use transactions when creating accounts because it would be too slow. There are cases when user that don’t have account created in our database yet comes and performs operation that does many requests, this can lead to this error.

      To workaround that, we should catch this error in GetOrCreateByIdentity and try again (just one time) to compensate that. Alternatively since we have caching now, we can use transaction actually. Or using ON CONFLICT statement from Postgresql.

      https://glitchtip.devshift.net/insights/issues/793932

              rhn-engineering-lzapletal Lukáš Zapletal
              rhn-engineering-lzapletal Lukáš Zapletal
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: