The Write window is used to keep track of how much buffer space is free in the remote to avoid one connection blocking the rest. Previously we checked the window and decided how much to write, then dropped the metadata mutex before performing the write. In theory another Write call on the same connection could see that buffer size is free, send too much and block the connection.
Therefore Write should take ownership of the space by bumping the current window before dropping the lock.
The Write window is used to keep track of how much buffer space is free in the remote to avoid one connection blocking the rest. Previously we checked the window and decided how much to write, then dropped the metadata mutex before performing the write. In theory another Write call on the same connection could see that buffer size is free, send too much and block the connection.
Therefore Write should take ownership of the space by bumping the
current
window before dropping the lock.