Merge pull request #2856 from influxdb/rv_fixes

Series was not already dropped, return false (and other fixes)
pull/2886/head
Philip O'Toole 2015-06-10 20:57:46 -07:00
commit 6d26f9c8a8
3 changed files with 6 additions and 6 deletions

View File

@ -360,13 +360,13 @@ func (m *Measurement) AddSeries(s *Series) bool {
return true
}
// DropSeries will remove a series from the measurementIndex. Returns true if already removed
func (m *Measurement) DropSeries(seriesID uint64) bool {
// DropSeries will remove a series from the measurementIndex.
func (m *Measurement) DropSeries(seriesID uint64) {
m.mu.Lock()
defer m.mu.Unlock()
if _, ok := m.seriesByID[seriesID]; !ok {
return true
return
}
s := m.seriesByID[seriesID]
tagset := string(marshalTags(s.Tags))
@ -408,7 +408,7 @@ func (m *Measurement) DropSeries(seriesID uint64) bool {
}
}
return true
return
}
// filters walks the where clause of a select statement and returns a map with all series ids

View File

@ -364,7 +364,7 @@ func (s *Shard) validateSeriesAndFields(points []Point) ([]*seriesCreate, []*fie
// validate field types and encode data
for name, value := range p.Fields() {
if f := mf.Fields[name]; f != nil {
// Field present in Metastore, make sure there is no type conflict.
// Field present in shard metadata, make sure there is no type conflict.
if f.Type != influxql.InspectDataType(value) {
return nil, nil, fmt.Errorf("field type conflict: input field \"%s\" is type %T, already exists as type %s", name, value, f.Type)
}

View File

@ -144,7 +144,7 @@ func (s *Store) Measurement(database, name string) *Measurement {
return db.Measurement(name)
}
// deleteSeries lopos through the local shards and deletes the series data and metadata for the passed in series keys
// deleteSeries loops through the local shards and deletes the series data and metadata for the passed in series keys
func (s *Store) deleteSeries(keys []string) error {
s.mu.RLock()
defer s.mu.RUnlock()