influxdb/.hooks
Edd Robinson 0fc7643d59 Fix data race in WAL
This commit fixes a data race in the WAL, which can occur when writes
and deletes are being executed concurrently. The WAL uses a buffer pool
of `[]byte` when reading the WAL. WAL entries are unmarshaled into these
buffers and passed along to the relevant methods handling the different
types of entry (write, delete etc).

In the case of deletes, the keys that need to be deleted were being
stored for later processing, however these keys were part of the backing
array of initial buffer from the pool. As such, those keys could be
written to at a future time when handling other parts of the WAL.
2018-03-15 12:51:30 +00:00
..
pre-commit Fix data race in WAL 2018-03-15 12:51:30 +00:00