Re-check field type under write lock.
parent
fab0b86dc3
commit
4c202eea09
|
@ -19,6 +19,8 @@
|
|||
- [#8044](https://github.com/influxdata/influxdb/issues/8044): Treat non-reserved measurement names with underscores as normal measurements.
|
||||
- [#8078](https://github.com/influxdata/influxdb/issues/8078): Map types correctly when selecting a field with multiple measurements where one of the measurements is empty.
|
||||
- [#8080](https://github.com/influxdata/influxdb/issues/8080): Point.UnmarshalBinary() bounds check
|
||||
- [#8085](https://github.com/influxdata/influxdb/issues/8085): panic: interface conversion: tsm1.Value is tsm1.IntegerValue, not tsm1.FloatValue.
|
||||
|
||||
|
||||
## v1.2.0 [2017-01-24]
|
||||
|
||||
|
|
|
@ -1134,7 +1134,12 @@ func (m *MeasurementFields) CreateFieldIfNotExists(name string, typ influxql.Dat
|
|||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
// Re-check field and type under write lock.
|
||||
if f := m.fields[name]; f != nil {
|
||||
if f.Type != typ {
|
||||
return ErrFieldTypeConflict
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue