Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18202

MessagingService should be able deliver local messages (messages to self) without using a network interface.

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Triage Needed
    • Normal
    • Resolution: Unresolved
    • None
    • Messaging/Internode
    • None
    • All
    • None

    Description

      At the moment, in various places in the code, there are special code paths for local message handling. It usually looks like this:

       

      if (replica.isSelf)
        // deal with the message locally by manually invoking a handling method
      else
        messagingService.send(...)

       

      This pattern is error-prone, as failing to recognize local messages results in pushing them through a local network interface. This may introduce a significant performance penalty.
      It also makes understanding the code harder, as there are two separate code paths for message handling (local path and IVerbHandler).

      Instead, MessagingService should pass local messages directly to the appropriate IVerbHandler. Once this is done, all the `if (replica.isSelf) ... else ...` occurrences could be refactored to simply calling `messagingService.send(...)`. This would move message handling logic into a single place (IVerbHandler).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            jtgrabowski Jaroslaw Grabowski

            Dates

              Created:
              Updated:

              Slack

                Issue deployment