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

Cleanup NettyClientStreamRpc#replies empty queue

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

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

          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

                Slack

                  Issue deployment