otterc commented on pull request #30139:
URL: https://github.com/apache/spark/pull/30139#issuecomment-717008775


   > > This should have a considerable impact on the performance when there are 
multiple open streams because updates of different streams would lock on a 
single object `totalChunksBeingTransferred`. Isn't that the case?
   > 
   > Since `totalChunksBeingTransfereed` is atomic, when it update It has its 
own competition, add a lock at `totalChunksBeingTransfereed` won't have too 
much impact. And we can keep strong consistences between the streamState and 
the totalChunksBeingTransfered are updated synchronically.
   
   Hmmm. Every update to `chunkSent` and `chunkBeingSent` will compete for the 
lock on object `totalChunksBeingTransferred` if we add the 
`synchronize(totalChunksBeingTransferred)`. This would increase the time for 
these operations. This would mean that to speed up `chunksBeingTransferred`, we 
are increasing the time of updates to `streamState`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to