mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
applied travis suggestions
This commit is contained in:
parent
27492a11cc
commit
8edd2b3d13
4 changed files with 10 additions and 12 deletions
8
field.go
8
field.go
|
|
@ -58,6 +58,10 @@ const (
|
|||
FieldTypeBool = "bool"
|
||||
)
|
||||
|
||||
func defaultShardValidator(shard uint64) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Field represents a container for views.
|
||||
type Field struct {
|
||||
mu sync.RWMutex
|
||||
|
|
@ -208,9 +212,7 @@ func newField(path, index, name string, opts FieldOption) (*Field, error) {
|
|||
|
||||
remoteAvailableShards: roaring.NewBitmap(),
|
||||
|
||||
shardValidator: func(uint64) bool {
|
||||
return true
|
||||
},
|
||||
shardValidator: defaultShardValidator,
|
||||
logger: logger.NopLogger,
|
||||
}
|
||||
return f, nil
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ type Holder struct {
|
|||
// The interval at which the cached row ids are persisted to disk.
|
||||
cacheFlushInterval time.Duration
|
||||
|
||||
shardValidatorfn func(index string, shard uint64) bool
|
||||
shardValidatorFunc func(index string, shard uint64) bool
|
||||
|
||||
Logger logger.Logger
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ func NewHolder() *Holder {
|
|||
NewAttrStore: newNopAttrStore,
|
||||
|
||||
cacheFlushInterval: defaultCacheFlushInterval,
|
||||
shardValidatorfn: func(index string, shard uint64) bool {
|
||||
shardValidatorFunc: func(index string, shard uint64) bool {
|
||||
return true //default
|
||||
},
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ func (h *Holder) newIndex(path, name string) (*Index, error) {
|
|||
index.newAttrStore = h.NewAttrStore
|
||||
index.columnAttrs = h.NewAttrStore(filepath.Join(index.path, ".data"))
|
||||
index.shardValidator = func(shard uint64) bool {
|
||||
return h.shardValidatorfn(name, shard)
|
||||
return h.shardValidatorFunc(name, shard)
|
||||
}
|
||||
return index, nil
|
||||
}
|
||||
|
|
|
|||
4
index.go
4
index.go
|
|
@ -75,9 +75,7 @@ func NewIndex(path, name string) (*Index, error) {
|
|||
broadcaster: NopBroadcaster,
|
||||
Stats: stats.NopStatsClient,
|
||||
logger: logger.NopLogger,
|
||||
shardValidator: func(uint64) bool {
|
||||
return true
|
||||
},
|
||||
shardValidator: defaultShardValidator,
|
||||
trackExistence: true,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
4
view.go
4
view.go
|
|
@ -76,9 +76,7 @@ func newView(path, index, field, name string, fieldOptions FieldOptions) *view {
|
|||
broadcaster: NopBroadcaster,
|
||||
stats: stats.NopStatsClient,
|
||||
logger: logger.NopLogger,
|
||||
shardValidator: func(uint64) bool {
|
||||
return true
|
||||
},
|
||||
shardValidator: defaultShardValidator,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue