Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(transport): don't reuse buffer for request data
Depending on the implementation of the request handler, reusing buffers is unsafe. For example, the Query API has an asynchronous request handler which means that modifying the buffer in `handleAtomixRequest` is a data race. Constructing an UnsafeBuffer is relatively cheap, so we can just do it for every request to be on the safe side. Alternatively we could have changed the interface for `RequestHandler` to accept the raw byte array instead of a buffer. (cherry picked from commit 768cc36)
- Loading branch information