influxdb/tsdb/index
Ayan George 4ef4fe9aef fix(tsi1): Acquire a lock when modifying measurement map
This patch protects an internal map for concurrent use.

(*LogFile).Writes() method calls
(*LogFile).createMeasurementIfNotExists() which writes to a shared map.

(*LogFile).Writes() acquires a read-lock which leaves
createMeasurementIfNotExists() open to concurrent writes to its shared
map.

This commit adds the ExecEntries method to the *LogFile type so that we
can properly lock calls to (*LogFile).appendEntry() using defer.

(*LogFile).ExecEntries() is used to mostly replace the body of
(*LogFile).Writes() and incurs another function call since ExecEntries()
can't be inlined.  Below is the output of build with "-m -m -m" gcflags:

  ./log_file.go:1076:6: cannot inline (*LogFile).ExecEntries: unhandled op DEFER

The performace impact of the additional function call should be
negligable and is outwieghed by the safety and simplicity of using
defer.
2020-08-31 12:52:54 -04:00
..
inmem perf(tsi1): batch write tombstone entries when dropping/deleting 2020-06-24 09:26:09 -06:00
internal Refactor File mock 2017-12-05 16:17:15 +00:00
tsi1 fix(tsi1): Acquire a lock when modifying measurement map 2020-08-31 12:52:54 -04:00
index.go reintegrating in-memory index 2017-01-05 10:07:35 -07:00