Merge branch '1.2' into jw-merge-12
commit
b9e5375043
|
@ -8,7 +8,9 @@
|
|||
- [#7776](https://github.com/influxdata/influxdb/issues/7776): Add system information to /debug/vars.
|
||||
- [#7553](https://github.com/influxdata/influxdb/issues/7553): Add modulo operator to the query language.
|
||||
|
||||
## v1.2.1 [unreleased]
|
||||
## v1.2.1 [2017-03-08]
|
||||
|
||||
### Release Notes
|
||||
|
||||
### Bugfixes
|
||||
|
||||
|
@ -32,6 +34,7 @@
|
|||
- [#8084](https://github.com/influxdata/influxdb/issues/8084): Points missing after compaction
|
||||
- [#8085](https://github.com/influxdata/influxdb/issues/8085): panic: interface conversion: tsm1.Value is tsm1.IntegerValue, not tsm1.FloatValue.
|
||||
- [#8095](https://github.com/influxdata/influxdb/pull/8095): Fix race in WALEntry.Encode and Values.Deduplicate
|
||||
- [#8100](https://github.com/influxdata/influxdb/issues/8100): Include IsRawQuery in the rewritten statement for meta queries.
|
||||
|
||||
## v1.2.0 [2017-01-24]
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ func rewriteShowFieldKeysStatement(stmt *ShowFieldKeysStatement) (Statement, err
|
|||
SortFields: stmt.SortFields,
|
||||
OmitTime: true,
|
||||
Dedupe: true,
|
||||
IsRawQuery: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -72,6 +73,7 @@ func rewriteShowSeriesStatement(stmt *ShowSeriesStatement) (Statement, error) {
|
|||
SortFields: stmt.SortFields,
|
||||
OmitTime: true,
|
||||
Dedupe: true,
|
||||
IsRawQuery: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -149,6 +151,7 @@ func rewriteShowTagKeysStatement(stmt *ShowTagKeysStatement) (Statement, error)
|
|||
SortFields: stmt.SortFields,
|
||||
OmitTime: true,
|
||||
Dedupe: true,
|
||||
IsRawQuery: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -816,13 +816,22 @@ func (e *Engine) DeleteSeriesRange(seriesKeys []string, min, max int64) error {
|
|||
|
||||
// DeleteMeasurement deletes a measurement and all related series.
|
||||
func (e *Engine) DeleteMeasurement(name string, seriesKeys []string) error {
|
||||
// Delete the bulk of data outside of the fields lock
|
||||
if err := e.DeleteSeries(seriesKeys); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
e.fieldsMu.Lock()
|
||||
defer e.fieldsMu.Unlock()
|
||||
|
||||
// Delete any data that may have been written while we were deleting outside
|
||||
// of the lock
|
||||
if err := e.DeleteSeries(seriesKeys); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Remove the field type mapping
|
||||
delete(e.measurementFields, name)
|
||||
e.fieldsMu.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -484,9 +484,6 @@ func (s *Shard) createFieldsAndMeasurements(fieldsToCreate []*FieldCreate) error
|
|||
|
||||
// Add the field to the in memory index
|
||||
if err := m.CreateFieldIfNotExists(f.Field.Name, f.Field.Type, false); err != nil {
|
||||
if err == ErrFieldTypeConflict {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -611,9 +608,23 @@ func (s *Shard) validateSeriesAndFields(points []models.Point) ([]models.Point,
|
|||
default:
|
||||
continue
|
||||
}
|
||||
fieldsToCreate = append(fieldsToCreate, &FieldCreate{p.Name(), &Field{Name: string(iter.FieldKey()), Type: createType}})
|
||||
|
||||
if f := mf.FieldBytes(iter.FieldKey()); f != nil {
|
||||
// Field present in shard metadata, make sure there is no type conflict.
|
||||
if f.Type != createType {
|
||||
atomic.AddInt64(&s.stats.WritePointsDropped, 1)
|
||||
dropped++
|
||||
reason = fmt.Sprintf("%s: input field \"%s\" on measurement \"%s\" is type %s, already exists as type %s", ErrFieldTypeConflict, iter.FieldKey(), p.Name(), createType, f.Type)
|
||||
skip = true
|
||||
} else {
|
||||
continue // Field is present, and it's of the same type. Nothing more to do.
|
||||
}
|
||||
}
|
||||
|
||||
if !skip {
|
||||
fieldsToCreate = append(fieldsToCreate, &FieldCreate{p.Name(), &Field{Name: string(iter.FieldKey()), Type: createType}})
|
||||
}
|
||||
}
|
||||
continue // skip validation since all fields are new
|
||||
}
|
||||
|
||||
iter.Reset()
|
||||
|
|
Loading…
Reference in New Issue