Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-17042

cannot close gRPC stream for server when client calling stream /protos.Deliver/DeliverFiltered

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide
      1 bootstrap a fabric network
      2 create two channel with every chaincode deployed on them
      3 invoke either channel's chaincode continullay using tools like JMeter
      4 invoke another channel's chaincode once
      5 observe log from server.
      that's all steps.
      Show
      1 bootstrap a fabric network 2 create two channel with every chaincode deployed on them 3 invoke either channel's chaincode continullay using tools like JMeter 4 invoke another channel's chaincode once 5 observe log from server. that's all steps.

      Description

      1 Issue Description

      A fabric network bootstrapped with two channel created. And instaintiate a chaincode on two channels. When I invoke a chaincode' on a channel continually(such as, JMeter tool), at the same time I call other channel's chaincode once with tool,like Postman.  The surprising thing is the request from postman is over, but the peer side did not close method /protos.Deliver/DeliverFiltered stream for server. 

      2 Associated code and guess

      The associated code is in common/deliver/deliver.go file. The (*Handler) Handle method body  has a for loop , within that loop calling (*Handler) deliverBlocks. When a client's incoming stream came, the server receives it and call deliverBlocks. And cannot exit from deliverBlocks due to seekInfo.Stop is math.MaxUint64.  In other words, server side cannot receive io.EOF. So the server side cannot close stream.

      3 desired results

      When client close the stream, so does the gRPC server side.

       

      If more info needed for reproducing, I will add more.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            justformorefun wang hl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration