Merge pull request #3672 from influxdb/jw-index

Remove unused in-memory index hash
pull/3675/merge
Jason Wilder 2015-08-14 16:51:11 -06:00
commit 15f7eda702
2 changed files with 1 additions and 8 deletions

View File

@ -52,6 +52,7 @@ There are breaking changes in this release. Please see the *Features* section be
- [#3517](https://github.com/influxdb/influxdb/pull/3517): Batch CQ writes to avoid timeouts. Thanks @dim.
- [#3522](https://github.com/influxdb/influxdb/pull/3522): Consume CQ results on request timeouts. Thanks @dim.
- [#3646](https://github.com/influxdb/influxdb/pull/3646): Fix nil FieldCodec panic.
- [#3672](https://github.com/influxdb/influxdb/pull/3672): Reduce in-memory index by 20%-30%
## v0.9.2 [2015-07-24]

View File

@ -298,7 +298,6 @@ type Measurement struct {
index *DatabaseIndex
// in-memory index fields
series map[string]*Series // sorted tagset string to the series object
seriesByID map[uint64]*Series // lookup table for series by their id
measurement *Measurement
seriesByTagKeyValue map[string]map[string]SeriesIDs // map from tag key to value to sorted set of series ids
@ -312,7 +311,6 @@ func NewMeasurement(name string, idx *DatabaseIndex) *Measurement {
fieldNames: make(map[string]struct{}),
index: idx,
series: make(map[string]*Series),
seriesByID: make(map[uint64]*Series),
seriesByTagKeyValue: make(map[string]map[string]SeriesIDs),
seriesIDs: make(SeriesIDs, 0),
@ -382,8 +380,6 @@ func (m *Measurement) AddSeries(s *Series) bool {
return false
}
m.seriesByID[s.id] = s
tagset := string(MarshalTags(s.Tags))
m.series[tagset] = s
m.seriesIDs = append(m.seriesIDs, s.id)
// the series ID should always be higher than all others because it's a new
@ -421,10 +417,6 @@ func (m *Measurement) DropSeries(seriesID uint64) {
if _, ok := m.seriesByID[seriesID]; !ok {
return
}
s := m.seriesByID[seriesID]
tagset := string(MarshalTags(s.Tags))
delete(m.series, tagset)
delete(m.seriesByID, seriesID)
var ids []uint64