Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14153

TcpCommunicationSpi#closeStaleConnections() doesn't work for outgoing connections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.1
    • 2.11
    • networking
    • None
    • Fixed an issue when connection closed by the one node could lead to infinite connection attempts on the other node.
    • Release Notes Required

    Description

      Scenario:
      1. Node1 established communication connection to Node2.
      2. Due to network issue the connection was closed on Node2 side, but was still alive on Node1 side. (half-open connection)
      3. At some point of time Node2 tries to send a message to Node1, and since there are no existing connections it creates a new one.
      4. Node1 detects that it already has connection to Node2 and prints next message:
      [TcpCommunicationSpi] Received incoming connection when already connected to this node, rejecting [locNode=2cc905e6-6666-48c1-b316-7652d6600001, rmtNode=44c537a7-6070-4272-a545-cff054b00000]
      5. Node1 tries to close existing connection by using closeStaleConnection() method, but since the connection was outcoming it skipped due to "if (ses0.accepted())" check.
      6. Node2 makes an infinite amount of tries to connect without success.

      Reproducer is attached.

      Attachments

        Issue Links

          Activity

            People

              ibelyakov Igor Belyakov
              ibelyakov Igor Belyakov
              Sergey Chugunov Sergey Chugunov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m