Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-639

WriteFuture are updated long after a session.write() is done

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.0-M3
    • Fix Version/s: 2.0.8
    • Component/s: None
    • Labels:
      None

      Description

      While expecting the writeFuture to be updated when the write has been done, it's done only when we get out of the chain. This is a major problem as you can't rely on this to bail a connection based on a slow client. Typically, we may stack thousands of message into the writeQueuebuffer, as the flush is only done when we have gone though the whole chain, and back.

      The only way to get the data be blushed immediately is to add an executorFilter on the WRITE eventType, in order to create a new thread to handle this flush, otherwise we have to wait for the current processor to be done with the chain processing.

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -

        Postponed to 3.0. It's not possible to fix this without rethinking the chain completely

        Show
        elecharny Emmanuel Lecharny added a comment - Postponed to 3.0. It's not possible to fix this without rethinking the chain completely
        Hide
        elecharny Emmanuel Lecharny added a comment -

        This is not a bug.

        The correct way to handle such a situation is to handle the messageSent event in the IoHandler, and to write the next message when the messageSent event is received.

        It might slow down the server, but it's still possible to send more than one message before waiting for the messageSent event.

        Show
        elecharny Emmanuel Lecharny added a comment - This is not a bug. The correct way to handle such a situation is to handle the messageSent event in the IoHandler, and to write the next message when the messageSent event is received. It might slow down the server, but it's still possible to send more than one message before waiting for the messageSent event.

          People

          • Assignee:
            Unassigned
            Reporter:
            elecharny Emmanuel Lecharny
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development