diff --git a/field.go b/field.go index 69d08d504..02d7d9ce5 100644 --- a/field.go +++ b/field.go @@ -183,8 +183,8 @@ func (f *Field) Path() string { return f.path } // RowAttrStore returns the attribute storage. func (f *Field) RowAttrStore() AttrStore { return f.rowAttrStore } -// MaxShard returns the max shard in the field. -func (f *Field) MaxShard() uint64 { +// maxShard returns the max shard in the field. +func (f *Field) maxShard() uint64 { f.mu.RLock() defer f.mu.RUnlock() diff --git a/index.go b/index.go index 7217bb659..4b8b84ca8 100644 --- a/index.go +++ b/index.go @@ -220,7 +220,7 @@ func (i *Index) maxShard() uint64 { max := i.remoteMaxShard for _, f := range i.fields { - if shard := f.MaxShard(); shard > max { + if shard := f.maxShard(); shard > max { max = shard } }