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

Kafka consumer overwrites the context

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • Provisioning
    • None
    • EnVision Sprint 33
    • None

      It looks like some sources availability checks errors with 404 when we call sources. We are supposed to use the same identity which comes from sources and it looks we do.

      However, in logging some org_id/account_numbers are not filled or do not match correctly. It looks like handling of identity is not correct and indeed the main consumer loop incorrectly overwrites the global context over and over again. This leads to random behavior when some messages using incorrect identities or logging incorrect data.

      The proper way of dealing with contexts is to always create a copy of the global context, this ensures that only copies are passed into processing functions and they do not interfere with other goroutines.

              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: