Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-979 Ratis streaming
  3. RATIS-1447

Cleanup NettyClientStreamRpc#replies empty queue

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • Netty, Streaming
    • None

    Description

      org.apache.ratis.netty.client.NettyClientStreamRpc#replies

      private final ConcurrentMap<ClientInvocationId, Queue<CompletableFuture<DataStreamReply>>> replies =
            new ConcurrentHashMap<>();
      

      When all data for a streamID has been sent, is it necessary to clear the queue from the map´╝č

      I would implement a ExpiringMap. If you don't use it for a long time or Queue.size is 0, I delete it from the Map.

      Attachments

        1. 542_review2.patch
          7 kB
          Tsz-wo Sze
        2. 542_review.patch
          3 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              Nicholas Niu GuoHao
              Nicholas Niu GuoHao
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h
                  1h