otterc commented on pull request #30139:
URL: https://github.com/apache/spark/pull/30139#issuecomment-717341340
> I know that, but as @jiangxb1987 @mridulm mentioned, we need to ensure
the streamState and the totalChunksBeingTransfered are updated synchronically.
Add this lock is a
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
otterc commented on pull request #30139:
URL: https://github.com/apache/spark/pull/30139#issuecomment-717001727
> IMO, we can add a lock to keep strong consistence of value
`totalChunksBeingTransferred`, such as
>