Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/mantidproject/mantid.git. Pull mirroring updated .
  1. Apr 08, 2020
    • David Fairbrother's avatar
      Remove race between Test and Kafka on extractData · ad08d23c
      David Fairbrother authored
      Resolves the race between the test thread and Kafka thread when Kafka is
      waiting for extractData to be called. We now use the callback mechanism
      in waitForRunObservation.
      
      Also adds some mutex's so the kernel can see when a CV should be
      rechecked, atomics work because eventually the scheduler gives in and
      tries again (hence we need pred.s). However, if we protect the atomic
      access the other thread is resumed when the lock is released from the
      original thread.
      ad08d23c
    • David Fairbrother's avatar
      Make KafkaDecoder tests run Lockstep to fix races · cdf3e7af
      David Fairbrother authored
      Converts the Kafka[Event/Histo]StreamDecoder tests to run in lockstep
      whenever possible. The previous version held the unit test for n number
      of Kafka steps then let both threads run free.
      
      This fixes numerous races resulting in flakey tests, for example is
      HistoStreamDecoder we waited for 1 iteration whereas three was required.
      Rather than just tweaking the values and hoping this new mechanism will
      deadlock if the threads get into a race-y condition. A timeout ensures
      that after 2 minutes we fail with an abort stating we deadlocked.
      
      This flushed out multiple races in the StreamDecoder too, however some
      tests which rely on the EndOfRunStream have to run unsyncronised: The
      the thread will block and the Kafka thread waits for ExtractData to be
      called, causing a deadlock. If we are having problems in the future that
      would be the first place to look, however for this commit it's out of
      scope.
      cdf3e7af
  2. Apr 03, 2020
  3. Apr 02, 2020
  4. Apr 01, 2020
  5. Mar 31, 2020
Loading