Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12668

MockScheduler is not safe to use in concurrent code.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • unit tests

    Description

      The current implementation of MockScheduler executes tasks in the same stack when schedule is called. This violates Log's assumption since Log calls schedule while holding a lock. This can cause deadlock in tests.

      One solution is to change MockSchedule schedule method so that tick is not called. tick should be called by a stack (thread) that doesn't hold any locks.

      Attachments

        Issue Links

          Activity

            People

              iakunin Maksim Iakunin
              jagsancio Jose Armando Garcia Sancio
              Jose Armando Garcia Sancio Jose Armando Garcia Sancio
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: