Unexport Row.InvalidateCount

This commit is contained in:
Cody Soyland 2018-07-05 21:53:29 -05:00
parent 018905fcd9
commit 259f5ac3b9
3 changed files with 8 additions and 8 deletions

View file

@ -661,7 +661,7 @@ func (e *executor) executeDifferenceShard(ctx context.Context, index string, c *
other = other.Difference(row)
}
}
other.InvalidateCount()
other.invalidateCount()
return other, nil
}
@ -715,7 +715,7 @@ func (e *executor) executeIntersectShard(ctx context.Context, index string, c *p
other = other.intersect(row)
}
}
other.InvalidateCount()
other.invalidateCount()
return other, nil
}
@ -937,7 +937,7 @@ func (e *executor) executeUnionShard(ctx context.Context, index string, c *pql.C
other = other.Union(row)
}
}
other.InvalidateCount()
other.invalidateCount()
return other, nil
}
@ -956,7 +956,7 @@ func (e *executor) executeXorShard(ctx context.Context, index string, c *pql.Cal
other = other.Xor(row)
}
}
other.InvalidateCount()
other.invalidateCount()
return other, nil
}

View file

@ -349,7 +349,7 @@ func (f *fragment) unprotectedRow(rowID uint64, checkRowCache bool, updateRowCac
writable: false,
}},
}
row.InvalidateCount()
row.invalidateCount()
if updateRowCache {
f.rowCache.Add(rowID, row)

6
row.go
View file

@ -63,7 +63,7 @@ func (r *Row) Merge(other *Row) {
}
r.segments = segments
r.InvalidateCount()
r.invalidateCount()
}
// intersectionCount returns the number of intersections between r and other.
@ -208,8 +208,8 @@ func (r *Row) createSegmentIfNotExists(shard uint64) *RowSegment {
return &r.segments[i]
}
// InvalidateCount updates the cached count in the row.
func (r *Row) InvalidateCount() {
// invalidateCount updates the cached count in the row.
func (r *Row) invalidateCount() {
for i := range r.segments {
r.segments[i].InvalidateCount()
}