Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12887

Schedule UnfencedMessage would lost envelope info

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.9.0
    • None
    • Runtime / Coordination
    • None

    Description

      We provide runAsync, callAsync and scheduleRunAsync for MainThreadExecutable, while providing runAsyncWithoutFencing and callAsyncWithoutFencing additionally for FencedMainThreadExecutable.

      Let's think about a case when we want to schedule a unfenced runnable or any other unfenced message(currently, we don't have such code path but it's semantically valid.).

      1. FencedAkkaRpcActor received an unfenced runnable with delay
      2. It extracted the runnable from unfenced message and call super.handleRpcMessage.
      3. AkkaRpcActor enveloped the message and schedule it by AkkaRpcActor#L410.

      However, FencedAkkaRpcActor#envelopeSelfMessage was called for envelope. Thus the unfenced message now become a fenced message.

      We can anyway implement scheduleRunAsyncWithoutFencing to schedule unfenced message directly by actorsystem.scheduler.scheduleOnce(..., dispatcher), but with current codebase I notice that RunAsync has a wried atTimeNanos(i.e., delay) property. Ideally how to schedule a message is shown on what params ScheduleExecutorService called with, at least we cannot extract an unfenced message and envelop it into a fence message and then schedule it, which goes into wrong semantic.

      cc till.rohrmann

      Attachments

        Activity

          People

            tison Zili Chen
            tison Zili Chen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: