mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fix tracing message. prevent reallocation of availableShards
This commit is contained in:
parent
d28170ddc6
commit
ca2241731d
2 changed files with 4 additions and 2 deletions
2
api.go
2
api.go
|
|
@ -561,7 +561,7 @@ func (api *API) FragmentBlocks(ctx context.Context, indexName, fieldName, viewNa
|
|||
|
||||
// FragmentData returns all data in the specified fragment.
|
||||
func (api *API) FragmentData(ctx context.Context, indexName, fieldName, viewName string, shard uint64) (io.WriterTo, error) {
|
||||
span, _ := tracing.StartSpanFromContext(ctx, "API.FragmentBlocks")
|
||||
span, _ := tracing.StartSpanFromContext(ctx, "API.FragmentData")
|
||||
defer span.Finish()
|
||||
|
||||
if err := api.validate(apiFragmentData); err != nil {
|
||||
|
|
|
|||
|
|
@ -1840,12 +1840,14 @@ func (c *cluster) nodeStatus() *NodeStatus {
|
|||
Node: c.Node,
|
||||
Schema: &Schema{Indexes: c.holder.Schema()},
|
||||
}
|
||||
var availableShards *roaring.Bitmap
|
||||
for _, idx := range ns.Schema.Indexes {
|
||||
is := &IndexStatus{Name: idx.Name}
|
||||
for _, f := range idx.Fields {
|
||||
availableShards := roaring.NewBitmap()
|
||||
if field := c.holder.Field(idx.Name, f.Name); field != nil {
|
||||
availableShards = field.AvailableShards()
|
||||
} else {
|
||||
availableShards = roaring.NewBitmap()
|
||||
}
|
||||
is.Fields = append(is.Fields, &FieldStatus{
|
||||
Name: f.Name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue