Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16430 FLIP-119 Pipelined Region Scheduling
  3. FLINK-17330

Avoid scheduling deadlocks caused by cyclic input dependencies between regions

    XMLWordPrintableJSON

Details

    Description

      Imagine a job like this:
      A – (pipelined FORWARD) --> B – (blocking ALL-to-ALL) --> D
      A – (pipelined FORWARD) --> C – (pipelined FORWARD) --> D
      parallelism=2 for all vertices.

      We will have 2 execution pipelined regions:
      R1 =

      {A1, B1, C1, D1}

      R2 =

      {A2, B2, C2, D2}

      R1 has a cross-region input edge (B2->D1).
      R2 has a cross-region input edge (B1->D2).

      Scheduling deadlock will happen since we schedule a region only when all its inputs are consumable (i.e. blocking partitions to be finished). This is because R1 can be scheduled only if R2 finishes, while R2 can be scheduled only if R1 finishes.

      To avoid this, one solution is to force a logical pipelined region with intra-region ALL-to-ALL blocking edges to form one only execution pipelined region, so that there would not be cyclic input dependency between regions.
      Besides that, we should also pay attention to avoid cyclic cross-region POINTWISE blocking edges.

      Attachments

        Issue Links

          Activity

            People

              zhuzh Zhu Zhu
              zhuzh Zhu Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: