diff --git a/api_test.go b/api_test.go index a33b064c1..0cde55d59 100644 --- a/api_test.go +++ b/api_test.go @@ -17,6 +17,7 @@ package pilosa_test import ( "context" "fmt" + "math" "reflect" "strings" "testing" @@ -198,7 +199,7 @@ func TestAPI_ImportValue(t *testing.T) { if err != nil { t.Fatalf("creating index: %v", err) } - _, err = m0.API.CreateField(ctx, index, field, pilosa.OptFieldTypeInt(0, 100)) + _, err = m0.API.CreateField(ctx, index, field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatalf("creating field: %v", err) } diff --git a/docs/data-model.md b/docs/data-model.md index c12227a29..7de27b575 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -165,6 +165,14 @@ Set(3, B=6) Check out this [blog post](/blog/range-encoded-bitmaps/) for some more details about BSI in Pilosa. + +###### BSI Deprecated Format + +The original implementation of BSI required a fixed bit depth when creating fields because the existence bit was written to the bit above the highest bit. The second version of BSI moves the existence bit to the beginning, adds a negative bit as the second bit, and shifts all remaining bits up by two. + +Pilosa automatically converts all old data to the new format on startup, however, this can cause issues when upgrading Pilosa and then reverting back to an old version. This documentation section exists as a record for anyone who experiences unusual behavior in BSI between versions. + + #### Time Time fields are similar to `set` fields, but in addition to row and column information, they also store a per-bit time value down to a defined granularity. The following example creates a `time` field called "event" which stores timestamp information down to a day granularity. diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index d40db1fb9..a04ab929c 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -532,6 +532,8 @@ func encodeFieldOptions(o *pilosa.FieldOptions) *internal.FieldOptions { CacheSize: o.CacheSize, Min: o.Min, Max: o.Max, + Base: o.Base, + BitDepth: uint64(o.BitDepth), TimeQuantum: string(o.TimeQuantum), Keys: o.Keys, } @@ -800,6 +802,8 @@ func decodeFieldOptions(options *internal.FieldOptions, m *pilosa.FieldOptions) m.CacheSize = options.CacheSize m.Min = options.Min m.Max = options.Max + m.Base = options.Base + m.BitDepth = uint(options.BitDepth) m.TimeQuantum = pilosa.TimeQuantum(options.TimeQuantum) m.Keys = options.Keys } diff --git a/executor.go b/executor.go index 41077168e..07a83496d 100644 --- a/executor.go +++ b/executor.go @@ -597,12 +597,12 @@ func (e *executor) executeSumCountShard(ctx context.Context, index string, c *pq return ValCount{}, nil } - vsum, vcount, err := fragment.sum(filter, bsig.BitDepth()) + vsum, vcount, err := fragment.sum(filter, bsig.BitDepth) if err != nil { return ValCount{}, errors.Wrap(err, "computing sum") } return ValCount{ - Val: int64(vsum) + (int64(vcount) * bsig.Min), + Val: int64(vsum) + (int64(vcount) * bsig.Base), Count: int64(vcount), }, nil } @@ -638,12 +638,12 @@ func (e *executor) executeMinShard(ctx context.Context, index string, c *pql.Cal return ValCount{}, nil } - fmin, fcount, err := fragment.min(filter, bsig.BitDepth()) + fmin, fcount, err := fragment.min(filter, bsig.BitDepth) if err != nil { return ValCount{}, err } return ValCount{ - Val: int64(fmin) + bsig.Min, + Val: int64(fmin) + bsig.Base, Count: int64(fcount), }, nil } @@ -679,12 +679,12 @@ func (e *executor) executeMaxShard(ctx context.Context, index string, c *pql.Cal return ValCount{}, nil } - fmax, fcount, err := fragment.max(filter, bsig.BitDepth()) + fmax, fcount, err := fragment.max(filter, bsig.BitDepth) if err != nil { return ValCount{}, err } return ValCount{ - Val: int64(fmax) + bsig.Min, + Val: int64(fmax) + bsig.Base, Count: int64(fcount), }, nil } @@ -1405,10 +1405,9 @@ func (e *executor) executeRowBSIGroupShard(ctx context.Context, index string, c return NewRow(), nil } - return frag.notNull(bsig.BitDepth()) + return frag.notNull() } else if cond.Op == pql.BETWEEN { - predicates, err := cond.IntSliceValue() if err != nil { return nil, errors.Wrap(err, "getting condition value") @@ -1443,10 +1442,10 @@ func (e *executor) executeRowBSIGroupShard(ctx context.Context, index string, c // If the query is asking for the entire valid range, just return // the not-null bitmap for the bsiGroup. if predicates[0] <= bsig.Min && predicates[1] >= bsig.Max { - return frag.notNull(bsig.BitDepth()) + return frag.notNull() } - return frag.rangeBetween(bsig.BitDepth(), baseValueMin, baseValueMax) + return frag.rangeBetween(bsig.BitDepth, baseValueMin, baseValueMax) } else { @@ -1476,16 +1475,16 @@ func (e *executor) executeRowBSIGroupShard(ctx context.Context, index string, c // LT[E] and GT[E] should return all not-null if selected range fully encompasses valid bsiGroup range. if (cond.Op == pql.LT && value > bsig.Max) || (cond.Op == pql.LTE && value >= bsig.Max) || (cond.Op == pql.GT && value < bsig.Min) || (cond.Op == pql.GTE && value <= bsig.Min) { - return frag.notNull(bsig.BitDepth()) + return frag.notNull() } // outOfRange for NEQ should return all not-null. if outOfRange && cond.Op == pql.NEQ { - return frag.notNull(bsig.BitDepth()) + return frag.notNull() } f.Stats.Count("range:bsigroup", 1, 1.0) - return frag.rangeOp(cond.Op, bsig.BitDepth(), baseValue) + return frag.rangeOp(cond.Op, bsig.BitDepth, baseValue) } } diff --git a/executor_test.go b/executor_test.go index fd3090401..60a92db2f 100644 --- a/executor_test.go +++ b/executor_test.go @@ -20,6 +20,7 @@ import ( "flag" "fmt" "io/ioutil" + "math" "math/rand" "reflect" "strconv" @@ -769,7 +770,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(0, 50)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } else if _, err := index.CreateFieldIfNotExists("xxx", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) @@ -806,7 +807,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { hldr := test.Holder{Holder: c[0].Server.Holder()} index := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(0, 100)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -1214,7 +1215,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-10, 100)); err != nil { + if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -1262,32 +1263,6 @@ func TestExecutor_Execute_MinMax(t *testing.T) { } } }) - - t.Run("Max", func(t *testing.T) { - tests := []struct { - filter string - exp int64 - cnt int64 - }{ - {filter: ``, exp: 60, cnt: 1}, - {filter: `Row(x=0)`, exp: 60, cnt: 1}, - {filter: `Row(x=1)`, exp: -5, cnt: 1}, - {filter: `Row(x=2)`, exp: 40, cnt: 1}, - } - for i, tt := range tests { - var pql string - if tt.filter == "" { - pql = `Max(field=f)` - } else { - pql = fmt.Sprintf(`Max(%s, field=f)`, tt.filter) - } - if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: pql}); err != nil { - t.Fatal(err) - } else if !reflect.DeepEqual(result.Results[0], pilosa.ValCount{Val: tt.exp, Count: tt.cnt}) { - t.Fatalf("unexpected result, test %d: %s", i, spew.Sdump(result)) - } - } - }) }) t.Run("ColumnKey", func(t *testing.T) { @@ -1304,7 +1279,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-10, 100)); err != nil { + if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1110, 1000)); err != nil { t.Fatal(err) } @@ -1397,15 +1372,15 @@ func TestExecutor_Execute_Sum(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(10, 100)); err != nil { + if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100000)); err != nil { + if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -1455,15 +1430,15 @@ func TestExecutor_Execute_Sum(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(10, 100)); err != nil { + if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100000)); err != nil { + if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -1857,19 +1832,19 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(10, 100)); err != nil { + if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100000)); err != nil { + if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-100, 100)); err != nil { + if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-900, 1000)); err != nil { t.Fatal(err) } @@ -1893,8 +1868,8 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { t.Run("EQ", func(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(foo == 20)`}); err != nil { t.Fatal(err) - } else if !reflect.DeepEqual([]uint64{50, (5 * ShardWidth) + 100}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + } else if got, exp := result.Results[0].(*pilosa.Row).Columns(), []uint64{50, (5 * ShardWidth) + 100}; !reflect.DeepEqual(exp, got) { + t.Fatalf("Query().Row.Columns=%#v, expected %#v", got, exp) } }) @@ -1903,20 +1878,20 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(other != null)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{0}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + t.Fatalf("unexpected result: %#v", result.Results[0].(*pilosa.Row).Columns()) } // NEQ if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(foo != 20)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{ShardWidth, ShardWidth + 1, ShardWidth + 2}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + t.Fatalf("unexpected result: %#v", result.Results[0].(*pilosa.Row).Columns()) } // NEQ - if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(other != -20)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{0}, result.Results[0].(*pilosa.Row).Columns()) { //t.Fatalf("unexpected result: %s", spew.Sdump(result)) - t.Fatalf("unexpected result: %v", result.Results[0].(*pilosa.Row).Columns()) + t.Fatalf("unexpected result: %#v", result.Results[0].(*pilosa.Row).Columns()) } }) @@ -1931,8 +1906,8 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { t.Run("LTE", func(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(foo <= 20)`}); err != nil { t.Fatal(err) - } else if !reflect.DeepEqual([]uint64{50, ShardWidth + 2, (5 * ShardWidth) + 100}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + } else if got, exp := result.Results[0].(*pilosa.Row).Columns(), []uint64{50, ShardWidth + 2, (5 * ShardWidth) + 100}; !reflect.DeepEqual(got, exp) { + t.Fatalf("unexpected result: got=%v, exp=%v", got, exp) } }) @@ -1940,7 +1915,7 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(foo > 20)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{ShardWidth, ShardWidth + 1}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + t.Fatalf("unexpected result: %v", result.Results[0].(*pilosa.Row).Columns()) } }) @@ -1948,7 +1923,7 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(foo >= 20)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{50, ShardWidth, ShardWidth + 1, (5 * ShardWidth) + 100}, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result: %s", spew.Sdump(result)) + t.Fatalf("unexpected result: %v", result.Results[0].(*pilosa.Row).Columns()) } }) @@ -1968,7 +1943,7 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { {q: `Row(1000 < other <= 1000)`, exp: false}, {q: `Row(1000 < other < 2000)`, exp: false}, - {q: `Row(1000 <= other < 2000)`, exp: true}, + {q: `Row(1000 <= other < 20000)`, exp: true}, {q: `Row(1000 <= other <= 2000)`, exp: true}, {q: `Row(1000 < other <= 2000)`, exp: false}, } @@ -1981,7 +1956,7 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: test.q}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(expected, result.Results[0].(*pilosa.Row).Columns()) { - t.Fatalf("unexpected result for query: %s", test.q) + t.Fatalf("unexpected result for query: %s (%#v)", test.q, result.Results[0].(*pilosa.Row).Columns()) } }) } @@ -2022,7 +1997,7 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { }) t.Run("GTBelowMin", func(t *testing.T) { - if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(edge > -200)`}); err != nil { + if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Row(edge > -1000)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{0, 1}, result.Results[0].(*pilosa.Row).Columns()) { t.Fatalf("unexpected result: %s", spew.Sdump(result.Results[0].(*pilosa.Row).Columns())) @@ -2051,19 +2026,19 @@ func TestExecutor_Execute_Range_BSIGroup_Deprecated(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(10, 100)); err != nil { + if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100000)); err != nil { + if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-100, 100)); err != nil { + if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -2188,7 +2163,7 @@ func TestExecutor_Execute_Range_BSIGroup_Deprecated(t *testing.T) { }) t.Run("GTBelowMin", func(t *testing.T) { - if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Range(edge > -200)`}); err != nil { + if result, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Range(edge > -1200)`}); err != nil { t.Fatal(err) } else if !reflect.DeepEqual([]uint64{0, 1}, result.Results[0].(*pilosa.Row).Columns()) { t.Fatalf("unexpected result: %s", spew.Sdump(result.Results[0].(*pilosa.Row).Columns())) @@ -2821,7 +2796,7 @@ func TestExecutor_Execute_ClearRow(t *testing.T) { defer c.Close() hldr := test.Holder{Holder: c[0].Server.Holder()} index := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 100)) + _, err := index.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } diff --git a/field.go b/field.go index 3b0b63feb..73c09f14c 100644 --- a/field.go +++ b/field.go @@ -135,9 +135,6 @@ func OptFieldTypeInt(min, max int64) FieldOption { if fo.Type != "" { return errors.Errorf("field type is already set to: %s", fo.Type) } - if min > max { - return ErrInvalidBSIGroupRange - } fo.Type = FieldTypeInt fo.Min = min fo.Max = max @@ -448,6 +445,22 @@ func (f *Field) openViews() error { if err := view.open(); err != nil { return fmt.Errorf("opening view: view=%s, err=%s", view.name, err) } + + // Automatically upgrade BSI v1 fragments if they exist & reopen view. + if bsig := f.bsiGroup(f.name); bsig != nil { + if ok, err := upgradeViewBSIv2(view, bsig.BitDepth); err != nil { + return errors.Wrap(err, "upgrade view bsi v2") + } else if ok { + if err := view.close(); err != nil { + return errors.Wrap(err, "closing upgraded view") + } + view = f.newView(f.viewPath(name), name) + if err := view.open(); err != nil { + return fmt.Errorf("re-opening view: view=%s, err=%s", view.name, err) + } + } + } + view.rowAttrStore = f.rowAttrStore f.logger.Debugf("add index/field/view to field.viewMap: %s/%s/%s", f.index, f.name, view.name) f.viewMap[view.name] = view @@ -472,12 +485,23 @@ func (f *Field) loadMeta() error { } } + // Initialize "base" to "min" when upgrading from v1 BSI format. + if pb.BitDepth == 0 { + pb.Base = pb.Min + pb.BitDepth = uint64(bitDepthInt64(pb.Max - pb.Min)) + if pb.BitDepth == 0 { + pb.BitDepth = 1 + } + } + // Copy metadata fields. f.options.Type = pb.Type f.options.CacheType = pb.CacheType f.options.CacheSize = pb.CacheSize f.options.Min = pb.Min f.options.Max = pb.Max + f.options.Base = pb.Base + f.options.BitDepth = uint(pb.BitDepth) f.options.TimeQuantum = TimeQuantum(pb.TimeQuantum) f.options.Keys = pb.Keys f.options.NoStandardView = pb.NoStandardView @@ -523,6 +547,8 @@ func (f *Field) applyOptions(opt FieldOptions) error { } f.options.Min = 0 f.options.Max = 0 + f.options.Base = 0 + f.options.BitDepth = 0 f.options.TimeQuantum = "" f.options.Keys = opt.Keys case FieldTypeInt: @@ -531,15 +557,19 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.CacheSize = 0 f.options.Min = opt.Min f.options.Max = opt.Max + f.options.Base = opt.Base + f.options.BitDepth = opt.BitDepth f.options.TimeQuantum = "" f.options.Keys = opt.Keys // Create new bsiGroup. bsig := &bsiGroup{ - Name: f.name, - Type: bsiGroupTypeInt, - Min: opt.Min, - Max: opt.Max, + Name: f.name, + Type: bsiGroupTypeInt, + Min: opt.Min, + Max: opt.Max, + Base: opt.Base, + BitDepth: opt.BitDepth, } // Validate bsiGroup. if err := bsig.validate(); err != nil { @@ -554,6 +584,8 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.CacheSize = 0 f.options.Min = 0 f.options.Max = 0 + f.options.Base = 0 + f.options.BitDepth = 0 f.options.Keys = opt.Keys f.options.NoStandardView = opt.NoStandardView // Set the time quantum. @@ -567,6 +599,8 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.CacheSize = 0 f.options.Min = 0 f.options.Max = 0 + f.options.Base = 0 + f.options.BitDepth = 0 f.options.TimeQuantum = "" f.options.Keys = false default: @@ -965,18 +999,18 @@ func (f *Field) Value(columnID uint64) (value int64, exists bool, err error) { return 0, false, nil } - v, exists, err := view.value(columnID, bsig.BitDepth()) + v, exists, err := view.value(columnID, bsig.BitDepth) if err != nil { return 0, false, err } else if !exists { return 0, false, nil } - return int64(v) + bsig.Min, true, nil + return int64(v) + bsig.Base, true, nil } // SetValue sets a field value for a column. func (f *Field) SetValue(columnID uint64, value int64) (changed bool, err error) { - // Fetch bsiGroup and validate value. + // Fetch bsiGroup & validate min/max. bsig := f.bsiGroup(f.name) if bsig == nil { return false, ErrBSIGroupNotFound @@ -986,16 +1020,37 @@ func (f *Field) SetValue(columnID uint64, value int64) (changed bool, err error) return false, ErrBSIGroupValueTooHigh } + // Determine base value to store. + baseValue := int64(value - bsig.Base) + requiredBitDepth := bitDepthInt64(baseValue) + + // Increase bit depth value if the unsigned value is greater. + if requiredBitDepth > bsig.BitDepth { + if err := func() error { + f.mu.Lock() + defer f.mu.Unlock() + + uvalue := uint64(baseValue) + if value < 0 { + uvalue = uint64(-baseValue) + } + bitDepth := bitDepth(uvalue) + + bsig.BitDepth = bitDepth + f.options.BitDepth = bitDepth + return f.saveMeta() + }(); err != nil { + return false, errors.Wrap(err, "increasing bsi max") + } + } + // Fetch target view. view, err := f.createViewIfNotExists(viewBSIGroupPrefix + f.name) if err != nil { return false, errors.Wrap(err, "creating view") } - // Determine base value to store. - baseValue := uint64(value - bsig.Min) - - return view.setValue(columnID, bsig.BitDepth(), baseValue) + return view.setValue(columnID, bsig.BitDepth, baseValue) } // Sum returns the sum and count for a field. @@ -1011,11 +1066,11 @@ func (f *Field) Sum(filter *Row, name string) (sum, count int64, err error) { return 0, 0, nil } - vsum, vcount, err := view.sum(filter, bsig.BitDepth()) + vsum, vcount, err := view.sum(filter, bsig.BitDepth) if err != nil { return 0, 0, err } - return int64(vsum) + (int64(vcount) * bsig.Min), int64(vcount), nil + return int64(vsum) + (int64(vcount) * bsig.Base), int64(vcount), nil } // Min returns the min for a field. @@ -1031,11 +1086,11 @@ func (f *Field) Min(filter *Row, name string) (min, count int64, err error) { return 0, 0, nil } - vmin, vcount, err := view.min(filter, bsig.BitDepth()) + vmin, vcount, err := view.min(filter, bsig.BitDepth) if err != nil { return 0, 0, err } - return int64(vmin) + bsig.Min, int64(vcount), nil + return int64(vmin) + bsig.Base, int64(vcount), nil } // Max returns the max for a field. @@ -1051,11 +1106,11 @@ func (f *Field) Max(filter *Row, name string) (max, count int64, err error) { return 0, 0, nil } - vmax, vcount, err := view.max(filter, bsig.BitDepth()) + vmax, vcount, err := view.max(filter, bsig.BitDepth) if err != nil { return 0, 0, err } - return int64(vmax) + bsig.Min, int64(vcount), nil + return int64(vmax) + bsig.Base, int64(vcount), nil } // Range performs a conditional operation on Field. @@ -1079,7 +1134,7 @@ func (f *Field) Range(name string, op pql.Token, predicate int64) (*Row, error) return NewRow(), nil } - return view.rangeOp(op, bsig.BitDepth(), baseValue) + return view.rangeOp(op, bsig.BitDepth, baseValue) } // Import bulk imports data. @@ -1172,6 +1227,36 @@ func (f *Field) importValue(columnIDs []uint64, values []int64, options *ImportO return errors.Wrap(ErrBSIGroupNotFound, f.name) } + // Find the lowest/highest values. + var min, max int64 + for i, value := range values { + if i == 0 || value < min { + min = value + } + if i == 0 || value > max { + max = value + } + } + + // Determine the highest bit depth required by the min & max. + requiredDepth := bitDepthInt64(min - bsig.Base) + if v := bitDepthInt64(max - bsig.Base); v > requiredDepth { + requiredDepth = v + } + + // Increase bit depth if required. + if requiredDepth > bsig.BitDepth { + if err := func() error { + f.mu.Lock() + defer f.mu.Unlock() + bsig.BitDepth = requiredDepth + f.options.BitDepth = requiredDepth + return f.saveMeta() + }(); err != nil { + return errors.Wrap(err, "increasing bsi bit depth") + } + } + // Split import data by fragment. dataByFragment := make(map[importKey]importValueData) for i := range columnIDs { @@ -1194,7 +1279,6 @@ func (f *Field) importValue(columnIDs []uint64, values []int64, options *ImportO // Import into each fragment. for key, data := range dataByFragment { - // The view must already exist (i.e. we can't create it) // because we need to know bitDepth (based on min/max value). view, err := f.createViewIfNotExists(key.View) @@ -1207,12 +1291,12 @@ func (f *Field) importValue(columnIDs []uint64, values []int64, options *ImportO return errors.Wrap(err, "creating fragment") } - baseValues := make([]uint64, len(data.Values)) + baseValues := make([]int64, len(data.Values)) for i, value := range data.Values { - baseValues[i] = uint64(value - bsig.Min) + baseValues[i] = value - bsig.Base } - if err := frag.importValue(data.ColumnIDs, baseValues, bsig.BitDepth(), options.Clear); err != nil { + if err := frag.importValue(data.ColumnIDs, baseValues, requiredDepth, options.Clear); err != nil { return err } } @@ -1266,6 +1350,8 @@ func (p fieldInfoSlice) Less(i, j int) bool { return p[i].Name < p[j].Name } // FieldOptions represents options to set when initializing a field. type FieldOptions struct { + Base int64 `json:"base,omitempty"` + BitDepth uint `json:"bitDepth,omitempty"` Min int64 `json:"min,omitempty"` Max int64 `json:"max,omitempty"` Keys bool `json:"keys"` @@ -1302,6 +1388,8 @@ func encodeFieldOptions(o *FieldOptions) *internal.FieldOptions { Type: o.Type, CacheType: o.CacheType, CacheSize: o.CacheSize, + Base: o.Base, + BitDepth: uint64(o.BitDepth), Min: o.Min, Max: o.Max, TimeQuantum: string(o.TimeQuantum), @@ -1329,12 +1417,16 @@ func (o *FieldOptions) MarshalJSON() ([]byte, error) { }) case FieldTypeInt: return json.Marshal(struct { - Type string `json:"type"` - Min int64 `json:"min"` - Max int64 `json:"max"` - Keys bool `json:"keys"` + Type string `json:"type"` + Base int64 `json:"base"` + BitDepth uint `json:"bitDepth"` + Min int64 `json:"min"` + Max int64 `json:"max"` + Keys bool `json:"keys"` }{ o.Type, + o.Base, + o.BitDepth, o.Min, o.Max, o.Keys, @@ -1389,20 +1481,12 @@ func isValidBSIGroupType(v string) bool { // bsiGroup represents a group of range-encoded rows on a field. type bsiGroup struct { - Name string `json:"name,omitempty"` - Type string `json:"type,omitempty"` - Min int64 `json:"min,omitempty"` - Max int64 `json:"max,omitempty"` -} - -// BitDepth returns the number of bits required to store a value between min & max. -func (b *bsiGroup) BitDepth() uint { - for i := uint(0); i < 63; i++ { - if b.Max-b.Min < (1 << i) { - return i - } - } - return 63 + Name string `json:"name,omitempty"` + Type string `json:"type,omitempty"` + Min int64 `json:"min,omitempty"` + Max int64 `json:"max,omitempty"` + Base int64 `json:"base,omitempty"` + BitDepth uint `json:"bitDepth,omitempty"` } // baseValue adjusts the value to align with the range for Field for a certain @@ -1417,46 +1501,47 @@ func (b *bsiGroup) BitDepth() uint { // In order to make this work, we effectively need to change the operator to LTE. // Executor.executeBSIGroupRangeShard() takes this into account and returns // `frag.FieldNotNull(bsig.BitDepth())` in such instances. -func (b *bsiGroup) baseValue(op pql.Token, value int64) (baseValue uint64, outOfRange bool) { +func (b *bsiGroup) baseValue(op pql.Token, value int64) (baseValue int64, outOfRange bool) { + min, max := b.bitDepthMin(), b.bitDepthMax() + if op == pql.GT || op == pql.GTE { - if value > b.Max { + if value > max { return baseValue, true - } else if value > b.Min { - baseValue = uint64(value - b.Min) + } else if value > min { + baseValue = int64(value - b.Base) } } else if op == pql.LT || op == pql.LTE { - if value < b.Min { + if value < min { return baseValue, true - } else if value > b.Max { - baseValue = uint64(b.Max - b.Min) + } else if value > max { + baseValue = int64(max - b.Base) } else { - baseValue = uint64(value - b.Min) + baseValue = int64(value - b.Base) } } else if op == pql.EQ || op == pql.NEQ { - if value < b.Min || value > b.Max { + if value < min || value > max { return baseValue, true } - baseValue = uint64(value - b.Min) + baseValue = int64(value - b.Base) } return baseValue, false } // baseValueBetween adjusts the min/max value to align with the range for Field. -func (b *bsiGroup) baseValueBetween(min, max int64) (baseValueMin, baseValueMax uint64, outOfRange bool) { - if max < b.Min || min > b.Max { - return baseValueMin, baseValueMax, true +func (b *bsiGroup) baseValueBetween(lo, hi int64) (baseValueLo, baseValueHi int64, outOfRange bool) { + min, max := b.bitDepthMin(), b.bitDepthMax() + if hi < min || lo > max { + return 0, 0, true } - // Adjust min/max to range. - if min > b.Min { - baseValueMin = uint64(min - b.Min) + + // Limit lo/hi to possible bit range. + if lo < min { + lo = min } - // Make sure the high value of the BETWEEN does not exceed BitDepth. - if max > b.Max { - baseValueMax = uint64(b.Max - b.Min) - } else if max > b.Min { - baseValueMax = uint64(max - b.Min) + if hi > max { + hi = max } - return baseValueMin, baseValueMax, false + return lo - b.Base, hi - b.Base, false } func (b *bsiGroup) validate() error { @@ -1464,12 +1549,20 @@ func (b *bsiGroup) validate() error { return ErrBSIGroupNameRequired } else if !isValidBSIGroupType(b.Type) { return ErrInvalidBSIGroupType - } else if b.Min > b.Max { - return ErrInvalidBSIGroupRange } return nil } +// bitDepthMin returns the minimum value possible for the current bit depth. +func (b *bsiGroup) bitDepthMin() int64 { + return b.Base - (1 << b.BitDepth) + 1 +} + +// bitDepthMax returns the maximum value possible for the current bit depth. +func (b *bsiGroup) bitDepthMax() int64 { + return b.Base + (1 << b.BitDepth) - 1 +} + // Cache types. const ( CacheTypeLRU = "lru" @@ -1486,3 +1579,21 @@ func isValidCacheType(v string) bool { return false } } + +// bitDepth returns the number of bits required to store a value. +func bitDepth(v uint64) uint { + for i := uint(0); i < 63; i++ { + if v < (1 << i) { + return i + } + } + return 63 +} + +// bitDepthInt64 returns the required bit depth for abs(v). +func bitDepthInt64(v int64) uint { + if v < 0 { + return bitDepth(uint64(-v)) + } + return bitDepth(uint64(v)) +} diff --git a/field_internal_test.go b/field_internal_test.go index ad8337c31..13851a493 100644 --- a/field_internal_test.go +++ b/field_internal_test.go @@ -15,7 +15,9 @@ package pilosa import ( + "fmt" "io/ioutil" + "math" "os" "reflect" "testing" @@ -28,125 +30,127 @@ import ( // Ensure a bsiGroup can adjust to its baseValue. func TestBSIGroup_BaseValue(t *testing.T) { b0 := &bsiGroup{ - Name: "b0", - Type: bsiGroupTypeInt, - Min: -100, - Max: 900, + Name: "b0", + Type: bsiGroupTypeInt, + Base: -100, + BitDepth: 10, + Min: -1000, + Max: 1000, } b1 := &bsiGroup{ - Name: "b1", - Type: bsiGroupTypeInt, - Min: 0, - Max: 1000, + Name: "b1", + Type: bsiGroupTypeInt, + Base: 0, + BitDepth: 8, + Min: -255, + Max: 255, } - b2 := &bsiGroup{ - Name: "b2", - Type: bsiGroupTypeInt, - Min: 100, - Max: 1100, + Name: "b2", + Type: bsiGroupTypeInt, + Base: 100, + BitDepth: 11, + Min: math.MinInt64, + Max: math.MaxInt64, } t.Run("Normal Condition", func(t *testing.T) { - - for _, tt := range []struct { + for i, tt := range []struct { f *bsiGroup op pql.Token val int64 - expBaseValue uint64 + expBaseValue int64 expOutOfRange bool }{ // LT {b0, pql.LT, 5, 105, false}, {b0, pql.LT, -8, 92, false}, - {b0, pql.LT, -108, 0, true}, - {b0, pql.LT, 1005, 1000, false}, + {b0, pql.LT, -108, -8, false}, + {b0, pql.LT, 1005, 1023, false}, {b0, pql.LT, 0, 100, false}, {b1, pql.LT, 5, 5, false}, - {b1, pql.LT, -8, 0, true}, - {b1, pql.LT, 1005, 1000, false}, + {b1, pql.LT, -8, -8, false}, + {b1, pql.LT, 1005, 255, false}, {b1, pql.LT, 0, 0, false}, - {b2, pql.LT, 5, 0, true}, - {b2, pql.LT, -8, 0, true}, + {b2, pql.LT, 5, -95, false}, + {b2, pql.LT, -8, -108, false}, {b2, pql.LT, 105, 5, false}, - {b2, pql.LT, 1105, 1000, false}, + {b2, pql.LT, 1105, 1005, false}, // GT - {b0, pql.GT, -105, 0, false}, + {b0, pql.GT, -5, 95, false}, {b0, pql.GT, 5, 105, false}, - {b0, pql.GT, 905, 0, true}, + {b0, pql.GT, 905, 1005, false}, {b0, pql.GT, 0, 100, false}, {b1, pql.GT, 5, 5, false}, - {b1, pql.GT, -8, 0, false}, + {b1, pql.GT, -8, -8, false}, {b1, pql.GT, 1005, 0, true}, {b1, pql.GT, 0, 0, false}, - {b2, pql.GT, 5, 0, false}, - {b2, pql.GT, -8, 0, false}, + {b2, pql.GT, 5, -95, false}, + {b2, pql.GT, -8, -108, false}, {b2, pql.GT, 105, 5, false}, - {b2, pql.GT, 1105, 0, true}, + {b2, pql.GT, 1105, 1005, false}, // EQ - {b0, pql.EQ, -105, 0, true}, + {b0, pql.EQ, -105, -5, false}, {b0, pql.EQ, 5, 105, false}, - {b0, pql.EQ, 905, 0, true}, + {b0, pql.EQ, 905, 1005, false}, {b0, pql.EQ, 0, 100, false}, {b1, pql.EQ, 5, 5, false}, - {b1, pql.EQ, -8, 0, true}, + {b1, pql.EQ, -8, -8, false}, {b1, pql.EQ, 1005, 0, true}, {b1, pql.EQ, 0, 0, false}, - {b2, pql.EQ, 5, 0, true}, - {b2, pql.EQ, -8, 0, true}, + {b2, pql.EQ, 5, -95, false}, + {b2, pql.EQ, -8, -108, false}, {b2, pql.EQ, 105, 5, false}, - {b2, pql.EQ, 1105, 0, true}, + {b2, pql.EQ, 1105, 1005, false}, } { - bv, oor := tt.f.baseValue(tt.op, tt.val) - if oor != tt.expOutOfRange { - t.Fatalf("baseValue calculation on %s op %s, expected outOfRange %v, got %v", tt.f.Name, tt.op, tt.expOutOfRange, oor) - } else if !reflect.DeepEqual(bv, tt.expBaseValue) { - t.Fatalf("baseValue calculation on %s, expected value %v, got %v", tt.f.Name, tt.expBaseValue, bv) - } + t.Run(fmt.Sprint(i), func(t *testing.T) { + bv, oor := tt.f.baseValue(tt.op, tt.val) + if oor != tt.expOutOfRange || !reflect.DeepEqual(bv, tt.expBaseValue) { + t.Errorf("%s) baseValue(%s, %v)=(%v, %v), expected (%v, %v)", tt.f.Name, tt.op, tt.val, bv, oor, tt.expBaseValue, tt.expOutOfRange) + } + }) } }) - t.Run("Betwween Condition", func(t *testing.T) { - for _, tt := range []struct { + t.Run("Between Condition", func(t *testing.T) { + for i, tt := range []struct { f *bsiGroup predMin int64 predMax int64 - expBaseValueMin uint64 - expBaseValueMax uint64 + expBaseValueMin int64 + expBaseValueMax int64 expOutOfRange bool }{ - {b0, -205, -105, 0, 0, true}, - {b0, -105, 80, 0, 180, false}, + {b0, -205, -105, -105, -5, false}, + {b0, -105, 80, -5, 180, false}, {b0, 5, 20, 105, 120, false}, - {b0, 20, 1005, 120, 1000, false}, + {b0, 20, 1005, 120, 1023, false}, {b0, 1005, 2000, 0, 0, true}, - {b1, -105, -5, 0, 0, true}, - {b1, -5, 20, 0, 20, false}, + {b1, -105, -5, -105, -5, false}, + {b1, -5, 20, -5, 20, false}, {b1, 5, 20, 5, 20, false}, - {b1, 20, 1005, 20, 1000, false}, + {b1, 20, 1005, 20, 255, false}, {b1, 1005, 2000, 0, 0, true}, - {b2, 5, 95, 0, 0, true}, - {b2, 95, 120, 0, 20, false}, + {b2, 5, 95, -95, -5, false}, + {b2, 95, 120, -5, 20, false}, {b2, 105, 120, 5, 20, false}, - {b2, 120, 1105, 20, 1000, false}, - {b2, 1105, 2000, 0, 0, true}, + {b2, 120, 1105, 20, 1005, false}, + {b2, 1105, 2000, 1005, 1900, false}, } { min, max, oor := tt.f.baseValueBetween(tt.predMin, tt.predMax) - if oor != tt.expOutOfRange { - t.Fatalf("baseValueBetween calculation on %s, expected outOfRange %v, got %v", tt.f.Name, tt.expOutOfRange, oor) - } else if !reflect.DeepEqual(min, tt.expBaseValueMin) || !reflect.DeepEqual(max, tt.expBaseValueMax) { - t.Fatalf("baseValueBetween calculation on %s, expected min/max %v/%v, got %v/%v", tt.f.Name, tt.expBaseValueMin, tt.expBaseValueMax, min, max) + if !reflect.DeepEqual(min, tt.expBaseValueMin) || !reflect.DeepEqual(max, tt.expBaseValueMax) || oor != tt.expOutOfRange { + t.Errorf("%d. %s) baseValueBetween(%v, %v)=(%v, %v, %v), expected (%v, %v, %v)", i, tt.f.Name, tt.predMin, tt.predMax, min, max, oor, tt.expBaseValueMin, tt.expBaseValueMax, tt.expOutOfRange) } } }) diff --git a/field_test.go b/field_test.go index 88a3f3569..c60c9a833 100644 --- a/field_test.go +++ b/field_test.go @@ -16,6 +16,7 @@ package pilosa_test import ( "io/ioutil" + "math" "testing" "github.com/google/go-cmp/cmp" @@ -30,7 +31,7 @@ func TestField_SetValue(t *testing.T) { idx := test.MustOpenIndex() defer idx.Close() - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(0, 30)) + f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -63,7 +64,7 @@ func TestField_SetValue(t *testing.T) { idx := test.MustOpenIndex() defer idx.Close() - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(0, 30)) + f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } diff --git a/fragment.go b/fragment.go index 8e8fa0ce5..d9b9e8128 100644 --- a/fragment.go +++ b/fragment.go @@ -83,6 +83,14 @@ const ( // Row ids used for boolean fields. falseRowID = uint64(0) trueRowID = uint64(1) + + // BSI bits used to check existence & sign. + bsiExistsBit = 0 + bsiSignBit = 1 + bsiOffsetBit = 2 + + // Roaring bitmap flags. + roaringFlagBSIv2 = 0x01 // indicates version using low bit for existence ) // fragment represents the intersection of a field and shard in an index. @@ -97,6 +105,7 @@ type fragment struct { // File-backed storage path string + flags byte // user-defined flags passed to roaring file *os.File storage *roaring.Bitmap storageData []byte @@ -136,13 +145,14 @@ type fragment struct { } // newFragment returns a new instance of Fragment. -func newFragment(path, index, field, view string, shard uint64) *fragment { +func newFragment(path, index, field, view string, shard uint64, flags byte) *fragment { return &fragment{ path: path, index: index, field: field, view: view, shard: shard, + flags: flags, CacheType: DefaultCacheType, CacheSize: DefaultCacheSize, @@ -208,6 +218,7 @@ func (f *fragment) openStorage() error { // Create a roaring bitmap to serve as storage for the shard. if f.storage == nil { f.storage = roaring.NewFileBitmap() + f.storage.Flags = f.flags } // Open the data file to be mmap'd and used as an ops log. file, mustClose, err := syswrap.OpenFile(f.path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) @@ -679,12 +690,12 @@ func (f *fragment) bit(rowID, columnID uint64) (bool, error) { } // value uses a column of bits to read a multi-bit value. -func (f *fragment) value(columnID uint64, bitDepth uint) (value uint64, exists bool, err error) { +func (f *fragment) value(columnID uint64, bitDepth uint) (value int64, exists bool, err error) { f.mu.Lock() defer f.mu.Unlock() // If existence bit is unset then ignore remaining bits. - if v, err := f.bit(uint64(bitDepth), columnID); err != nil { + if v, err := f.bit(bsiExistsBit, columnID); err != nil { return 0, false, errors.Wrap(err, "getting existence bit") } else if !v { return 0, false, nil @@ -692,55 +703,75 @@ func (f *fragment) value(columnID uint64, bitDepth uint) (value uint64, exists b // Compute other bits into a value. for i := uint(0); i < bitDepth; i++ { - if v, err := f.bit(uint64(i), columnID); err != nil { + if v, err := f.bit(uint64(bsiOffsetBit+i), columnID); err != nil { return 0, false, errors.Wrapf(err, "getting value bit %d", i) } else if v { value |= (1 << i) } } + // Negate if sign bit set. + if v, err := f.bit(bsiSignBit, columnID); err != nil { + return 0, false, errors.Wrap(err, "getting sign bit") + } else if v { + value = -value + } + return value, true, nil } // clearValue uses a column of bits to clear a multi-bit value. -func (f *fragment) clearValue(columnID uint64, bitDepth uint, value uint64) (changed bool, err error) { +func (f *fragment) clearValue(columnID uint64, bitDepth uint, value int64) (changed bool, err error) { return f.setValueBase(columnID, bitDepth, value, true) } // setValue uses a column of bits to set a multi-bit value. -func (f *fragment) setValue(columnID uint64, bitDepth uint, value uint64) (changed bool, err error) { +func (f *fragment) setValue(columnID uint64, bitDepth uint, value int64) (changed bool, err error) { return f.setValueBase(columnID, bitDepth, value, false) } -func (f *fragment) positionsForValue(columnID uint64, bitDepth uint, value uint64, clear bool, toSet, toClear []uint64) ([]uint64, []uint64, error) { +func (f *fragment) positionsForValue(columnID uint64, bitDepth uint, value int64, clear bool, toSet, toClear []uint64) ([]uint64, []uint64, error) { + // Convert value to an unsigned representation. + uvalue := uint64(value) + if value < 0 { + uvalue = uint64(-value) + } + + // Mark value as set. + if bit, err := f.pos(bsiExistsBit, columnID); err != nil { + return toSet, toClear, errors.Wrap(err, "getting not-null pos") + } else if clear { + toClear = append(toClear, bit) + } else { + toSet = append(toSet, bit) + } + + // Mark sign. + if bit, err := f.pos(bsiSignBit, columnID); err != nil { + return toSet, toClear, errors.Wrap(err, "getting sign pos") + } else if value >= 0 || clear { + toClear = append(toClear, bit) + } else { + toSet = append(toSet, bit) + } + for i := uint(0); i < bitDepth; i++ { - bit, err := f.pos(uint64(i), columnID) + bit, err := f.pos(uint64(bsiOffsetBit+i), columnID) if err != nil { return toSet, toClear, errors.Wrap(err, "getting pos") } - if value&(1<= 0 || clear { + if c, err := f.unprotectedClearBit(uint64(bsiSignBit), columnID); err != nil { + return changed, errors.Wrap(err, "clearing sign") + } else if c { + changed = true + } + } else { + if c, err := f.unprotectedSetBit(uint64(bsiSignBit), columnID); err != nil { + return changed, errors.Wrap(err, "marking sign") + } else if c { + changed = true + } + } + return changed, nil } // importSetValue is a more efficient SetValue just for imports. -func (f *fragment) importSetValue(columnID uint64, bitDepth uint, value uint64, clear bool) (changed bool, err error) { // nolint: unparam +func (f *fragment) importSetValue(columnID uint64, bitDepth uint, value int64, clear bool) (changed bool, err error) { // nolint: unparam + // Convert value to an unsigned representation. + uvalue := uint64(value) + if value < 0 { + uvalue = uint64(-value) + } + for i := uint(0); i < bitDepth; i++ { - if value&(1<= 0 || clear { + if c, err := f.storage.Remove(p); err != nil { + return changed, errors.Wrap(err, "removing sign from storage") + } else if c { + changed = true + } + } else { + if c, err := f.storage.Add(p); err != nil { + return changed, errors.Wrap(err, "adding sign to storage") + } else if c { + changed = true + } + } + return changed, nil } // sum returns the sum of a given bsiGroup as well as the number of columns involved. // A bitmap can be passed in to optionally filter the computed columns. -func (f *fragment) sum(filter *Row, bitDepth uint) (sum, count uint64, err error) { +func (f *fragment) sum(filter *Row, bitDepth uint) (sum int64, count uint64, err error) { // Compute count based on the existence row. - consider := f.row(uint64(bitDepth)) + consider := f.row(bsiExistsBit) if filter != nil { consider = consider.Intersect(filter) } count = consider.Count() + // Determine positive & negative sets. + nrow := f.row(bsiSignBit) + prow := consider.Difference(nrow) + // Compute the sum based on the bit count of each row multiplied by the // place value of each row. For example, 10 bits in the 1's place plus // 4 bits in the 2's place plus 3 bits in the 4's place equals a total @@ -850,11 +924,16 @@ func (f *fragment) sum(filter *Row, bitDepth uint) (sum, count uint64, err error // // 10*(2^0) + 4*(2^1) + 3*(2^2) = 30 // - var cnt uint64 + // Execute once for positive numbers and once for negative. Subtract the + // negative sum from the positive sum. for i := uint(0); i < bitDepth; i++ { - row := f.row(uint64(i)) - cnt = row.intersectionCount(consider) - sum += (1 << i) * cnt + row := f.row(uint64(bsiOffsetBit + i)) + + psum := int64((1 << i) * row.intersectionCount(prow)) + nsum := int64((1 << i) * row.intersectionCount(nrow)) + + // Squash to reduce the possibility of overflow. + sum += psum - nsum } return sum, count, nil @@ -862,9 +941,8 @@ func (f *fragment) sum(filter *Row, bitDepth uint) (sum, count uint64, err error // min returns the min of a given bsiGroup as well as the number of columns involved. // A bitmap can be passed in to optionally filter the computed columns. -func (f *fragment) min(filter *Row, bitDepth uint) (min, count uint64, err error) { - - consider := f.row(uint64(bitDepth)) +func (f *fragment) min(filter *Row, bitDepth uint) (min int64, count uint64, err error) { + consider := f.row(bsiExistsBit) if filter != nil { consider = consider.Intersect(filter) } @@ -874,58 +952,79 @@ func (f *fragment) min(filter *Row, bitDepth uint) (min, count uint64, err error return 0, 0, nil } - for i := bitDepth; i > uint(0); i-- { - ii := i - 1 // allow for uint range: (bitDepth-1) to 0 - row := f.row(uint64(ii)) + // If we have negative values, we should find the highest unsigned value + // from that set, then negate it, and return it. For example, if values + // (-1, -2) exist, they are stored unsigned (1,2) with a negative sign bit + // set. We take the highest of that set (2) and negate it and return it. + if row := f.row(bsiSignBit).Intersect(consider); row.Any() { + min, count := f.maxUnsigned(row, bitDepth) + return -min, count, nil + } - x := consider.Difference(row) - count = x.Count() + // Otherwise find lowest positive number. + min, count = f.minUnsigned(consider, bitDepth) + return min, count, nil +} + +// minUnsigned the lowest value without considering the sign bit. Filter is required. +func (f *fragment) minUnsigned(filter *Row, bitDepth uint) (min int64, count uint64) { + for i := int(bitDepth - 1); i >= 0; i-- { + row := filter.Difference(f.row(uint64(bsiOffsetBit + i))) + count = row.Count() if count > 0 { - consider = x + filter = row } else { - min += (1 << ii) - if ii == 0 { - count = consider.Count() + min += (1 << uint(i)) + if i == 0 { + count = filter.Count() } } } - - return min, count, nil + return min, count } // max returns the max of a given bsiGroup as well as the number of columns involved. // A bitmap can be passed in to optionally filter the computed columns. -func (f *fragment) max(filter *Row, bitDepth uint) (max, count uint64, err error) { - - consider := f.row(uint64(bitDepth)) +func (f *fragment) max(filter *Row, bitDepth uint) (max int64, count uint64, err error) { + consider := f.row(bsiExistsBit) if filter != nil { consider = consider.Intersect(filter) } // If there are no columns to consider, return early. - if consider.Count() == 0 { + if !consider.Any() { return 0, 0, nil } - for i := bitDepth; i > uint(0); i-- { - ii := i - 1 // allow for uint range: (bitDepth-1) to 0 - row := f.row(uint64(ii)) - - x := row.Intersect(consider) - count = x.Count() - if count > 0 { - max += (1 << ii) - consider = x - } else if ii == 0 { - count = consider.Count() - } + // Find lowest negative number w/o sign and negate, if no positives are available. + pos := consider.Difference(f.row(bsiSignBit)) + if !pos.Any() { + max, count = f.minUnsigned(consider, bitDepth) + return -max, count, nil } + // Otherwise find highest positive number. + max, count = f.maxUnsigned(pos, bitDepth) return max, count, nil } +// maxUnsigned the highest value without considering the sign bit. Filter is required. +func (f *fragment) maxUnsigned(filter *Row, bitDepth uint) (max int64, count uint64) { + for i := int(bitDepth - 1); i >= 0; i-- { + row := f.row(uint64(bsiOffsetBit + i)).Intersect(filter) + count = row.Count() + if count > 0 { + max += (1 << uint(i)) + filter = row + } else if i == 0 { + count = filter.Count() + } + } + return max, count +} + // rangeOp returns bitmaps with a bsiGroup value encoding matching the predicate. -func (f *fragment) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, error) { +func (f *fragment) rangeOp(op pql.Token, bitDepth uint, predicate int64) (*Row, error) { switch op { case pql.EQ: return f.rangeEQ(bitDepth, predicate) @@ -940,14 +1039,23 @@ func (f *fragment) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, } } -func (f *fragment) rangeEQ(bitDepth uint, predicate uint64) (*Row, error) { +func (f *fragment) rangeEQ(bitDepth uint, predicate int64) (*Row, error) { // Start with set of columns with values set. - b := f.row(uint64(bitDepth)) + b := f.row(bsiExistsBit) + + // Filter to only positive/negative numbers. + upredicate := uint64(predicate) + if predicate < 0 { + upredicate = uint64(-predicate) + b = b.Intersect(f.row(bsiSignBit)) // only negatives + } else { + b = b.Difference(f.row(bsiSignBit)) // only positives + } // Filter any bits that don't match the current bit value. for i := int(bitDepth - 1); i >= 0; i-- { - row := f.row(uint64(i)) - bit := (predicate >> uint(i)) & 1 + row := f.row(uint64(bsiOffsetBit + i)) + bit := (upredicate >> uint(i)) & 1 if bit == 1 { b = b.Intersect(row) @@ -959,9 +1067,9 @@ func (f *fragment) rangeEQ(bitDepth uint, predicate uint64) (*Row, error) { return b, nil } -func (f *fragment) rangeNEQ(bitDepth uint, predicate uint64) (*Row, error) { +func (f *fragment) rangeNEQ(bitDepth uint, predicate int64) (*Row, error) { // Start with set of columns with values set. - b := f.row(uint64(bitDepth)) + b := f.row(bsiExistsBit) // Get the equal bitmap. eq, err := f.rangeEQ(bitDepth, predicate) @@ -975,22 +1083,44 @@ func (f *fragment) rangeNEQ(bitDepth uint, predicate uint64) (*Row, error) { return b, nil } -func (f *fragment) rangeLT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) { - keep := NewRow() - +func (f *fragment) rangeLT(bitDepth uint, predicate int64, allowEquality bool) (*Row, error) { // Start with set of columns with values set. - b := f.row(uint64(bitDepth)) + b := f.row(bsiExistsBit) + + // Create predicate without sign bit. + upredicate := uint64(predicate) + if predicate < 0 { + upredicate = uint64(-predicate) + } + + // If predicate is positive, return all positives less than predicate and all negatives. + if (predicate >= 0 && allowEquality) || (predicate >= -1 && !allowEquality) { + pos, err := f.rangeLTUnsigned(b.Difference(f.row(bsiSignBit)), bitDepth, upredicate, allowEquality) + if err != nil { + return nil, err + } + neg := f.row(bsiSignBit) + return neg.Union(pos), nil + } + + // Otherwise if predicate is negative, return all negatives greater than upredicate. + return f.rangeGTUnsigned(b.Intersect(f.row(bsiSignBit)), bitDepth, upredicate, allowEquality) +} + +// rangeLTUnsigned returns all bits LT/LTE the predicate without considering the sign bit. +func (f *fragment) rangeLTUnsigned(filter *Row, bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) { + keep := NewRow() // Filter any bits that don't match the current bit value. leadingZeros := true for i := int(bitDepth - 1); i >= 0; i-- { - row := f.row(uint64(i)) + row := f.row(uint64(bsiOffsetBit + i)) bit := (predicate >> uint(i)) & 1 // Remove any columns with higher bits set. if leadingZeros { if bit == 0 { - b = b.Difference(row) + filter = filter.Difference(row) continue } else { leadingZeros = false @@ -1004,32 +1134,54 @@ func (f *fragment) rangeLT(bitDepth uint, predicate uint64, allowEquality bool) if bit == 0 { return keep, nil } - return b.Difference(row.Difference(keep)), nil + return filter.Difference(row.Difference(keep)), nil } // If bit is zero then remove all set columns not in excluded bitmap. if bit == 0 { - b = b.Difference(row.Difference(keep)) + filter = filter.Difference(row.Difference(keep)) continue } // If bit is set then add columns for set bits to exclude. // Don't bother to compute this on the final iteration. if i > 0 { - keep = keep.Union(b.Difference(row)) + keep = keep.Union(filter.Difference(row)) } } - return b, nil + return filter, nil } -func (f *fragment) rangeGT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) { - b := f.row(uint64(bitDepth)) +func (f *fragment) rangeGT(bitDepth uint, predicate int64, allowEquality bool) (*Row, error) { + b := f.row(bsiExistsBit) + + // Create predicate without sign bit. + upredicate := uint64(predicate) + if predicate < 0 { + upredicate = uint64(-predicate) + } + + // If predicate is positive, return all positives greater than predicate. + if (predicate >= 0 && allowEquality) || (predicate >= -1 && !allowEquality) { + return f.rangeGTUnsigned(b.Difference(f.row(bsiSignBit)), bitDepth, upredicate, allowEquality) + } + + // If predicate is negative, return all negatives less than than upredicate and all positives. + neg, err := f.rangeLTUnsigned(b.Intersect(f.row(bsiSignBit)), bitDepth, upredicate, allowEquality) + if err != nil { + return nil, err + } + pos := b.Difference(f.row(bsiSignBit)) + return pos.Union(neg), nil +} + +func (f *fragment) rangeGTUnsigned(filter *Row, bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) { keep := NewRow() // Filter any bits that don't match the current bit value. for i := int(bitDepth - 1); i >= 0; i-- { - row := f.row(uint64(i)) + row := f.row(uint64(bsiOffsetBit + i)) bit := (predicate >> uint(i)) & 1 // Handle last bit differently. @@ -1039,68 +1191,102 @@ func (f *fragment) rangeGT(bitDepth uint, predicate uint64, allowEquality bool) if bit == 1 { return keep, nil } - return b.Difference(b.Difference(row).Difference(keep)), nil + return filter.Difference(filter.Difference(row).Difference(keep)), nil } // If bit is set then remove all unset columns not already kept. if bit == 1 { - b = b.Difference(b.Difference(row).Difference(keep)) + filter = filter.Difference(filter.Difference(row).Difference(keep)) continue } // If bit is unset then add columns with set bit to keep. // Don't bother to compute this on the final iteration. if i > 0 { - keep = keep.Union(b.Intersect(row)) + keep = keep.Union(filter.Intersect(row)) } } - return b, nil + return filter, nil } -// notNull returns the not-null row (stored at bitDepth). -func (f *fragment) notNull(bitDepth uint) (*Row, error) { - return f.row(uint64(bitDepth)), nil +// notNull returns the exists row. +func (f *fragment) notNull() (*Row, error) { + return f.row(bsiExistsBit), nil } // rangeBetween returns bitmaps with a bsiGroup value encoding matching any value between predicateMin and predicateMax. -func (f *fragment) rangeBetween(bitDepth uint, predicateMin, predicateMax uint64) (*Row, error) { - b := f.row(uint64(bitDepth)) +func (f *fragment) rangeBetween(bitDepth uint, predicateMin, predicateMax int64) (*Row, error) { + b := f.row(bsiExistsBit) + + // Convert predicates to unsigned values. + upredicateMin, upredicateMax := uint64(predicateMin), uint64(predicateMax) + if predicateMin < 0 { + upredicateMin = uint64(-predicateMin) + } + if predicateMax < 0 { + upredicateMax = uint64(-predicateMax) + } + + // Handle positive-only values. + if predicateMin >= 0 { + return f.rangeBetweenUnsigned(b.Difference(f.row(bsiSignBit)), bitDepth, upredicateMin, upredicateMax) + } + + // Handle negative-only values. Swap unsigned min/max predicates. + if predicateMax < 0 { + return f.rangeBetweenUnsigned(b.Intersect(f.row(bsiSignBit)), bitDepth, upredicateMax, upredicateMin) + } + + // If predicate crosses positive/negative boundary then handle separately and union. + pos, err := f.rangeLTUnsigned(b.Difference(f.row(bsiSignBit)), bitDepth, upredicateMax, true) + if err != nil { + return nil, err + } + neg, err := f.rangeLTUnsigned(b.Intersect(f.row(bsiSignBit)), bitDepth, upredicateMin, true) + if err != nil { + return nil, err + } + return pos.Union(neg), nil +} + +// rangeBetweenUnsigned returns BSI columns for a range of values. Disregards the sign bit. +func (f *fragment) rangeBetweenUnsigned(filter *Row, bitDepth uint, predicateMin, predicateMax uint64) (*Row, error) { keep1 := NewRow() // GTE keep2 := NewRow() // LTE // Filter any bits that don't match the current bit value. for i := int(bitDepth - 1); i >= 0; i-- { - row := f.row(uint64(i)) + row := f.row(uint64(bsiOffsetBit + i)) bit1 := (predicateMin >> uint(i)) & 1 bit2 := (predicateMax >> uint(i)) & 1 // GTE predicateMin // If bit is set then remove all unset columns not already kept. if bit1 == 1 { - b = b.Difference(b.Difference(row).Difference(keep1)) + filter = filter.Difference(filter.Difference(row).Difference(keep1)) } else { // If bit is unset then add columns with set bit to keep. // Don't bother to compute this on the final iteration. if i > 0 { - keep1 = keep1.Union(b.Intersect(row)) + keep1 = keep1.Union(filter.Intersect(row)) } } - // LTE predicateMin + // LTE predicateMax // If bit is zero then remove all set bits not in excluded bitmap. if bit2 == 0 { - b = b.Difference(row.Difference(keep2)) + filter = filter.Difference(row.Difference(keep2)) } else { // If bit is set then add columns for set bits to exclude. // Don't bother to compute this on the final iteration. if i > 0 { - keep2 = keep2.Union(b.Difference(row)) + keep2 = keep2.Union(filter.Difference(row)) } } } - return b, nil + return filter, nil } // pos translates the row ID and column ID into a position in the storage bitmap. @@ -1735,7 +1921,7 @@ func (f *fragment) bulkImportMutex(rowIDs, columnIDs []uint64) error { return errors.Wrap(f.importPositions(toSet, toClear, rowSet), "importing positions") } -func (f *fragment) importValueSmallWrite(columnIDs, values []uint64, bitDepth uint, clear bool) error { +func (f *fragment) importValueSmallWrite(columnIDs []uint64, values []int64, bitDepth uint, clear bool) error { // TODO figure out how to avoid re-allocating these each time. Probably // possible to store them on the fragment with a capacity based on // MaxOpN. For now, we know that the total number of bits to be @@ -1751,6 +1937,7 @@ func (f *fragment) importValueSmallWrite(columnIDs, values []uint64, bitDepth ui if _, ok := colSet[columnID]; ok { continue } + colSet[columnID] = struct{}{} toSet, toClear, err = f.positionsForValue(columnID, bitDepth, value, clear, toSet, toClear) if err != nil { @@ -1772,7 +1959,7 @@ func (f *fragment) importValueSmallWrite(columnIDs, values []uint64, bitDepth ui } // importValue bulk imports a set of range-encoded values. -func (f *fragment) importValue(columnIDs, values []uint64, bitDepth uint, clear bool) error { +func (f *fragment) importValue(columnIDs []uint64, values []int64, bitDepth uint, clear bool) error { f.mu.Lock() defer f.mu.Unlock() @@ -1783,7 +1970,6 @@ func (f *fragment) importValue(columnIDs, values []uint64, bitDepth uint, clear if len(columnIDs)*int(bitDepth+1)+f.opN < f.MaxOpN { return errors.Wrap(f.importValueSmallWrite(columnIDs, values, bitDepth, clear), "import small write") - } f.storage.OpWriter = nil @@ -2288,6 +2474,51 @@ func (f *fragment) rows(start uint64, filters ...rowFilter) []uint64 { return rows } +// upgradeRoaringBSIv2 upgrades a fragment that contains old BSI formatting +// to a new BSI format (v2). The new format moves the "exists" bit to the +// beginning & adds a negative sign bit. +func upgradeRoaringBSIv2(f *fragment, bitDepth uint) (string, error) { + // If flag set, already upgraded. Exit. + if f.storage.Flags&roaringFlagBSIv2 == 1 { + return "", nil + } + + other := roaring.NewBitmap() + other.Flags = roaringFlagBSIv2 + func() { + f.mu.Lock() + defer f.mu.Unlock() + + f.storage.ForEach(func(i uint64) { + rowID, columnID := i/ShardWidth, (f.shard*ShardWidth)+(i%ShardWidth) + if rowID == uint64(bitDepth) { + _, _ = other.Add(pos(bsiExistsBit, columnID)) // move exists bit to beginning + } else { + _, _ = other.Add(pos(rowID+bsiOffsetBit, columnID)) // move other bits up + } + }) + }() + + // Create temporary file next to existing file. + newPath := f.path + ".tmp" + file, err := os.OpenFile(newPath, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + return "", err + } + defer file.Close() + + // Write & flush to temporary file. + if _, err := other.WriteTo(file); err != nil { + return "", err + } else if err := file.Sync(); err != nil { + return "", err + } else if err := file.Close(); err != nil { + return "", err + } + + return newPath, nil +} + type rowIterator struct { f *fragment rowIDs []uint64 diff --git a/fragment_internal_test.go b/fragment_internal_test.go index 43b11357c..ecc506814 100644 --- a/fragment_internal_test.go +++ b/fragment_internal_test.go @@ -276,7 +276,7 @@ func TestFragment_SetValue(t *testing.T) { } // Non-existent value. - if value, exists, err := f.value(100, 11); err != nil { + if value, exists, err := f.value(101, 11); err != nil { t.Fatal(err) } else if value != 0 { t.Fatalf("unexpected value: %d", value) @@ -305,7 +305,7 @@ func TestFragment_SetValue(t *testing.T) { m[columnID] = int64(value) - if _, err := f.setValue(columnID, bitDepth, value); err != nil { + if _, err := f.setValue(columnID, bitDepth, int64(value)); err != nil { t.Fatal(err) } } @@ -409,7 +409,7 @@ func TestFragment_MinMax(t *testing.T) { t.Run("Min", func(t *testing.T) { tests := []struct { filter *Row - exp uint64 + exp int64 cnt uint64 }{ {filter: nil, exp: 0, cnt: 1}, @@ -433,7 +433,7 @@ func TestFragment_MinMax(t *testing.T) { t.Run("Max", func(t *testing.T) { tests := []struct { filter *Row - exp uint64 + exp int64 cnt uint64 }{ {filter: nil, exp: 2818, cnt: 2}, @@ -444,12 +444,15 @@ func TestFragment_MinMax(t *testing.T) { {filter: NewRow(7000), exp: 0, cnt: 1}, } for i, test := range tests { + var columns []uint64 + if test.filter != nil { + columns = test.filter.Columns() + } + if max, cnt, err := f.max(test.filter, bitDepth); err != nil { t.Fatal(err) - } else if max != test.exp { - t.Errorf("test %d expected max: %v, but got: %v", i, test.exp, max) - } else if cnt != test.cnt { - t.Errorf("test %d expected cnt: %v, but got: %v", i, test.cnt, cnt) + } else if max != test.exp || cnt != test.cnt { + t.Errorf("%d. max(%v, %v)=(%v, %v), expected (%v, %v)", i, columns, bitDepth, max, cnt, test.exp, test.cnt) } } }) @@ -657,7 +660,7 @@ func benchmarkSetValues(b *testing.B, bitDepth uint, f *fragment, cfunc func(uin for i := 0; i < b.N; i++ { // We're not checking the error because this is a benchmark. // That does mean the result could be completely wrong... - _, _ = f.setValue(column, bitDepth, uint64(i)) + _, _ = f.setValue(column, bitDepth, int64(i)) column = cfunc(column) } } @@ -686,9 +689,9 @@ func benchmarkImportValues(b *testing.B, bitDepth uint, f *fragment, cfunc func( column := uint64(0) b.StopTimer() columns := make([]uint64, b.N) - values := make([]uint64, b.N) + values := make([]int64, b.N) for i := 0; i < b.N; i++ { - values[i] = uint64(i) + values[i] = int64(i) columns[i] = column column = cfunc(column) } @@ -805,23 +808,23 @@ func BenchmarkFragment_RepeatedSmallImportsRoaring(b *testing.B) { func BenchmarkFragment_RepeatedSmallValueImports(b *testing.B) { initialCols := make([]uint64, 0, ShardWidth) - initialVals := make([]uint64, 0, ShardWidth) + initialVals := make([]int64, 0, ShardWidth) for i := uint64(0); i < ShardWidth; i++ { // every 29 columns, skip between 0 and 12 columns if i%29 == 0 { i += i % 13 } initialCols = append(initialCols, i) - initialVals = append(initialVals, uint64(rand.Int63n(1<<21))) + initialVals = append(initialVals, int64(rand.Int63n(1<<21))) } for _, numUpdates := range []int{100} { for _, valsPerUpdate := range []int{10, 100} { updateCols := make([]uint64, numUpdates*valsPerUpdate) - updateVals := make([]uint64, numUpdates*valsPerUpdate) + updateVals := make([]int64, numUpdates*valsPerUpdate) for i := 0; i < numUpdates*valsPerUpdate; i++ { updateCols[i] = uint64(rand.Int63n(ShardWidth)) - updateVals[i] = uint64(rand.Int63n(1 << 21)) + updateVals[i] = int64(rand.Int63n(1 << 21)) } for _, opN := range []int{1, 5000, 50000} { @@ -1372,7 +1375,7 @@ func BenchmarkFragment_Blocks(b *testing.B) { } // Open the fragment specified by the path. - f := newFragment(*FragmentPath, "i", "f", viewStandard, 0) + f := newFragment(*FragmentPath, "i", "f", viewStandard, 0, 0) if err := f.Open(); err != nil { b.Fatal(err) } @@ -1901,7 +1904,7 @@ func BenchmarkFragment_Snapshot(b *testing.B) { b.ReportAllocs() // Open the fragment specified by the path. - f := newFragment(*FragmentPath, "i", "f", viewStandard, 0) + f := newFragment(*FragmentPath, "i", "f", viewStandard, 0, 0) if err := f.Open(); err != nil { b.Fatal(err) } @@ -2231,7 +2234,7 @@ func BenchmarkImportIntoLargeFragment(b *testing.B) { } origF.Close() fi.Close() - nf := newFragment(fi.Name(), "i", "f", viewStandard, 0) + nf := newFragment(fi.Name(), "i", "f", viewStandard, 0, 0) err = nf.Open() if err != nil { b.Fatalf("opening fragment: %v", err) @@ -2268,7 +2271,7 @@ func BenchmarkImportRoaringIntoLargeFragment(b *testing.B) { } origF.Close() fi.Close() - nf := newFragment(fi.Name(), "i", "f", viewStandard, 0) + nf := newFragment(fi.Name(), "i", "f", viewStandard, 0, 0) err = nf.Open() if err != nil { b.Fatalf("opening fragment: %v", err) @@ -2463,7 +2466,7 @@ func mustOpenFragment(index, field, view string, shard uint64, cacheType string) cacheType = DefaultCacheType } - f := newFragment(file.Name(), index, field, view, shard) + f := newFragment(file.Name(), index, field, view, shard, 0) f.CacheType = cacheType f.RowAttrStore = &memAttrStore{ store: make(map[uint64]map[string]interface{}), @@ -2988,7 +2991,7 @@ func TestFragmentPositionsForValue(t *testing.T) { tests := []struct { columnID uint64 bitDepth uint - value uint64 + value int64 clear bool toSet []uint64 toClear []uint64 @@ -2997,43 +3000,43 @@ func TestFragmentPositionsForValue(t *testing.T) { columnID: 0, bitDepth: 1, value: 0, - toSet: []uint64{ShardWidth}, - toClear: []uint64{0}, + toSet: []uint64{0}, // exists bit only + toClear: []uint64{ShardWidth, ShardWidth * 2}, // sign bit & 1-position }, { columnID: 0, bitDepth: 3, value: 0, - toSet: []uint64{ShardWidth * 3}, - toClear: []uint64{0, ShardWidth, ShardWidth * 2}, + toSet: []uint64{0}, // exists bit only + toClear: []uint64{ShardWidth * 1, ShardWidth * 2, ShardWidth * 3, ShardWidth * 4}, // sign bit, 1, 2, 4 }, { columnID: 1, bitDepth: 3, value: 0, - toSet: []uint64{ShardWidth*3 + 1}, - toClear: []uint64{1, ShardWidth + 1, ShardWidth*2 + 1}, + toSet: []uint64{1}, // exists bit only + toClear: []uint64{ShardWidth + 1, ShardWidth*2 + 1, ShardWidth*3 + 1, ShardWidth*4 + 1}, // sign bit, 1, 2, 4 }, { columnID: 0, bitDepth: 1, value: 1, - toSet: []uint64{0, ShardWidth}, - toClear: []uint64{}, + toSet: []uint64{0, ShardWidth * 2}, // exists bit, 1 + toClear: []uint64{ShardWidth}, // sign bit only }, { columnID: 0, bitDepth: 4, value: 10, - toSet: []uint64{ShardWidth, ShardWidth * 3, ShardWidth * 4}, - toClear: []uint64{0, ShardWidth * 2}, + toSet: []uint64{0, ShardWidth * 3, ShardWidth * 5}, // exists bit, 2, 8 + toClear: []uint64{ShardWidth * 1, ShardWidth * 2, ShardWidth * 4}, // sign bit, 1, 4 }, { columnID: 0, bitDepth: 5, value: 10, - toSet: []uint64{ShardWidth, ShardWidth * 3, ShardWidth * 5}, - toClear: []uint64{0, ShardWidth * 2, ShardWidth * 4}, + toSet: []uint64{0, ShardWidth * 3, ShardWidth * 5}, // exists bit, 2, 8 + toClear: []uint64{ShardWidth * 1, ShardWidth * 2, ShardWidth * 4, ShardWidth * 6}, // sign bit, 1, 4, 16 }, } @@ -3138,7 +3141,7 @@ func TestImportClearRestart(t *testing.T) { check(t, f, exp) - f2 := newFragment(f.path, "i", "f", viewStandard, 0) + f2 := newFragment(f.path, "i", "f", viewStandard, 0, 0) f2.MaxOpN = maxOpN f2.CacheType = f.CacheType @@ -3172,7 +3175,7 @@ func TestImportClearRestart(t *testing.T) { check(t, f2, exp) - f3 := newFragment(f2.path, "i", "f", viewStandard, 0) + f3 := newFragment(f2.path, "i", "f", viewStandard, 0, 0) f3.MaxOpN = maxOpN f3.CacheType = f.CacheType @@ -3229,7 +3232,7 @@ func TestImportValueConcurrent(t *testing.T) { i := i eg.Go(func() error { for j := uint64(0); j < 10; j++ { - err := f.importValue([]uint64{j}, []uint64{uint64(rand.Int63n(1000))}, 10, i%2 == 0) + err := f.importValue([]uint64{j}, []int64{int64(rand.Int63n(1000))}, 10, i%2 == 0) if err != nil { return err } @@ -3246,14 +3249,14 @@ func TestImportValueConcurrent(t *testing.T) { func TestImportMultipleValues(t *testing.T) { tests := []struct { cols []uint64 - vals []uint64 + vals []int64 checkCols []uint64 checkVals []uint64 depth uint }{ { cols: []uint64{0, 0}, - vals: []uint64{97, 100}, + vals: []int64{97, 100}, depth: 7, checkCols: []uint64{0}, checkVals: []uint64{100}, diff --git a/http/client_test.go b/http/client_test.go index 7fa398efa..b4c32932d 100644 --- a/http/client_test.go +++ b/http/client_test.go @@ -832,8 +832,8 @@ func TestClient_ImportValue(t *testing.T) { if err != nil { t.Fatal(err) } - if min != -100 || cnt != 0 { - t.Fatalf("unexpected values: got min=%v, count=%v; expected min=-100, cnt=0", min, cnt) + if min != 0 || cnt != 0 { + t.Fatalf("unexpected values: got min=%v, count=%v; expected min=0, cnt=0", min, cnt) } // Verify Max. @@ -871,8 +871,8 @@ func TestClient_ImportValue(t *testing.T) { if err != nil { t.Fatal(err) } - if min != -100 || cnt != 0 { - t.Fatalf("unexpected values: got min=%v, count=%v; expected min=-100, cnt=0", min, cnt) + if min != 0 || cnt != 0 { + t.Fatalf("unexpected values: got min=%v, count=%v; expected min=0, cnt=0", min, cnt) } // Verify Max. diff --git a/http/handler.go b/http/handler.go index 78b5f48a9..0ce3ee6cd 100644 --- a/http/handler.go +++ b/http/handler.go @@ -22,6 +22,7 @@ import ( "fmt" "io" "io/ioutil" + "math" "net" "net/http" _ "net/http/pprof" // Imported for its side-effect of registering pprof endpoints with the server. @@ -758,7 +759,7 @@ func (h *Handler) handlePostField(w http.ResponseWriter, r *http.Request) { case pilosa.FieldTypeSet: fos = append(fos, pilosa.OptFieldTypeSet(*req.Options.CacheType, *req.Options.CacheSize)) case pilosa.FieldTypeInt: - fos = append(fos, pilosa.OptFieldTypeInt(*req.Options.Min, *req.Options.Max)) + fos = append(fos, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) case pilosa.FieldTypeTime: fos = append(fos, pilosa.OptFieldTypeTime(*req.Options.TimeQuantum, req.Options.NoStandardView)) case pilosa.FieldTypeMutex: @@ -824,10 +825,6 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("cacheType does not apply to field type int")) } else if o.CacheSize != nil { return pilosa.NewBadRequestError(errors.New("cacheSize does not apply to field type int")) - } else if o.Min == nil { - return pilosa.NewBadRequestError(errors.New("min is required for field type int")) - } else if o.Max == nil { - return pilosa.NewBadRequestError(errors.New("max is required for field type int")) } else if o.TimeQuantum != nil { return pilosa.NewBadRequestError(errors.New("timeQuantum does not apply to field type int")) } diff --git a/index_test.go b/index_test.go index 21f9a91d9..ee5625cf3 100644 --- a/index_test.go +++ b/index_test.go @@ -93,7 +93,7 @@ func TestIndex_CreateField(t *testing.T) { defer index.Close() // Create field with schema and verify it exists. - if f, err := index.CreateField("f", pilosa.OptFieldTypeInt(10, 20)); err != nil { + if f, err := index.CreateField("f", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(f.Type(), pilosa.FieldTypeInt) { t.Fatalf("unexpected type: %#v", f.Type()) diff --git a/internal/private.pb.go b/internal/private.pb.go index c5a51741b..fc6c306e9 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -1,6 +1,48 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: private.proto +/* + Package internal is a generated protocol buffer package. + + It is generated from these files: + private.proto + + It has these top-level messages: + IndexMeta + FieldOptions + ImportResponse + BlockDataRequest + BlockDataResponse + Cache + MaxShards + CreateShardMessage + DeleteIndexMessage + CreateIndexMessage + CreateFieldMessage + DeleteFieldMessage + DeleteAvailableShardMessage + Field + Schema + Index + URI + Node + NodeStateMessage + NodeEventMessage + NodeStatus + IndexStatus + FieldStatus + ClusterStatus + BSIGroup + CreateViewMessage + DeleteViewMessage + ResizeInstruction + ResizeSource + ResizeInstructionComplete + SetCoordinatorMessage + UpdateCoordinatorMessage + Topology + RecalculateCaches +*/ package internal import proto "github.com/golang/protobuf/proto" @@ -21,45 +63,14 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type IndexMeta struct { - Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` - TrackExistence bool `protobuf:"varint,4,opt,name=TrackExistence,proto3" json:"TrackExistence,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` + TrackExistence bool `protobuf:"varint,4,opt,name=TrackExistence,proto3" json:"TrackExistence,omitempty"` } -func (m *IndexMeta) Reset() { *m = IndexMeta{} } -func (m *IndexMeta) String() string { return proto.CompactTextString(m) } -func (*IndexMeta) ProtoMessage() {} -func (*IndexMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{0} -} -func (m *IndexMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IndexMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IndexMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *IndexMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexMeta.Merge(dst, src) -} -func (m *IndexMeta) XXX_Size() int { - return m.Size() -} -func (m *IndexMeta) XXX_DiscardUnknown() { - xxx_messageInfo_IndexMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexMeta proto.InternalMessageInfo +func (m *IndexMeta) Reset() { *m = IndexMeta{} } +func (m *IndexMeta) String() string { return proto.CompactTextString(m) } +func (*IndexMeta) ProtoMessage() {} +func (*IndexMeta) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{0} } func (m *IndexMeta) GetKeys() bool { if m != nil { @@ -76,51 +87,22 @@ func (m *IndexMeta) GetTrackExistence() bool { } type FieldOptions struct { - Type string `protobuf:"bytes,8,opt,name=Type,proto3" json:"Type,omitempty"` - CacheType string `protobuf:"bytes,3,opt,name=CacheType,proto3" json:"CacheType,omitempty"` - CacheSize uint32 `protobuf:"varint,4,opt,name=CacheSize,proto3" json:"CacheSize,omitempty"` - Min int64 `protobuf:"varint,9,opt,name=Min,proto3" json:"Min,omitempty"` - Max int64 `protobuf:"varint,10,opt,name=Max,proto3" json:"Max,omitempty"` - TimeQuantum string `protobuf:"bytes,5,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` - Keys bool `protobuf:"varint,11,opt,name=Keys,proto3" json:"Keys,omitempty"` - NoStandardView bool `protobuf:"varint,12,opt,name=NoStandardView,proto3" json:"NoStandardView,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type string `protobuf:"bytes,8,opt,name=Type,proto3" json:"Type,omitempty"` + CacheType string `protobuf:"bytes,3,opt,name=CacheType,proto3" json:"CacheType,omitempty"` + CacheSize uint32 `protobuf:"varint,4,opt,name=CacheSize,proto3" json:"CacheSize,omitempty"` + TimeQuantum string `protobuf:"bytes,5,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` + Keys bool `protobuf:"varint,11,opt,name=Keys,proto3" json:"Keys,omitempty"` + NoStandardView bool `protobuf:"varint,12,opt,name=NoStandardView,proto3" json:"NoStandardView,omitempty"` + Base int64 `protobuf:"varint,13,opt,name=Base,proto3" json:"Base,omitempty"` + BitDepth uint64 `protobuf:"varint,14,opt,name=BitDepth,proto3" json:"BitDepth,omitempty"` + Min int64 `protobuf:"varint,9,opt,name=Min,proto3" json:"Min,omitempty"` + Max int64 `protobuf:"varint,10,opt,name=Max,proto3" json:"Max,omitempty"` } -func (m *FieldOptions) Reset() { *m = FieldOptions{} } -func (m *FieldOptions) String() string { return proto.CompactTextString(m) } -func (*FieldOptions) ProtoMessage() {} -func (*FieldOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{1} -} -func (m *FieldOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *FieldOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldOptions.Merge(dst, src) -} -func (m *FieldOptions) XXX_Size() int { - return m.Size() -} -func (m *FieldOptions) XXX_DiscardUnknown() { - xxx_messageInfo_FieldOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldOptions proto.InternalMessageInfo +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{1} } func (m *FieldOptions) GetType() string { if m != nil { @@ -143,20 +125,6 @@ func (m *FieldOptions) GetCacheSize() uint32 { return 0 } -func (m *FieldOptions) GetMin() int64 { - if m != nil { - return m.Min - } - return 0 -} - -func (m *FieldOptions) GetMax() int64 { - if m != nil { - return m.Max - } - return 0 -} - func (m *FieldOptions) GetTimeQuantum() string { if m != nil { return m.TimeQuantum @@ -178,45 +146,42 @@ func (m *FieldOptions) GetNoStandardView() bool { return false } -type ImportResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ImportResponse) Reset() { *m = ImportResponse{} } -func (m *ImportResponse) String() string { return proto.CompactTextString(m) } -func (*ImportResponse) ProtoMessage() {} -func (*ImportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{2} -} -func (m *ImportResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *FieldOptions) GetBase() int64 { + if m != nil { + return m.Base } -} -func (dst *ImportResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportResponse.Merge(dst, src) -} -func (m *ImportResponse) XXX_Size() int { - return m.Size() -} -func (m *ImportResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ImportResponse.DiscardUnknown(m) + return 0 } -var xxx_messageInfo_ImportResponse proto.InternalMessageInfo +func (m *FieldOptions) GetBitDepth() uint64 { + if m != nil { + return m.BitDepth + } + return 0 +} + +func (m *FieldOptions) GetMin() int64 { + if m != nil { + return m.Min + } + return 0 +} + +func (m *FieldOptions) GetMax() int64 { + if m != nil { + return m.Max + } + return 0 +} + +type ImportResponse struct { + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` +} + +func (m *ImportResponse) Reset() { *m = ImportResponse{} } +func (m *ImportResponse) String() string { return proto.CompactTextString(m) } +func (*ImportResponse) ProtoMessage() {} +func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{2} } func (m *ImportResponse) GetErr() string { if m != nil { @@ -226,48 +191,17 @@ func (m *ImportResponse) GetErr() string { } type BlockDataRequest struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - View string `protobuf:"bytes,5,opt,name=View,proto3" json:"View,omitempty"` - Shard uint64 `protobuf:"varint,4,opt,name=Shard,proto3" json:"Shard,omitempty"` - Block uint64 `protobuf:"varint,3,opt,name=Block,proto3" json:"Block,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + View string `protobuf:"bytes,5,opt,name=View,proto3" json:"View,omitempty"` + Shard uint64 `protobuf:"varint,4,opt,name=Shard,proto3" json:"Shard,omitempty"` + Block uint64 `protobuf:"varint,3,opt,name=Block,proto3" json:"Block,omitempty"` } -func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } -func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } -func (*BlockDataRequest) ProtoMessage() {} -func (*BlockDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{3} -} -func (m *BlockDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockDataRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BlockDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockDataRequest.Merge(dst, src) -} -func (m *BlockDataRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockDataRequest proto.InternalMessageInfo +func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } +func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } +func (*BlockDataRequest) ProtoMessage() {} +func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{3} } func (m *BlockDataRequest) GetIndex() string { if m != nil { @@ -305,45 +239,14 @@ func (m *BlockDataRequest) GetBlock() uint64 { } type BlockDataResponse struct { - RowIDs []uint64 `protobuf:"varint,1,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,2,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RowIDs []uint64 `protobuf:"varint,1,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,2,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` } -func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } -func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } -func (*BlockDataResponse) ProtoMessage() {} -func (*BlockDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{4} -} -func (m *BlockDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockDataResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BlockDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockDataResponse.Merge(dst, src) -} -func (m *BlockDataResponse) XXX_Size() int { - return m.Size() -} -func (m *BlockDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockDataResponse proto.InternalMessageInfo +func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } +func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } +func (*BlockDataResponse) ProtoMessage() {} +func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{4} } func (m *BlockDataResponse) GetRowIDs() []uint64 { if m != nil { @@ -360,44 +263,13 @@ func (m *BlockDataResponse) GetColumnIDs() []uint64 { } type Cache struct { - IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs" json:"IDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs" json:"IDs,omitempty"` } -func (m *Cache) Reset() { *m = Cache{} } -func (m *Cache) String() string { return proto.CompactTextString(m) } -func (*Cache) ProtoMessage() {} -func (*Cache) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{5} -} -func (m *Cache) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Cache.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Cache) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cache.Merge(dst, src) -} -func (m *Cache) XXX_Size() int { - return m.Size() -} -func (m *Cache) XXX_DiscardUnknown() { - xxx_messageInfo_Cache.DiscardUnknown(m) -} - -var xxx_messageInfo_Cache proto.InternalMessageInfo +func (m *Cache) Reset() { *m = Cache{} } +func (m *Cache) String() string { return proto.CompactTextString(m) } +func (*Cache) ProtoMessage() {} +func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{5} } func (m *Cache) GetIDs() []uint64 { if m != nil { @@ -407,44 +279,13 @@ func (m *Cache) GetIDs() []uint64 { } type MaxShards struct { - Standard map[string]uint64 `protobuf:"bytes,1,rep,name=Standard" json:"Standard,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Standard map[string]uint64 `protobuf:"bytes,1,rep,name=Standard" json:"Standard,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } -func (m *MaxShards) Reset() { *m = MaxShards{} } -func (m *MaxShards) String() string { return proto.CompactTextString(m) } -func (*MaxShards) ProtoMessage() {} -func (*MaxShards) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{6} -} -func (m *MaxShards) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MaxShards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MaxShards.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *MaxShards) XXX_Merge(src proto.Message) { - xxx_messageInfo_MaxShards.Merge(dst, src) -} -func (m *MaxShards) XXX_Size() int { - return m.Size() -} -func (m *MaxShards) XXX_DiscardUnknown() { - xxx_messageInfo_MaxShards.DiscardUnknown(m) -} - -var xxx_messageInfo_MaxShards proto.InternalMessageInfo +func (m *MaxShards) Reset() { *m = MaxShards{} } +func (m *MaxShards) String() string { return proto.CompactTextString(m) } +func (*MaxShards) ProtoMessage() {} +func (*MaxShards) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{6} } func (m *MaxShards) GetStandard() map[string]uint64 { if m != nil { @@ -454,46 +295,15 @@ func (m *MaxShards) GetStandard() map[string]uint64 { } type CreateShardMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` - Shard uint64 `protobuf:"varint,2,opt,name=Shard,proto3" json:"Shard,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` + Shard uint64 `protobuf:"varint,2,opt,name=Shard,proto3" json:"Shard,omitempty"` } -func (m *CreateShardMessage) Reset() { *m = CreateShardMessage{} } -func (m *CreateShardMessage) String() string { return proto.CompactTextString(m) } -func (*CreateShardMessage) ProtoMessage() {} -func (*CreateShardMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{7} -} -func (m *CreateShardMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateShardMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateShardMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CreateShardMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateShardMessage.Merge(dst, src) -} -func (m *CreateShardMessage) XXX_Size() int { - return m.Size() -} -func (m *CreateShardMessage) XXX_DiscardUnknown() { - xxx_messageInfo_CreateShardMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateShardMessage proto.InternalMessageInfo +func (m *CreateShardMessage) Reset() { *m = CreateShardMessage{} } +func (m *CreateShardMessage) String() string { return proto.CompactTextString(m) } +func (*CreateShardMessage) ProtoMessage() {} +func (*CreateShardMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{7} } func (m *CreateShardMessage) GetIndex() string { if m != nil { @@ -517,44 +327,13 @@ func (m *CreateShardMessage) GetShard() uint64 { } type DeleteIndexMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` } -func (m *DeleteIndexMessage) Reset() { *m = DeleteIndexMessage{} } -func (m *DeleteIndexMessage) String() string { return proto.CompactTextString(m) } -func (*DeleteIndexMessage) ProtoMessage() {} -func (*DeleteIndexMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{8} -} -func (m *DeleteIndexMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteIndexMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteIndexMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DeleteIndexMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexMessage.Merge(dst, src) -} -func (m *DeleteIndexMessage) XXX_Size() int { - return m.Size() -} -func (m *DeleteIndexMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteIndexMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteIndexMessage proto.InternalMessageInfo +func (m *DeleteIndexMessage) Reset() { *m = DeleteIndexMessage{} } +func (m *DeleteIndexMessage) String() string { return proto.CompactTextString(m) } +func (*DeleteIndexMessage) ProtoMessage() {} +func (*DeleteIndexMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{8} } func (m *DeleteIndexMessage) GetIndex() string { if m != nil { @@ -564,45 +343,14 @@ func (m *DeleteIndexMessage) GetIndex() string { } type CreateIndexMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` } -func (m *CreateIndexMessage) Reset() { *m = CreateIndexMessage{} } -func (m *CreateIndexMessage) String() string { return proto.CompactTextString(m) } -func (*CreateIndexMessage) ProtoMessage() {} -func (*CreateIndexMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{9} -} -func (m *CreateIndexMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateIndexMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateIndexMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CreateIndexMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexMessage.Merge(dst, src) -} -func (m *CreateIndexMessage) XXX_Size() int { - return m.Size() -} -func (m *CreateIndexMessage) XXX_DiscardUnknown() { - xxx_messageInfo_CreateIndexMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateIndexMessage proto.InternalMessageInfo +func (m *CreateIndexMessage) Reset() { *m = CreateIndexMessage{} } +func (m *CreateIndexMessage) String() string { return proto.CompactTextString(m) } +func (*CreateIndexMessage) ProtoMessage() {} +func (*CreateIndexMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{9} } func (m *CreateIndexMessage) GetIndex() string { if m != nil { @@ -619,46 +367,15 @@ func (m *CreateIndexMessage) GetMeta() *IndexMeta { } type CreateFieldMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta" json:"Meta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta" json:"Meta,omitempty"` } -func (m *CreateFieldMessage) Reset() { *m = CreateFieldMessage{} } -func (m *CreateFieldMessage) String() string { return proto.CompactTextString(m) } -func (*CreateFieldMessage) ProtoMessage() {} -func (*CreateFieldMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{10} -} -func (m *CreateFieldMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateFieldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateFieldMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CreateFieldMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateFieldMessage.Merge(dst, src) -} -func (m *CreateFieldMessage) XXX_Size() int { - return m.Size() -} -func (m *CreateFieldMessage) XXX_DiscardUnknown() { - xxx_messageInfo_CreateFieldMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateFieldMessage proto.InternalMessageInfo +func (m *CreateFieldMessage) Reset() { *m = CreateFieldMessage{} } +func (m *CreateFieldMessage) String() string { return proto.CompactTextString(m) } +func (*CreateFieldMessage) ProtoMessage() {} +func (*CreateFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{10} } func (m *CreateFieldMessage) GetIndex() string { if m != nil { @@ -682,45 +399,14 @@ func (m *CreateFieldMessage) GetMeta() *FieldOptions { } type DeleteFieldMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` } -func (m *DeleteFieldMessage) Reset() { *m = DeleteFieldMessage{} } -func (m *DeleteFieldMessage) String() string { return proto.CompactTextString(m) } -func (*DeleteFieldMessage) ProtoMessage() {} -func (*DeleteFieldMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{11} -} -func (m *DeleteFieldMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteFieldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteFieldMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DeleteFieldMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteFieldMessage.Merge(dst, src) -} -func (m *DeleteFieldMessage) XXX_Size() int { - return m.Size() -} -func (m *DeleteFieldMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteFieldMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteFieldMessage proto.InternalMessageInfo +func (m *DeleteFieldMessage) Reset() { *m = DeleteFieldMessage{} } +func (m *DeleteFieldMessage) String() string { return proto.CompactTextString(m) } +func (*DeleteFieldMessage) ProtoMessage() {} +func (*DeleteFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{11} } func (m *DeleteFieldMessage) GetIndex() string { if m != nil { @@ -737,46 +423,17 @@ func (m *DeleteFieldMessage) GetField() string { } type DeleteAvailableShardMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - ShardID uint64 `protobuf:"varint,3,opt,name=ShardID,proto3" json:"ShardID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + ShardID uint64 `protobuf:"varint,3,opt,name=ShardID,proto3" json:"ShardID,omitempty"` } func (m *DeleteAvailableShardMessage) Reset() { *m = DeleteAvailableShardMessage{} } func (m *DeleteAvailableShardMessage) String() string { return proto.CompactTextString(m) } func (*DeleteAvailableShardMessage) ProtoMessage() {} func (*DeleteAvailableShardMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{12} + return fileDescriptorPrivate, []int{12} } -func (m *DeleteAvailableShardMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteAvailableShardMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteAvailableShardMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DeleteAvailableShardMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAvailableShardMessage.Merge(dst, src) -} -func (m *DeleteAvailableShardMessage) XXX_Size() int { - return m.Size() -} -func (m *DeleteAvailableShardMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAvailableShardMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAvailableShardMessage proto.InternalMessageInfo func (m *DeleteAvailableShardMessage) GetIndex() string { if m != nil { @@ -800,46 +457,15 @@ func (m *DeleteAvailableShardMessage) GetShardID() uint64 { } type Field struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Meta *FieldOptions `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` - Views []string `protobuf:"bytes,3,rep,name=Views" json:"Views,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Meta *FieldOptions `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` + Views []string `protobuf:"bytes,3,rep,name=Views" json:"Views,omitempty"` } -func (m *Field) Reset() { *m = Field{} } -func (m *Field) String() string { return proto.CompactTextString(m) } -func (*Field) ProtoMessage() {} -func (*Field) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{13} -} -func (m *Field) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Field.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Field) XXX_Merge(src proto.Message) { - xxx_messageInfo_Field.Merge(dst, src) -} -func (m *Field) XXX_Size() int { - return m.Size() -} -func (m *Field) XXX_DiscardUnknown() { - xxx_messageInfo_Field.DiscardUnknown(m) -} - -var xxx_messageInfo_Field proto.InternalMessageInfo +func (m *Field) Reset() { *m = Field{} } +func (m *Field) String() string { return proto.CompactTextString(m) } +func (*Field) ProtoMessage() {} +func (*Field) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} } func (m *Field) GetName() string { if m != nil { @@ -863,44 +489,13 @@ func (m *Field) GetViews() []string { } type Schema struct { - Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes" json:"Indexes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes" json:"Indexes,omitempty"` } -func (m *Schema) Reset() { *m = Schema{} } -func (m *Schema) String() string { return proto.CompactTextString(m) } -func (*Schema) ProtoMessage() {} -func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{14} -} -func (m *Schema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Schema.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Schema) XXX_Merge(src proto.Message) { - xxx_messageInfo_Schema.Merge(dst, src) -} -func (m *Schema) XXX_Size() int { - return m.Size() -} -func (m *Schema) XXX_DiscardUnknown() { - xxx_messageInfo_Schema.DiscardUnknown(m) -} - -var xxx_messageInfo_Schema proto.InternalMessageInfo +func (m *Schema) Reset() { *m = Schema{} } +func (m *Schema) String() string { return proto.CompactTextString(m) } +func (*Schema) ProtoMessage() {} +func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{14} } func (m *Schema) GetIndexes() []*Index { if m != nil { @@ -910,45 +505,14 @@ func (m *Schema) GetIndexes() []*Index { } type Index struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Fields []*Field `protobuf:"bytes,4,rep,name=Fields" json:"Fields,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Fields []*Field `protobuf:"bytes,4,rep,name=Fields" json:"Fields,omitempty"` } -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{15} -} -func (m *Index) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(dst, src) -} -func (m *Index) XXX_Size() int { - return m.Size() -} -func (m *Index) XXX_DiscardUnknown() { - xxx_messageInfo_Index.DiscardUnknown(m) -} - -var xxx_messageInfo_Index proto.InternalMessageInfo +func (m *Index) Reset() { *m = Index{} } +func (m *Index) String() string { return proto.CompactTextString(m) } +func (*Index) ProtoMessage() {} +func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{15} } func (m *Index) GetName() string { if m != nil { @@ -965,46 +529,15 @@ func (m *Index) GetFields() []*Field { } type URI struct { - Scheme string `protobuf:"bytes,1,opt,name=Scheme,proto3" json:"Scheme,omitempty"` - Host string `protobuf:"bytes,2,opt,name=Host,proto3" json:"Host,omitempty"` - Port uint32 `protobuf:"varint,3,opt,name=Port,proto3" json:"Port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Scheme string `protobuf:"bytes,1,opt,name=Scheme,proto3" json:"Scheme,omitempty"` + Host string `protobuf:"bytes,2,opt,name=Host,proto3" json:"Host,omitempty"` + Port uint32 `protobuf:"varint,3,opt,name=Port,proto3" json:"Port,omitempty"` } -func (m *URI) Reset() { *m = URI{} } -func (m *URI) String() string { return proto.CompactTextString(m) } -func (*URI) ProtoMessage() {} -func (*URI) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{16} -} -func (m *URI) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *URI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_URI.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *URI) XXX_Merge(src proto.Message) { - xxx_messageInfo_URI.Merge(dst, src) -} -func (m *URI) XXX_Size() int { - return m.Size() -} -func (m *URI) XXX_DiscardUnknown() { - xxx_messageInfo_URI.DiscardUnknown(m) -} - -var xxx_messageInfo_URI proto.InternalMessageInfo +func (m *URI) Reset() { *m = URI{} } +func (m *URI) String() string { return proto.CompactTextString(m) } +func (*URI) ProtoMessage() {} +func (*URI) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{16} } func (m *URI) GetScheme() string { if m != nil { @@ -1028,47 +561,16 @@ func (m *URI) GetPort() uint32 { } type Node struct { - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - URI *URI `protobuf:"bytes,2,opt,name=URI" json:"URI,omitempty"` - IsCoordinator bool `protobuf:"varint,3,opt,name=IsCoordinator,proto3" json:"IsCoordinator,omitempty"` - State string `protobuf:"bytes,4,opt,name=State,proto3" json:"State,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + URI *URI `protobuf:"bytes,2,opt,name=URI" json:"URI,omitempty"` + IsCoordinator bool `protobuf:"varint,3,opt,name=IsCoordinator,proto3" json:"IsCoordinator,omitempty"` + State string `protobuf:"bytes,4,opt,name=State,proto3" json:"State,omitempty"` } -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{17} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(dst, src) -} -func (m *Node) XXX_Size() int { - return m.Size() -} -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) -} - -var xxx_messageInfo_Node proto.InternalMessageInfo +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{17} } func (m *Node) GetID() string { if m != nil { @@ -1099,45 +601,14 @@ func (m *Node) GetState() string { } type NodeStateMessage struct { - NodeID string `protobuf:"bytes,1,opt,name=NodeID,proto3" json:"NodeID,omitempty"` - State string `protobuf:"bytes,2,opt,name=State,proto3" json:"State,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NodeID string `protobuf:"bytes,1,opt,name=NodeID,proto3" json:"NodeID,omitempty"` + State string `protobuf:"bytes,2,opt,name=State,proto3" json:"State,omitempty"` } -func (m *NodeStateMessage) Reset() { *m = NodeStateMessage{} } -func (m *NodeStateMessage) String() string { return proto.CompactTextString(m) } -func (*NodeStateMessage) ProtoMessage() {} -func (*NodeStateMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{18} -} -func (m *NodeStateMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStateMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeStateMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *NodeStateMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStateMessage.Merge(dst, src) -} -func (m *NodeStateMessage) XXX_Size() int { - return m.Size() -} -func (m *NodeStateMessage) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStateMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStateMessage proto.InternalMessageInfo +func (m *NodeStateMessage) Reset() { *m = NodeStateMessage{} } +func (m *NodeStateMessage) String() string { return proto.CompactTextString(m) } +func (*NodeStateMessage) ProtoMessage() {} +func (*NodeStateMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{18} } func (m *NodeStateMessage) GetNodeID() string { if m != nil { @@ -1154,45 +625,14 @@ func (m *NodeStateMessage) GetState() string { } type NodeEventMessage struct { - Event uint32 `protobuf:"varint,1,opt,name=Event,proto3" json:"Event,omitempty"` - Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Event uint32 `protobuf:"varint,1,opt,name=Event,proto3" json:"Event,omitempty"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` } -func (m *NodeEventMessage) Reset() { *m = NodeEventMessage{} } -func (m *NodeEventMessage) String() string { return proto.CompactTextString(m) } -func (*NodeEventMessage) ProtoMessage() {} -func (*NodeEventMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{19} -} -func (m *NodeEventMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeEventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeEventMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *NodeEventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeEventMessage.Merge(dst, src) -} -func (m *NodeEventMessage) XXX_Size() int { - return m.Size() -} -func (m *NodeEventMessage) XXX_DiscardUnknown() { - xxx_messageInfo_NodeEventMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeEventMessage proto.InternalMessageInfo +func (m *NodeEventMessage) Reset() { *m = NodeEventMessage{} } +func (m *NodeEventMessage) String() string { return proto.CompactTextString(m) } +func (*NodeEventMessage) ProtoMessage() {} +func (*NodeEventMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} } func (m *NodeEventMessage) GetEvent() uint32 { if m != nil { @@ -1209,46 +649,15 @@ func (m *NodeEventMessage) GetNode() *Node { } type NodeStatus struct { - Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` - Schema *Schema `protobuf:"bytes,3,opt,name=Schema" json:"Schema,omitempty"` - Indexes []*IndexStatus `protobuf:"bytes,4,rep,name=Indexes" json:"Indexes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` + Schema *Schema `protobuf:"bytes,3,opt,name=Schema" json:"Schema,omitempty"` + Indexes []*IndexStatus `protobuf:"bytes,4,rep,name=Indexes" json:"Indexes,omitempty"` } -func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (m *NodeStatus) String() string { return proto.CompactTextString(m) } -func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{20} -} -func (m *NodeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(dst, src) -} -func (m *NodeStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStatus proto.InternalMessageInfo +func (m *NodeStatus) Reset() { *m = NodeStatus{} } +func (m *NodeStatus) String() string { return proto.CompactTextString(m) } +func (*NodeStatus) ProtoMessage() {} +func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{20} } func (m *NodeStatus) GetNode() *Node { if m != nil { @@ -1272,45 +681,14 @@ func (m *NodeStatus) GetIndexes() []*IndexStatus { } type IndexStatus struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Fields []*FieldStatus `protobuf:"bytes,2,rep,name=Fields" json:"Fields,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Fields []*FieldStatus `protobuf:"bytes,2,rep,name=Fields" json:"Fields,omitempty"` } -func (m *IndexStatus) Reset() { *m = IndexStatus{} } -func (m *IndexStatus) String() string { return proto.CompactTextString(m) } -func (*IndexStatus) ProtoMessage() {} -func (*IndexStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{21} -} -func (m *IndexStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IndexStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IndexStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *IndexStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexStatus.Merge(dst, src) -} -func (m *IndexStatus) XXX_Size() int { - return m.Size() -} -func (m *IndexStatus) XXX_DiscardUnknown() { - xxx_messageInfo_IndexStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexStatus proto.InternalMessageInfo +func (m *IndexStatus) Reset() { *m = IndexStatus{} } +func (m *IndexStatus) String() string { return proto.CompactTextString(m) } +func (*IndexStatus) ProtoMessage() {} +func (*IndexStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{21} } func (m *IndexStatus) GetName() string { if m != nil { @@ -1327,45 +705,14 @@ func (m *IndexStatus) GetFields() []*FieldStatus { } type FieldStatus struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - AvailableShards []uint64 `protobuf:"varint,2,rep,packed,name=AvailableShards" json:"AvailableShards,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + AvailableShards []uint64 `protobuf:"varint,2,rep,packed,name=AvailableShards" json:"AvailableShards,omitempty"` } -func (m *FieldStatus) Reset() { *m = FieldStatus{} } -func (m *FieldStatus) String() string { return proto.CompactTextString(m) } -func (*FieldStatus) ProtoMessage() {} -func (*FieldStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{22} -} -func (m *FieldStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FieldStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *FieldStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldStatus.Merge(dst, src) -} -func (m *FieldStatus) XXX_Size() int { - return m.Size() -} -func (m *FieldStatus) XXX_DiscardUnknown() { - xxx_messageInfo_FieldStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldStatus proto.InternalMessageInfo +func (m *FieldStatus) Reset() { *m = FieldStatus{} } +func (m *FieldStatus) String() string { return proto.CompactTextString(m) } +func (*FieldStatus) ProtoMessage() {} +func (*FieldStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{22} } func (m *FieldStatus) GetName() string { if m != nil { @@ -1382,46 +729,15 @@ func (m *FieldStatus) GetAvailableShards() []uint64 { } type ClusterStatus struct { - ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` - State string `protobuf:"bytes,2,opt,name=State,proto3" json:"State,omitempty"` - Nodes []*Node `protobuf:"bytes,3,rep,name=Nodes" json:"Nodes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` + State string `protobuf:"bytes,2,opt,name=State,proto3" json:"State,omitempty"` + Nodes []*Node `protobuf:"bytes,3,rep,name=Nodes" json:"Nodes,omitempty"` } -func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } -func (m *ClusterStatus) String() string { return proto.CompactTextString(m) } -func (*ClusterStatus) ProtoMessage() {} -func (*ClusterStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{23} -} -func (m *ClusterStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ClusterStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterStatus.Merge(dst, src) -} -func (m *ClusterStatus) XXX_Size() int { - return m.Size() -} -func (m *ClusterStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterStatus proto.InternalMessageInfo +func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } +func (m *ClusterStatus) String() string { return proto.CompactTextString(m) } +func (*ClusterStatus) ProtoMessage() {} +func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} } func (m *ClusterStatus) GetClusterID() string { if m != nil { @@ -1445,47 +761,16 @@ func (m *ClusterStatus) GetNodes() []*Node { } type BSIGroup struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` - Min int64 `protobuf:"varint,3,opt,name=Min,proto3" json:"Min,omitempty"` - Max int64 `protobuf:"varint,4,opt,name=Max,proto3" json:"Max,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` + Min int64 `protobuf:"varint,3,opt,name=Min,proto3" json:"Min,omitempty"` + Max int64 `protobuf:"varint,4,opt,name=Max,proto3" json:"Max,omitempty"` } -func (m *BSIGroup) Reset() { *m = BSIGroup{} } -func (m *BSIGroup) String() string { return proto.CompactTextString(m) } -func (*BSIGroup) ProtoMessage() {} -func (*BSIGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{24} -} -func (m *BSIGroup) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BSIGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BSIGroup.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BSIGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_BSIGroup.Merge(dst, src) -} -func (m *BSIGroup) XXX_Size() int { - return m.Size() -} -func (m *BSIGroup) XXX_DiscardUnknown() { - xxx_messageInfo_BSIGroup.DiscardUnknown(m) -} - -var xxx_messageInfo_BSIGroup proto.InternalMessageInfo +func (m *BSIGroup) Reset() { *m = BSIGroup{} } +func (m *BSIGroup) String() string { return proto.CompactTextString(m) } +func (*BSIGroup) ProtoMessage() {} +func (*BSIGroup) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{24} } func (m *BSIGroup) GetName() string { if m != nil { @@ -1516,46 +801,15 @@ func (m *BSIGroup) GetMax() int64 { } type CreateViewMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - View string `protobuf:"bytes,3,opt,name=View,proto3" json:"View,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + View string `protobuf:"bytes,3,opt,name=View,proto3" json:"View,omitempty"` } -func (m *CreateViewMessage) Reset() { *m = CreateViewMessage{} } -func (m *CreateViewMessage) String() string { return proto.CompactTextString(m) } -func (*CreateViewMessage) ProtoMessage() {} -func (*CreateViewMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{25} -} -func (m *CreateViewMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateViewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateViewMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CreateViewMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateViewMessage.Merge(dst, src) -} -func (m *CreateViewMessage) XXX_Size() int { - return m.Size() -} -func (m *CreateViewMessage) XXX_DiscardUnknown() { - xxx_messageInfo_CreateViewMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateViewMessage proto.InternalMessageInfo +func (m *CreateViewMessage) Reset() { *m = CreateViewMessage{} } +func (m *CreateViewMessage) String() string { return proto.CompactTextString(m) } +func (*CreateViewMessage) ProtoMessage() {} +func (*CreateViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{25} } func (m *CreateViewMessage) GetIndex() string { if m != nil { @@ -1579,46 +833,15 @@ func (m *CreateViewMessage) GetView() string { } type DeleteViewMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - View string `protobuf:"bytes,3,opt,name=View,proto3" json:"View,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + View string `protobuf:"bytes,3,opt,name=View,proto3" json:"View,omitempty"` } -func (m *DeleteViewMessage) Reset() { *m = DeleteViewMessage{} } -func (m *DeleteViewMessage) String() string { return proto.CompactTextString(m) } -func (*DeleteViewMessage) ProtoMessage() {} -func (*DeleteViewMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{26} -} -func (m *DeleteViewMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteViewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteViewMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DeleteViewMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteViewMessage.Merge(dst, src) -} -func (m *DeleteViewMessage) XXX_Size() int { - return m.Size() -} -func (m *DeleteViewMessage) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteViewMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteViewMessage proto.InternalMessageInfo +func (m *DeleteViewMessage) Reset() { *m = DeleteViewMessage{} } +func (m *DeleteViewMessage) String() string { return proto.CompactTextString(m) } +func (*DeleteViewMessage) ProtoMessage() {} +func (*DeleteViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{26} } func (m *DeleteViewMessage) GetIndex() string { if m != nil { @@ -1642,49 +865,18 @@ func (m *DeleteViewMessage) GetView() string { } type ResizeInstruction struct { - JobID int64 `protobuf:"varint,1,opt,name=JobID,proto3" json:"JobID,omitempty"` - Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` - Coordinator *Node `protobuf:"bytes,3,opt,name=Coordinator" json:"Coordinator,omitempty"` - Sources []*ResizeSource `protobuf:"bytes,4,rep,name=Sources" json:"Sources,omitempty"` - NodeStatus *NodeStatus `protobuf:"bytes,7,opt,name=NodeStatus" json:"NodeStatus,omitempty"` - ClusterStatus *ClusterStatus `protobuf:"bytes,6,opt,name=ClusterStatus" json:"ClusterStatus,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + JobID int64 `protobuf:"varint,1,opt,name=JobID,proto3" json:"JobID,omitempty"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` + Coordinator *Node `protobuf:"bytes,3,opt,name=Coordinator" json:"Coordinator,omitempty"` + Sources []*ResizeSource `protobuf:"bytes,4,rep,name=Sources" json:"Sources,omitempty"` + NodeStatus *NodeStatus `protobuf:"bytes,7,opt,name=NodeStatus" json:"NodeStatus,omitempty"` + ClusterStatus *ClusterStatus `protobuf:"bytes,6,opt,name=ClusterStatus" json:"ClusterStatus,omitempty"` } -func (m *ResizeInstruction) Reset() { *m = ResizeInstruction{} } -func (m *ResizeInstruction) String() string { return proto.CompactTextString(m) } -func (*ResizeInstruction) ProtoMessage() {} -func (*ResizeInstruction) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{27} -} -func (m *ResizeInstruction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResizeInstruction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResizeInstruction.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ResizeInstruction) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeInstruction.Merge(dst, src) -} -func (m *ResizeInstruction) XXX_Size() int { - return m.Size() -} -func (m *ResizeInstruction) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeInstruction.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeInstruction proto.InternalMessageInfo +func (m *ResizeInstruction) Reset() { *m = ResizeInstruction{} } +func (m *ResizeInstruction) String() string { return proto.CompactTextString(m) } +func (*ResizeInstruction) ProtoMessage() {} +func (*ResizeInstruction) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{27} } func (m *ResizeInstruction) GetJobID() int64 { if m != nil { @@ -1729,48 +921,17 @@ func (m *ResizeInstruction) GetClusterStatus() *ClusterStatus { } type ResizeSource struct { - Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` - Index string `protobuf:"bytes,2,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` - View string `protobuf:"bytes,4,opt,name=View,proto3" json:"View,omitempty"` - Shard uint64 `protobuf:"varint,5,opt,name=Shard,proto3" json:"Shard,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` + Index string `protobuf:"bytes,2,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` + View string `protobuf:"bytes,4,opt,name=View,proto3" json:"View,omitempty"` + Shard uint64 `protobuf:"varint,5,opt,name=Shard,proto3" json:"Shard,omitempty"` } -func (m *ResizeSource) Reset() { *m = ResizeSource{} } -func (m *ResizeSource) String() string { return proto.CompactTextString(m) } -func (*ResizeSource) ProtoMessage() {} -func (*ResizeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{28} -} -func (m *ResizeSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResizeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResizeSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ResizeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeSource.Merge(dst, src) -} -func (m *ResizeSource) XXX_Size() int { - return m.Size() -} -func (m *ResizeSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeSource proto.InternalMessageInfo +func (m *ResizeSource) Reset() { *m = ResizeSource{} } +func (m *ResizeSource) String() string { return proto.CompactTextString(m) } +func (*ResizeSource) ProtoMessage() {} +func (*ResizeSource) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{28} } func (m *ResizeSource) GetNode() *Node { if m != nil { @@ -1808,46 +969,17 @@ func (m *ResizeSource) GetShard() uint64 { } type ResizeInstructionComplete struct { - JobID int64 `protobuf:"varint,1,opt,name=JobID,proto3" json:"JobID,omitempty"` - Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` - Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + JobID int64 `protobuf:"varint,1,opt,name=JobID,proto3" json:"JobID,omitempty"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` + Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` } func (m *ResizeInstructionComplete) Reset() { *m = ResizeInstructionComplete{} } func (m *ResizeInstructionComplete) String() string { return proto.CompactTextString(m) } func (*ResizeInstructionComplete) ProtoMessage() {} func (*ResizeInstructionComplete) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{29} + return fileDescriptorPrivate, []int{29} } -func (m *ResizeInstructionComplete) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResizeInstructionComplete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResizeInstructionComplete.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ResizeInstructionComplete) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeInstructionComplete.Merge(dst, src) -} -func (m *ResizeInstructionComplete) XXX_Size() int { - return m.Size() -} -func (m *ResizeInstructionComplete) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeInstructionComplete.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeInstructionComplete proto.InternalMessageInfo func (m *ResizeInstructionComplete) GetJobID() int64 { if m != nil { @@ -1871,44 +1003,13 @@ func (m *ResizeInstructionComplete) GetError() string { } type SetCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` } -func (m *SetCoordinatorMessage) Reset() { *m = SetCoordinatorMessage{} } -func (m *SetCoordinatorMessage) String() string { return proto.CompactTextString(m) } -func (*SetCoordinatorMessage) ProtoMessage() {} -func (*SetCoordinatorMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{30} -} -func (m *SetCoordinatorMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SetCoordinatorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SetCoordinatorMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *SetCoordinatorMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCoordinatorMessage.Merge(dst, src) -} -func (m *SetCoordinatorMessage) XXX_Size() int { - return m.Size() -} -func (m *SetCoordinatorMessage) XXX_DiscardUnknown() { - xxx_messageInfo_SetCoordinatorMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_SetCoordinatorMessage proto.InternalMessageInfo +func (m *SetCoordinatorMessage) Reset() { *m = SetCoordinatorMessage{} } +func (m *SetCoordinatorMessage) String() string { return proto.CompactTextString(m) } +func (*SetCoordinatorMessage) ProtoMessage() {} +func (*SetCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{30} } func (m *SetCoordinatorMessage) GetNew() *Node { if m != nil { @@ -1918,44 +1019,13 @@ func (m *SetCoordinatorMessage) GetNew() *Node { } type UpdateCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` } -func (m *UpdateCoordinatorMessage) Reset() { *m = UpdateCoordinatorMessage{} } -func (m *UpdateCoordinatorMessage) String() string { return proto.CompactTextString(m) } -func (*UpdateCoordinatorMessage) ProtoMessage() {} -func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{31} -} -func (m *UpdateCoordinatorMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateCoordinatorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateCoordinatorMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *UpdateCoordinatorMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateCoordinatorMessage.Merge(dst, src) -} -func (m *UpdateCoordinatorMessage) XXX_Size() int { - return m.Size() -} -func (m *UpdateCoordinatorMessage) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateCoordinatorMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateCoordinatorMessage proto.InternalMessageInfo +func (m *UpdateCoordinatorMessage) Reset() { *m = UpdateCoordinatorMessage{} } +func (m *UpdateCoordinatorMessage) String() string { return proto.CompactTextString(m) } +func (*UpdateCoordinatorMessage) ProtoMessage() {} +func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{31} } func (m *UpdateCoordinatorMessage) GetNew() *Node { if m != nil { @@ -1965,45 +1035,14 @@ func (m *UpdateCoordinatorMessage) GetNew() *Node { } type Topology struct { - ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` - NodeIDs []string `protobuf:"bytes,2,rep,name=NodeIDs" json:"NodeIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` + NodeIDs []string `protobuf:"bytes,2,rep,name=NodeIDs" json:"NodeIDs,omitempty"` } -func (m *Topology) Reset() { *m = Topology{} } -func (m *Topology) String() string { return proto.CompactTextString(m) } -func (*Topology) ProtoMessage() {} -func (*Topology) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{32} -} -func (m *Topology) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Topology) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Topology.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Topology) XXX_Merge(src proto.Message) { - xxx_messageInfo_Topology.Merge(dst, src) -} -func (m *Topology) XXX_Size() int { - return m.Size() -} -func (m *Topology) XXX_DiscardUnknown() { - xxx_messageInfo_Topology.DiscardUnknown(m) -} - -var xxx_messageInfo_Topology proto.InternalMessageInfo +func (m *Topology) Reset() { *m = Topology{} } +func (m *Topology) String() string { return proto.CompactTextString(m) } +func (*Topology) ProtoMessage() {} +func (*Topology) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{32} } func (m *Topology) GetClusterID() string { if m != nil { @@ -2020,43 +1059,12 @@ func (m *Topology) GetNodeIDs() []string { } type RecalculateCaches struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *RecalculateCaches) Reset() { *m = RecalculateCaches{} } -func (m *RecalculateCaches) String() string { return proto.CompactTextString(m) } -func (*RecalculateCaches) ProtoMessage() {} -func (*RecalculateCaches) Descriptor() ([]byte, []int) { - return fileDescriptor_private_8095a89af06a70de, []int{33} -} -func (m *RecalculateCaches) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RecalculateCaches) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RecalculateCaches.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *RecalculateCaches) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecalculateCaches.Merge(dst, src) -} -func (m *RecalculateCaches) XXX_Size() int { - return m.Size() -} -func (m *RecalculateCaches) XXX_DiscardUnknown() { - xxx_messageInfo_RecalculateCaches.DiscardUnknown(m) -} - -var xxx_messageInfo_RecalculateCaches proto.InternalMessageInfo +func (m *RecalculateCaches) Reset() { *m = RecalculateCaches{} } +func (m *RecalculateCaches) String() string { return proto.CompactTextString(m) } +func (*RecalculateCaches) ProtoMessage() {} +func (*RecalculateCaches) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{33} } func init() { proto.RegisterType((*IndexMeta)(nil), "internal.IndexMeta") @@ -2066,7 +1074,6 @@ func init() { proto.RegisterType((*BlockDataResponse)(nil), "internal.BlockDataResponse") proto.RegisterType((*Cache)(nil), "internal.Cache") proto.RegisterType((*MaxShards)(nil), "internal.MaxShards") - proto.RegisterMapType((map[string]uint64)(nil), "internal.MaxShards.StandardEntry") proto.RegisterType((*CreateShardMessage)(nil), "internal.CreateShardMessage") proto.RegisterType((*DeleteIndexMessage)(nil), "internal.DeleteIndexMessage") proto.RegisterType((*CreateIndexMessage)(nil), "internal.CreateIndexMessage") @@ -2130,9 +1137,6 @@ func (m *IndexMeta) MarshalTo(dAtA []byte) (int, error) { } i++ } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2204,8 +1208,15 @@ func (m *FieldOptions) MarshalTo(dAtA []byte) (int, error) { } i++ } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Base != 0 { + dAtA[i] = 0x68 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Base)) + } + if m.BitDepth != 0 { + dAtA[i] = 0x70 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.BitDepth)) } return i, nil } @@ -2231,9 +1242,6 @@ func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Err))) i += copy(dAtA[i:], m.Err) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2280,9 +1288,6 @@ func (m *BlockDataRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) i += copy(dAtA[i:], m.View) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2335,9 +1340,6 @@ func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(j3)) i += copy(dAtA[i:], dAtA4[:j3]) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2373,9 +1375,6 @@ func (m *Cache) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(j5)) i += copy(dAtA[i:], dAtA6[:j5]) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2410,9 +1409,6 @@ func (m *MaxShards) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(v)) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2448,9 +1444,6 @@ func (m *CreateShardMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) i += copy(dAtA[i:], m.Field) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2475,9 +1468,6 @@ func (m *DeleteIndexMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) i += copy(dAtA[i:], m.Index) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2512,9 +1502,6 @@ func (m *CreateIndexMessage) MarshalTo(dAtA []byte) (int, error) { } i += n7 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2555,9 +1542,6 @@ func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { } i += n8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2588,9 +1572,6 @@ func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) i += copy(dAtA[i:], m.Field) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2626,9 +1607,6 @@ func (m *DeleteAvailableShardMessage) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPrivate(dAtA, i, uint64(m.ShardID)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2678,9 +1656,6 @@ func (m *Field) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2711,9 +1686,6 @@ func (m *Schema) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2750,9 +1722,6 @@ func (m *Index) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2788,9 +1757,6 @@ func (m *URI) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Port)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2841,9 +1807,6 @@ func (m *Node) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) i += copy(dAtA[i:], m.State) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2874,9 +1837,6 @@ func (m *NodeStateMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) i += copy(dAtA[i:], m.State) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2910,9 +1870,6 @@ func (m *NodeEventMessage) MarshalTo(dAtA []byte) (int, error) { } i += n11 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2963,9 +1920,6 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3002,9 +1956,6 @@ func (m *IndexStatus) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3046,9 +1997,6 @@ func (m *FieldStatus) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(j14)) i += copy(dAtA[i:], dAtA15[:j14]) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3091,9 +2039,6 @@ func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3134,9 +2079,6 @@ func (m *BSIGroup) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3173,9 +2115,6 @@ func (m *CreateViewMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) i += copy(dAtA[i:], m.View) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3212,9 +2151,6 @@ func (m *DeleteViewMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) i += copy(dAtA[i:], m.View) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3290,9 +2226,6 @@ func (m *ResizeInstruction) MarshalTo(dAtA []byte) (int, error) { } i += n19 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3344,9 +2277,6 @@ func (m *ResizeSource) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3386,9 +2316,6 @@ func (m *ResizeInstructionComplete) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Error))) i += copy(dAtA[i:], m.Error) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3417,9 +2344,6 @@ func (m *SetCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { } i += n22 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3448,9 +2372,6 @@ func (m *UpdateCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { } i += n23 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3490,9 +2411,6 @@ func (m *Topology) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3511,9 +2429,6 @@ func (m *RecalculateCaches) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -3527,9 +2442,6 @@ func encodeVarintPrivate(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *IndexMeta) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Keys { @@ -3538,16 +2450,10 @@ func (m *IndexMeta) Size() (n int) { if m.TrackExistence { n += 2 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *FieldOptions) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.CacheType) @@ -3577,32 +2483,26 @@ func (m *FieldOptions) Size() (n int) { if m.NoStandardView { n += 2 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.Base != 0 { + n += 1 + sovPrivate(uint64(m.Base)) + } + if m.BitDepth != 0 { + n += 1 + sovPrivate(uint64(m.BitDepth)) } return n } func (m *ImportResponse) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Err) if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *BlockDataRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3623,16 +2523,10 @@ func (m *BlockDataRequest) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *BlockDataResponse) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.RowIDs) > 0 { @@ -3649,16 +2543,10 @@ func (m *BlockDataResponse) Size() (n int) { } n += 1 + sovPrivate(uint64(l)) + l } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Cache) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.IDs) > 0 { @@ -3668,16 +2556,10 @@ func (m *Cache) Size() (n int) { } n += 1 + sovPrivate(uint64(l)) + l } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *MaxShards) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Standard) > 0 { @@ -3688,16 +2570,10 @@ func (m *MaxShards) Size() (n int) { n += mapEntrySize + 1 + sovPrivate(uint64(mapEntrySize)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *CreateShardMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3711,32 +2587,20 @@ func (m *CreateShardMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *DeleteIndexMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *CreateIndexMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3747,16 +2611,10 @@ func (m *CreateIndexMessage) Size() (n int) { l = m.Meta.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *CreateFieldMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3771,16 +2629,10 @@ func (m *CreateFieldMessage) Size() (n int) { l = m.Meta.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *DeleteFieldMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3791,16 +2643,10 @@ func (m *DeleteFieldMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *DeleteAvailableShardMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -3814,16 +2660,10 @@ func (m *DeleteAvailableShardMessage) Size() (n int) { if m.ShardID != 0 { n += 1 + sovPrivate(uint64(m.ShardID)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Field) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -3840,16 +2680,10 @@ func (m *Field) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Schema) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Indexes) > 0 { @@ -3858,16 +2692,10 @@ func (m *Schema) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Index) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -3880,16 +2708,10 @@ func (m *Index) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *URI) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Scheme) @@ -3903,16 +2725,10 @@ func (m *URI) Size() (n int) { if m.Port != 0 { n += 1 + sovPrivate(uint64(m.Port)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Node) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.ID) @@ -3930,16 +2746,10 @@ func (m *Node) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *NodeStateMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.NodeID) @@ -3950,16 +2760,10 @@ func (m *NodeStateMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *NodeEventMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Event != 0 { @@ -3969,16 +2773,10 @@ func (m *NodeEventMessage) Size() (n int) { l = m.Node.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *NodeStatus) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Node != nil { @@ -3995,16 +2793,10 @@ func (m *NodeStatus) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *IndexStatus) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -4017,16 +2809,10 @@ func (m *IndexStatus) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *FieldStatus) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -4040,16 +2826,10 @@ func (m *FieldStatus) Size() (n int) { } n += 1 + sovPrivate(uint64(l)) + l } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ClusterStatus) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.ClusterID) @@ -4066,16 +2846,10 @@ func (m *ClusterStatus) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *BSIGroup) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -4092,16 +2866,10 @@ func (m *BSIGroup) Size() (n int) { if m.Max != 0 { n += 1 + sovPrivate(uint64(m.Max)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *CreateViewMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -4116,16 +2884,10 @@ func (m *CreateViewMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *DeleteViewMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -4140,16 +2902,10 @@ func (m *DeleteViewMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ResizeInstruction) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.JobID != 0 { @@ -4177,16 +2933,10 @@ func (m *ResizeInstruction) Size() (n int) { l = m.NodeStatus.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ResizeSource) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Node != nil { @@ -4208,16 +2958,10 @@ func (m *ResizeSource) Size() (n int) { if m.Shard != 0 { n += 1 + sovPrivate(uint64(m.Shard)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ResizeInstructionComplete) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.JobID != 0 { @@ -4231,48 +2975,30 @@ func (m *ResizeInstructionComplete) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *SetCoordinatorMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.New != nil { l = m.New.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *UpdateCoordinatorMessage) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.New != nil { l = m.New.Size() n += 1 + l + sovPrivate(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Topology) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.ClusterID) @@ -4285,21 +3011,12 @@ func (m *Topology) Size() (n int) { n += 1 + l + sovPrivate(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *RecalculateCaches) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } @@ -4397,7 +3114,6 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4620,6 +3336,44 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } } m.NoStandardView = bool(v != 0) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) + } + m.Base = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Base |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitDepth", wireType) + } + m.BitDepth = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitDepth |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -4632,7 +3386,6 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4712,7 +3465,6 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4888,7 +3640,6 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4968,17 +3719,6 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.RowIDs) == 0 { - m.RowIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -5041,17 +3781,6 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.ColumnIDs) == 0 { - m.ColumnIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -5085,7 +3814,6 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5165,17 +3893,6 @@ func (m *Cache) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.IDs) == 0 { - m.IDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -5209,7 +3926,6 @@ func (m *Cache) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5367,7 +4083,6 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5495,7 +4210,6 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5575,7 +4289,6 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5688,7 +4401,6 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5830,7 +4542,6 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5939,7 +4650,6 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6067,7 +4777,6 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6209,7 +4918,6 @@ func (m *Field) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6291,7 +4999,6 @@ func (m *Schema) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6402,7 +5109,6 @@ func (m *Index) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6530,7 +5236,6 @@ func (m *URI) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6692,7 +5397,6 @@ func (m *Node) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6801,7 +5505,6 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -6904,7 +5607,6 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7052,7 +5754,6 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7163,7 +5864,6 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7272,17 +5972,6 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AvailableShards) == 0 { - m.AvailableShards = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -7316,7 +6005,6 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7456,7 +6144,6 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7603,7 +6290,6 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7741,7 +6427,6 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7879,7 +6564,6 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8112,7 +6796,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8302,7 +6985,6 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8434,7 +7116,6 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8518,7 +7199,6 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8602,7 +7282,6 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8711,7 +7390,6 @@ func (m *Topology) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8762,7 +7440,6 @@ func (m *RecalculateCaches) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8877,80 +7554,82 @@ var ( ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("private.proto", fileDescriptor_private_8095a89af06a70de) } +func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) } -var fileDescriptor_private_8095a89af06a70de = []byte{ - // 1139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdb, 0x6e, 0x1b, 0xc5, - 0x1b, 0xff, 0xef, 0x21, 0x8e, 0xfd, 0x39, 0x4e, 0x93, 0x6d, 0x9b, 0xff, 0x16, 0x50, 0x08, 0xa3, - 0x8a, 0x86, 0x4a, 0x84, 0xaa, 0xe5, 0x82, 0x53, 0xa5, 0x92, 0x38, 0x94, 0xa5, 0x24, 0x94, 0x71, - 0x92, 0x3b, 0x2e, 0x26, 0xf6, 0xa8, 0x59, 0x65, 0xbd, 0x63, 0x76, 0x67, 0x93, 0xb8, 0x17, 0xdc, - 0x82, 0xc4, 0x0b, 0xf0, 0x04, 0x3c, 0x0b, 0x97, 0x3c, 0x42, 0x15, 0x5e, 0x04, 0xcd, 0x37, 0x33, - 0xbb, 0x6b, 0xc7, 0x21, 0x51, 0xe0, 0x6e, 0xbe, 0xdf, 0x77, 0x3e, 0xae, 0x0d, 0x9d, 0x51, 0x16, - 0x9f, 0x30, 0xc9, 0x37, 0x46, 0x99, 0x90, 0x22, 0x68, 0xc6, 0xa9, 0xe4, 0x59, 0xca, 0x12, 0xf2, - 0x1c, 0x5a, 0x51, 0x3a, 0xe0, 0x67, 0x3b, 0x5c, 0xb2, 0x20, 0x00, 0xff, 0x05, 0x1f, 0xe7, 0xa1, - 0xb7, 0xe6, 0xac, 0x37, 0x29, 0xbe, 0x83, 0xf7, 0x61, 0x71, 0x2f, 0x63, 0xfd, 0xe3, 0xed, 0xb3, - 0x38, 0x97, 0x3c, 0xed, 0xf3, 0xd0, 0x47, 0xee, 0x14, 0x4a, 0xde, 0x38, 0xb0, 0xf0, 0x55, 0xcc, - 0x93, 0xc1, 0x77, 0x23, 0x19, 0x8b, 0x34, 0x0f, 0xde, 0x81, 0xd6, 0x16, 0xeb, 0x1f, 0xf1, 0xbd, - 0xf1, 0x88, 0xa3, 0xc5, 0x16, 0xad, 0x80, 0x92, 0xdb, 0x8b, 0x5f, 0x6b, 0x8b, 0x1d, 0x5a, 0x01, - 0xc1, 0x1a, 0xb4, 0xf7, 0xe2, 0x21, 0xff, 0xbe, 0x60, 0xa9, 0x2c, 0x86, 0xe1, 0x1c, 0x6a, 0xd7, - 0x21, 0x15, 0x2a, 0x1a, 0x6e, 0x22, 0x0b, 0xdf, 0xc1, 0x12, 0x78, 0x3b, 0x71, 0x1a, 0xb6, 0xd6, - 0x9c, 0x75, 0x8f, 0xaa, 0x27, 0x22, 0xec, 0x2c, 0x04, 0x83, 0xb0, 0xb3, 0x32, 0xc5, 0xf6, 0x64, - 0x8a, 0xbb, 0xa2, 0x27, 0x59, 0x3a, 0x60, 0xd9, 0xe0, 0x20, 0xe6, 0xa7, 0xe1, 0x82, 0x4e, 0x71, - 0x12, 0x25, 0x04, 0x16, 0xa3, 0xe1, 0x48, 0x64, 0x92, 0xf2, 0x7c, 0x24, 0xd2, 0x1c, 0x3d, 0x6e, - 0x67, 0x59, 0xe8, 0x60, 0x10, 0xea, 0x49, 0x7e, 0x82, 0xa5, 0xcd, 0x44, 0xf4, 0x8f, 0xbb, 0x4c, - 0x32, 0xca, 0x7f, 0x2c, 0x78, 0x2e, 0x83, 0x3b, 0x30, 0x87, 0x35, 0x36, 0x72, 0x9a, 0x50, 0x28, - 0xd6, 0x2b, 0x74, 0x35, 0x8a, 0x84, 0x42, 0x51, 0x1f, 0x2b, 0xe6, 0x53, 0x4d, 0x28, 0xb4, 0x77, - 0xc4, 0xb2, 0x01, 0x56, 0xca, 0xa7, 0x9a, 0x50, 0xb9, 0x60, 0xb4, 0xba, 0x3c, 0xf8, 0x26, 0x11, - 0x2c, 0xd7, 0xfc, 0x9b, 0x30, 0x57, 0xa0, 0x41, 0xc5, 0x69, 0xd4, 0xcd, 0x43, 0x67, 0xcd, 0x5b, - 0xf7, 0xa9, 0xa1, 0xb0, 0x09, 0x22, 0x29, 0x86, 0xa9, 0x62, 0xb9, 0xc8, 0xaa, 0x00, 0x72, 0x0f, - 0xe6, 0xb0, 0x23, 0x2a, 0xcb, 0x4a, 0x57, 0x3d, 0xc9, 0xcf, 0x0e, 0xb4, 0x76, 0xd8, 0x19, 0x86, - 0x91, 0x07, 0x4f, 0xa1, 0x69, 0xeb, 0x84, 0x42, 0xed, 0xc7, 0xef, 0x6d, 0xd8, 0x01, 0xdb, 0x28, - 0xc5, 0x36, 0xac, 0xcc, 0x76, 0x2a, 0xb3, 0x31, 0x2d, 0x55, 0xde, 0xfa, 0x1c, 0x3a, 0x13, 0x2c, - 0xe5, 0xef, 0x98, 0x8f, 0x6d, 0x55, 0x8f, 0xf9, 0x58, 0xe5, 0x7f, 0xc2, 0x92, 0x82, 0x63, 0xad, - 0x7c, 0xaa, 0x89, 0xcf, 0xdc, 0x4f, 0x1c, 0x72, 0x00, 0xc1, 0x56, 0xc6, 0x99, 0xe4, 0xe8, 0x64, - 0x87, 0xe7, 0x39, 0x7b, 0xc5, 0x2f, 0xaf, 0xb8, 0xae, 0xa2, 0x5b, 0xaf, 0x62, 0xd9, 0x07, 0xaf, - 0xd6, 0x07, 0xf2, 0x10, 0x82, 0x2e, 0x4f, 0xb8, 0xe4, 0x66, 0x3b, 0xfe, 0xc1, 0x2e, 0xe9, 0xd9, - 0x18, 0xae, 0x96, 0x0d, 0x1e, 0x80, 0xaf, 0x56, 0x0d, 0x43, 0x68, 0x3f, 0xbe, 0x5d, 0xd5, 0xa9, - 0xdc, 0x42, 0x8a, 0x02, 0x24, 0xb1, 0x46, 0x31, 0x9e, 0x2b, 0x13, 0x9b, 0x31, 0x4a, 0x0f, 0x8d, - 0x2b, 0x0f, 0x5d, 0xad, 0x54, 0xae, 0xea, 0x6b, 0x6a, 0xbc, 0x3d, 0xb3, 0xe9, 0xde, 0xd4, 0x1b, - 0xe9, 0xc3, 0xdb, 0xda, 0xc2, 0x97, 0x27, 0x2c, 0x4e, 0xd8, 0x61, 0x72, 0xcd, 0x8e, 0xcc, 0x08, - 0x3c, 0x84, 0x79, 0xd4, 0x8d, 0xba, 0x66, 0x0b, 0x2c, 0x49, 0x7e, 0x30, 0xf2, 0x6a, 0xf4, 0x77, - 0xd9, 0x90, 0x1b, 0x6b, 0xf8, 0x2e, 0xf3, 0x75, 0xaf, 0xce, 0x57, 0x39, 0x56, 0xeb, 0xa2, 0x4e, - 0x9d, 0xa7, 0x1c, 0x23, 0x41, 0x9e, 0x40, 0xa3, 0xd7, 0x3f, 0xe2, 0x43, 0x16, 0x7c, 0x00, 0xf3, - 0x18, 0x21, 0xcf, 0xcd, 0x44, 0xdf, 0x9a, 0xea, 0x14, 0xb5, 0x7c, 0xd2, 0x35, 0x99, 0xcd, 0x8c, - 0xe9, 0x01, 0x34, 0xd0, 0x7b, 0x1e, 0xfa, 0xd3, 0x66, 0x10, 0xa7, 0x86, 0x4d, 0xb6, 0xc1, 0xdb, - 0xa7, 0x91, 0xda, 0x54, 0x8c, 0xc0, 0x5a, 0x31, 0x94, 0xb2, 0xfd, 0xb5, 0xc8, 0xa5, 0xa9, 0x13, - 0xbe, 0x15, 0xf6, 0x52, 0x64, 0x12, 0x6b, 0xd4, 0xa1, 0xf8, 0x26, 0x39, 0xf8, 0xbb, 0x62, 0xc0, - 0x83, 0x45, 0x70, 0xa3, 0xae, 0xb1, 0xe1, 0x46, 0xdd, 0xe0, 0x5d, 0x34, 0x6f, 0x4a, 0xd3, 0xa9, - 0x82, 0xd8, 0xa7, 0x11, 0x45, 0xc7, 0xf7, 0xa1, 0x13, 0xe5, 0x5b, 0x42, 0x64, 0x83, 0x38, 0x65, - 0x52, 0x64, 0xe6, 0x1b, 0x30, 0x09, 0xe2, 0x06, 0x49, 0x26, 0xf5, 0xc5, 0x6e, 0x51, 0x4d, 0x90, - 0x67, 0xb0, 0xa4, 0x9c, 0x22, 0x61, 0xfb, 0xbd, 0x02, 0x0d, 0x85, 0x95, 0x41, 0x18, 0xaa, 0xb2, - 0xe0, 0xd6, 0x2d, 0x7c, 0xab, 0x2d, 0x6c, 0x9f, 0xf0, 0x54, 0xd6, 0x26, 0x06, 0x69, 0x34, 0xd0, - 0xa1, 0x9a, 0x08, 0x88, 0x4e, 0xd0, 0x64, 0xb2, 0x58, 0x65, 0xa2, 0x50, 0x8a, 0x3c, 0xf2, 0xab, - 0x03, 0x60, 0x03, 0x2a, 0xf2, 0x52, 0xc5, 0xb9, 0x5c, 0x25, 0x58, 0xb7, 0x9d, 0x37, 0xdb, 0xb2, - 0x54, 0x49, 0x69, 0x9c, 0xda, 0xc9, 0xf8, 0xa8, 0x9a, 0x0c, 0xdd, 0xd2, 0xbb, 0x53, 0x93, 0xa1, - 0xbd, 0x56, 0xf3, 0xf1, 0x12, 0xda, 0x35, 0x7c, 0xe6, 0x94, 0x7c, 0x58, 0x4e, 0x89, 0x3b, 0x6d, - 0x12, 0x71, 0x63, 0xd2, 0xce, 0xca, 0x0b, 0x68, 0xd7, 0xe0, 0x99, 0x16, 0xd7, 0xe1, 0xd6, 0xe4, - 0x1e, 0xda, 0xfb, 0x3e, 0x0d, 0x93, 0x18, 0x3a, 0x5b, 0x49, 0x91, 0x4b, 0x9e, 0x19, 0x73, 0xea, - 0xa3, 0xa0, 0x81, 0xb2, 0x79, 0x15, 0x30, 0xbb, 0x7f, 0xc1, 0x7d, 0x98, 0x53, 0x65, 0xd4, 0xeb, - 0x74, 0xb1, 0xc6, 0x9a, 0x49, 0x0e, 0xa0, 0xb9, 0xd9, 0x8b, 0x9e, 0x67, 0xa2, 0x18, 0xcd, 0x0c, - 0xda, 0x7e, 0xd3, 0xdd, 0x8b, 0xdf, 0x74, 0xef, 0xc2, 0x37, 0xdd, 0x2f, 0xbf, 0xe9, 0xa4, 0x07, - 0xcb, 0xfa, 0x54, 0xaa, 0x2d, 0xbe, 0xc9, 0xc1, 0xb1, 0x1f, 0x52, 0xaf, 0xf6, 0x21, 0xed, 0xc1, - 0xb2, 0xbe, 0x67, 0xff, 0xa5, 0xd1, 0xdf, 0x5d, 0x58, 0xa6, 0x3c, 0x8f, 0x5f, 0xf3, 0x28, 0xcd, - 0x65, 0x56, 0xf4, 0xd5, 0x4d, 0x52, 0xfa, 0xdf, 0x88, 0x43, 0x53, 0x6d, 0x8f, 0x6a, 0xe2, 0x3a, - 0x93, 0x1e, 0x3c, 0x82, 0xf6, 0xf4, 0xce, 0x5e, 0x14, 0xad, 0x8b, 0x04, 0x8f, 0x60, 0xbe, 0x27, - 0x8a, 0xac, 0x5f, 0x8e, 0x6f, 0xed, 0x4e, 0xea, 0xc8, 0x34, 0x9b, 0x5a, 0xb1, 0xe0, 0xe9, 0xd4, - 0x80, 0x84, 0x0d, 0xf4, 0xf2, 0xff, 0x4a, 0x6f, 0x82, 0x4d, 0xa7, 0xc6, 0xe9, 0xe3, 0xfa, 0x2e, - 0x86, 0xf3, 0xa8, 0x7b, 0x67, 0x32, 0x42, 0xa3, 0x58, 0x93, 0x23, 0xbf, 0x38, 0xb0, 0x50, 0x0f, - 0xe7, 0x5a, 0x4b, 0x5c, 0x76, 0xc7, 0x9d, 0xd9, 0x1d, 0x6f, 0x56, 0x77, 0xfc, 0xaa, 0x3b, 0xd5, - 0xef, 0x83, 0xb9, 0xda, 0xef, 0x03, 0x72, 0x0c, 0xf7, 0x2e, 0xb4, 0x6c, 0x4b, 0x0c, 0x47, 0x6a, - 0x36, 0xfe, 0x45, 0xeb, 0xd4, 0x79, 0xcb, 0x32, 0xd3, 0xb4, 0x16, 0xd5, 0x04, 0xf9, 0x14, 0xee, - 0xf6, 0xb8, 0xac, 0x35, 0xcc, 0x4e, 0xde, 0x1a, 0x78, 0xbb, 0xfc, 0xf4, 0x92, 0xf4, 0x15, 0x8b, - 0x7c, 0x01, 0xe1, 0xfe, 0x68, 0xc0, 0x24, 0xbf, 0x91, 0xf6, 0x26, 0x34, 0xf7, 0xc4, 0x48, 0x24, - 0xe2, 0xd5, 0xf8, 0x8a, 0x0b, 0x10, 0xc2, 0xbc, 0xbe, 0xe5, 0xfa, 0xa4, 0xb4, 0xa8, 0x25, 0xc9, - 0x6d, 0x35, 0xdc, 0x7d, 0x96, 0xf4, 0x8b, 0x44, 0x85, 0xa1, 0x7e, 0x3b, 0xe6, 0x9b, 0x4b, 0x7f, - 0x9c, 0xaf, 0x3a, 0x7f, 0x9e, 0xaf, 0x3a, 0x6f, 0xce, 0x57, 0x9d, 0xdf, 0xfe, 0x5a, 0xfd, 0xdf, - 0x61, 0x03, 0xff, 0x83, 0x3c, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xd8, 0x6d, 0x1f, 0x94, - 0x0c, 0x00, 0x00, +var fileDescriptorPrivate = []byte{ + // 1180 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdb, 0x6e, 0x1b, 0x45, + 0x18, 0x66, 0x0f, 0x71, 0xec, 0xdf, 0x75, 0xea, 0x4c, 0xdb, 0xb0, 0x2d, 0x28, 0x98, 0x51, 0x45, + 0x4d, 0x25, 0x42, 0xd5, 0x72, 0xc1, 0xa9, 0x52, 0x71, 0x1c, 0xca, 0x52, 0x12, 0xca, 0x38, 0xc9, + 0x1d, 0x17, 0x13, 0x7b, 0xd4, 0xac, 0xb2, 0xde, 0x35, 0xbb, 0xb3, 0x49, 0xdc, 0x0b, 0x6e, 0x41, + 0xe2, 0x05, 0xfa, 0x04, 0x3c, 0x0b, 0x97, 0x3c, 0x02, 0x0a, 0x2f, 0x82, 0xe6, 0x9f, 0xd9, 0x83, + 0x1d, 0x87, 0x44, 0x81, 0xbb, 0xf9, 0xbf, 0x7f, 0xfe, 0xf3, 0x61, 0x67, 0xa1, 0x35, 0x49, 0x82, + 0x63, 0x2e, 0xc5, 0xc6, 0x24, 0x89, 0x65, 0x4c, 0xea, 0x41, 0x24, 0x45, 0x12, 0xf1, 0x90, 0x3e, + 0x87, 0x86, 0x1f, 0x8d, 0xc4, 0xe9, 0xb6, 0x90, 0x9c, 0x10, 0x70, 0x5f, 0x88, 0x69, 0xea, 0x39, + 0x1d, 0xab, 0x5b, 0x67, 0x78, 0x26, 0x1f, 0xc0, 0xca, 0x6e, 0xc2, 0x87, 0x47, 0x5b, 0xa7, 0x41, + 0x2a, 0x45, 0x34, 0x14, 0x9e, 0x8b, 0xdc, 0x39, 0x94, 0xbe, 0xb1, 0xe1, 0xc6, 0xd7, 0x81, 0x08, + 0x47, 0xdf, 0x4f, 0x64, 0x10, 0x47, 0x29, 0x79, 0x17, 0x1a, 0x9b, 0x7c, 0x78, 0x28, 0x76, 0xa7, + 0x13, 0x81, 0x1a, 0x1b, 0xac, 0x04, 0x0a, 0xee, 0x20, 0x78, 0xad, 0x35, 0xb6, 0x58, 0x09, 0x90, + 0x0e, 0x34, 0x77, 0x83, 0xb1, 0xf8, 0x21, 0xe3, 0x91, 0xcc, 0xc6, 0xde, 0x12, 0x4a, 0x57, 0x21, + 0xe5, 0x2a, 0x2a, 0xae, 0x23, 0x0b, 0xcf, 0xe4, 0x36, 0x38, 0xdb, 0x41, 0xe4, 0x35, 0x3a, 0x56, + 0xd7, 0xe9, 0xd9, 0x9e, 0xc5, 0x14, 0x89, 0x28, 0x3f, 0xf5, 0xa0, 0x82, 0xf2, 0xd3, 0x22, 0xd4, + 0xe6, 0x6c, 0xa8, 0x3b, 0xf1, 0x40, 0xf2, 0x68, 0xc4, 0x93, 0xd1, 0x7e, 0x20, 0x4e, 0xbc, 0x1b, + 0x3a, 0xd4, 0x59, 0x54, 0xc9, 0xf6, 0x78, 0x2a, 0xbc, 0x96, 0x52, 0xc9, 0xf0, 0x4c, 0xee, 0x41, + 0xbd, 0x17, 0xc8, 0xbe, 0x98, 0xc8, 0x43, 0x6f, 0xa5, 0x63, 0x75, 0x5d, 0x56, 0xd0, 0x94, 0xc2, + 0x8a, 0x3f, 0x9e, 0xc4, 0x89, 0x64, 0x22, 0x9d, 0xc4, 0x51, 0x2a, 0x48, 0x1b, 0x9c, 0xad, 0x24, + 0xf1, 0x2c, 0x74, 0x5e, 0x1d, 0xe9, 0xcf, 0xd0, 0xee, 0x85, 0xf1, 0xf0, 0xa8, 0xcf, 0x25, 0x67, + 0xe2, 0xa7, 0x4c, 0xa4, 0x92, 0xdc, 0x86, 0x25, 0xac, 0x8d, 0xb9, 0xa7, 0x09, 0x85, 0x62, 0x9e, + 0x3d, 0x5b, 0xa3, 0x48, 0x28, 0x14, 0xe5, 0x31, 0xd3, 0x2e, 0xd3, 0x84, 0x42, 0x07, 0x87, 0x3c, + 0x19, 0x61, 0x86, 0x5d, 0xa6, 0x09, 0xe5, 0x3f, 0x46, 0xa7, 0xd3, 0x8a, 0x67, 0xea, 0xc3, 0x6a, + 0xc5, 0xbe, 0x71, 0x73, 0x0d, 0x6a, 0x2c, 0x3e, 0xf1, 0xfb, 0xa9, 0x67, 0x75, 0x9c, 0xae, 0xcb, + 0x0c, 0x85, 0xc5, 0x8b, 0xc3, 0x6c, 0x1c, 0x29, 0x96, 0x8d, 0xac, 0x12, 0xa0, 0x77, 0x61, 0x09, + 0x2b, 0xa9, 0xa2, 0x2c, 0x65, 0xd5, 0x91, 0xfe, 0x62, 0x41, 0x63, 0x9b, 0x9f, 0xa2, 0x1b, 0x29, + 0x79, 0x0a, 0xf5, 0x3c, 0xaf, 0x78, 0xa9, 0xf9, 0xf8, 0xfd, 0x8d, 0xbc, 0x31, 0x37, 0x8a, 0x6b, + 0x1b, 0xf9, 0x9d, 0xad, 0x48, 0x26, 0x53, 0x56, 0x88, 0xdc, 0xfb, 0x02, 0x5a, 0x33, 0x2c, 0x65, + 0xef, 0x48, 0x4c, 0xf3, 0xac, 0x1e, 0x89, 0xa9, 0x8a, 0xff, 0x98, 0x87, 0x99, 0xc0, 0x5c, 0xb9, + 0x4c, 0x13, 0x9f, 0xdb, 0x9f, 0x5a, 0x74, 0x1f, 0xc8, 0x66, 0x22, 0xb8, 0x14, 0x68, 0x64, 0x5b, + 0xa4, 0x29, 0x7f, 0x25, 0x2e, 0xce, 0xb8, 0xce, 0xa2, 0x5d, 0xcd, 0x62, 0x51, 0x07, 0xa7, 0x52, + 0x07, 0xfa, 0x10, 0x48, 0x5f, 0x84, 0x42, 0x0a, 0x33, 0x55, 0xff, 0xa2, 0x97, 0x0e, 0x72, 0x1f, + 0x2e, 0xbf, 0x4b, 0x1e, 0x80, 0xab, 0x46, 0x14, 0x5d, 0x68, 0x3e, 0xbe, 0x55, 0xe6, 0xa9, 0x98, + 0x5e, 0x86, 0x17, 0x68, 0x98, 0x2b, 0x45, 0x7f, 0x2e, 0x0d, 0x6c, 0x41, 0x2b, 0x3d, 0x34, 0xa6, + 0x1c, 0x34, 0xb5, 0x56, 0x9a, 0xaa, 0x8e, 0xb7, 0xb1, 0xf6, 0x2c, 0x0f, 0xf7, 0xba, 0xd6, 0xe8, + 0x10, 0xde, 0xd1, 0x1a, 0xbe, 0x3a, 0xe6, 0x41, 0xc8, 0x0f, 0xc2, 0x2b, 0x56, 0x64, 0x81, 0xe3, + 0x1e, 0x2c, 0xa3, 0xac, 0xdf, 0x37, 0x53, 0x90, 0x93, 0xf4, 0x47, 0x73, 0x5f, 0xb5, 0xfe, 0x0e, + 0x1f, 0x0b, 0xa3, 0x0d, 0xcf, 0x45, 0xbc, 0xf6, 0xe5, 0xf1, 0x2a, 0xc3, 0x6a, 0x5c, 0xd4, 0x8a, + 0x74, 0x94, 0x61, 0x24, 0xe8, 0x13, 0xa8, 0x0d, 0x86, 0x87, 0x62, 0xcc, 0xc9, 0x87, 0xb0, 0x8c, + 0x1e, 0x8a, 0xd4, 0x74, 0xf4, 0xcd, 0xb9, 0x4a, 0xb1, 0x9c, 0x4f, 0xfb, 0x26, 0xb2, 0x85, 0x3e, + 0x3d, 0x80, 0x1a, 0x5a, 0x4f, 0x3d, 0x77, 0x5e, 0x0d, 0xe2, 0xcc, 0xb0, 0xe9, 0x16, 0x38, 0x7b, + 0xcc, 0x57, 0x93, 0x8a, 0x1e, 0xe4, 0x5a, 0x0c, 0xa5, 0x74, 0x7f, 0x13, 0xa7, 0xd2, 0xe4, 0x09, + 0xcf, 0x0a, 0x7b, 0x19, 0x27, 0x12, 0x73, 0xd4, 0x62, 0x78, 0xa6, 0x29, 0xb8, 0x3b, 0xf1, 0x48, + 0x90, 0x15, 0xb0, 0xfd, 0xbe, 0xd1, 0x61, 0xfb, 0x7d, 0xf2, 0x1e, 0xaa, 0x37, 0xa9, 0x69, 0x95, + 0x4e, 0xec, 0x31, 0x9f, 0xa1, 0xe1, 0xfb, 0xd0, 0xf2, 0xd3, 0xcd, 0x38, 0x4e, 0x46, 0x41, 0xc4, + 0x65, 0x9c, 0x98, 0x6f, 0xc7, 0x2c, 0x88, 0x13, 0x24, 0xb9, 0xd4, 0x9b, 0xbe, 0xc1, 0x34, 0x41, + 0x9f, 0x41, 0x5b, 0x19, 0x45, 0x22, 0xaf, 0xf7, 0x1a, 0xd4, 0x14, 0x56, 0x38, 0x61, 0xa8, 0x52, + 0x83, 0x5d, 0xd5, 0xf0, 0x9d, 0xd6, 0xb0, 0x75, 0x2c, 0x22, 0x59, 0xe9, 0x18, 0xa4, 0x51, 0x41, + 0x8b, 0x69, 0x82, 0x50, 0x1d, 0xa0, 0x89, 0x64, 0xa5, 0x8c, 0x44, 0xa1, 0x0c, 0x79, 0xf4, 0x37, + 0x0b, 0x20, 0x77, 0x28, 0x4b, 0x0b, 0x11, 0xeb, 0x62, 0x11, 0xd2, 0xcd, 0x2b, 0x6f, 0xa6, 0xa5, + 0x5d, 0xde, 0xd2, 0x38, 0xcb, 0x3b, 0xe3, 0xe3, 0xb2, 0x33, 0x74, 0x49, 0xef, 0xcc, 0x75, 0x86, + 0xb6, 0x5a, 0xf6, 0xc7, 0x4b, 0x68, 0x56, 0xf0, 0x85, 0x5d, 0xf2, 0x51, 0xd1, 0x25, 0xf6, 0xbc, + 0x4a, 0xc4, 0x8d, 0xca, 0xbc, 0x57, 0x5e, 0x40, 0xb3, 0x02, 0x2f, 0xd4, 0xd8, 0x85, 0x9b, 0xb3, + 0x73, 0x98, 0xef, 0xf7, 0x79, 0x98, 0x06, 0xd0, 0xda, 0x0c, 0xb3, 0x54, 0x8a, 0xc4, 0xa8, 0x53, + 0x1f, 0x05, 0x0d, 0x14, 0xc5, 0x2b, 0x81, 0xc5, 0xf5, 0x23, 0xf7, 0x61, 0x49, 0xa5, 0x51, 0x8f, + 0xd3, 0xf9, 0x1c, 0x6b, 0x26, 0xdd, 0x87, 0x7a, 0x6f, 0xe0, 0x3f, 0x4f, 0xe2, 0x6c, 0xb2, 0xd0, + 0xe9, 0xfc, 0x2d, 0x60, 0x57, 0xde, 0x02, 0x6d, 0xfd, 0x16, 0x70, 0xf0, 0x13, 0x8d, 0xef, 0x80, + 0xb6, 0x7e, 0x07, 0xb8, 0x06, 0xe1, 0x6a, 0xff, 0xae, 0xea, 0x55, 0xa9, 0xa6, 0xf8, 0x3a, 0x0b, + 0x27, 0xff, 0x90, 0x3a, 0x95, 0x0f, 0xe9, 0x00, 0x56, 0xf5, 0x3e, 0xfb, 0x3f, 0x95, 0xfe, 0x6e, + 0xc3, 0x2a, 0x13, 0x69, 0xf0, 0x5a, 0xf8, 0x51, 0x2a, 0x93, 0x6c, 0xa8, 0x76, 0x92, 0x92, 0xff, + 0x36, 0x3e, 0x30, 0xd9, 0x76, 0x98, 0x26, 0xae, 0xd2, 0xe9, 0xe4, 0x11, 0x34, 0xe7, 0x67, 0xf6, + 0xfc, 0xd5, 0xea, 0x15, 0xf2, 0x08, 0x96, 0x07, 0x71, 0x96, 0x0c, 0x8b, 0xf6, 0xad, 0xec, 0x49, + 0xed, 0x99, 0x66, 0xb3, 0xfc, 0x1a, 0x79, 0x3a, 0xd7, 0x20, 0x5e, 0x0d, 0xad, 0xbc, 0x5d, 0xca, + 0xcd, 0xb0, 0xd9, 0x5c, 0x3b, 0x7d, 0x52, 0x9d, 0x45, 0x6f, 0x19, 0x65, 0x6f, 0xcf, 0x7a, 0x68, + 0x04, 0x2b, 0xf7, 0xe8, 0xaf, 0x16, 0xdc, 0xa8, 0xba, 0x73, 0xa5, 0x21, 0x2e, 0xaa, 0x63, 0x2f, + 0xac, 0x8e, 0xb3, 0xa8, 0x3a, 0x6e, 0x59, 0x9d, 0xf2, 0x7d, 0xb0, 0x54, 0x79, 0x1f, 0xd0, 0x23, + 0xb8, 0x7b, 0xae, 0x64, 0x9b, 0xf1, 0x78, 0xa2, 0x7a, 0xe3, 0x3f, 0x94, 0x4e, 0xad, 0xb7, 0x24, + 0x31, 0x45, 0x6b, 0x30, 0x4d, 0xd0, 0xcf, 0xe0, 0xce, 0x40, 0xc8, 0x4a, 0xc1, 0xf2, 0xce, 0xeb, + 0x80, 0xb3, 0x23, 0x4e, 0x2e, 0x08, 0x5f, 0xb1, 0xe8, 0x97, 0xe0, 0xed, 0x4d, 0x46, 0x5c, 0x8a, + 0x6b, 0x49, 0xf7, 0xa0, 0xbe, 0x1b, 0x4f, 0xe2, 0x30, 0x7e, 0x35, 0xbd, 0x64, 0x03, 0x78, 0xb0, + 0xac, 0x77, 0xb9, 0x5e, 0x29, 0x0d, 0x96, 0x93, 0xf4, 0x96, 0x6a, 0xee, 0x21, 0x0f, 0x87, 0x59, + 0xa8, 0xdc, 0x50, 0x6f, 0xc7, 0xb4, 0xd7, 0xfe, 0xe3, 0x6c, 0xdd, 0xfa, 0xf3, 0x6c, 0xdd, 0xfa, + 0xeb, 0x6c, 0xdd, 0x7a, 0xf3, 0xf7, 0xfa, 0x5b, 0x07, 0x35, 0xfc, 0x77, 0x79, 0xf2, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x4f, 0xa0, 0xa9, 0x8b, 0xcc, 0x0c, 0x00, 0x00, } diff --git a/internal/private.proto b/internal/private.proto index 971bb5f69..a327b835e 100644 --- a/internal/private.proto +++ b/internal/private.proto @@ -8,14 +8,16 @@ message IndexMeta { } message FieldOptions { - string Type = 8; + string Type = 8; string CacheType = 3; uint32 CacheSize = 4; - int64 Min = 9; - int64 Max = 10; string TimeQuantum = 5; - bool Keys = 11; - bool NoStandardView = 12; + int64 Min = 9; + int64 Max = 10; + bool Keys = 11; + bool NoStandardView = 12; + int64 Base = 13; + uint64 BitDepth = 14; } message ImportResponse { @@ -40,154 +42,154 @@ message Cache { } message MaxShards { - map Standard = 1; + map Standard = 1; } message CreateShardMessage { - string Index = 1; - string Field = 3; - uint64 Shard = 2; + string Index = 1; + string Field = 3; + uint64 Shard = 2; } message DeleteIndexMessage { - string Index = 1; + string Index = 1; } message CreateIndexMessage { - string Index = 1; - IndexMeta Meta = 2; + string Index = 1; + IndexMeta Meta = 2; } message CreateFieldMessage { - string Index = 1; - string Field = 2; - FieldOptions Meta = 3; + string Index = 1; + string Field = 2; + FieldOptions Meta = 3; } message DeleteFieldMessage { - string Index = 1; - string Field = 2; + string Index = 1; + string Field = 2; } message DeleteAvailableShardMessage { - string Index = 1; - string Field = 2; - uint64 ShardID = 3; + string Index = 1; + string Field = 2; + uint64 ShardID = 3; } message Field { - string Name = 1; - FieldOptions Meta = 2; - repeated string Views = 3; + string Name = 1; + FieldOptions Meta = 2; + repeated string Views = 3; } message Schema { - repeated Index Indexes = 1; + repeated Index Indexes = 1; } message Index { - string Name = 1; - repeated Field Fields = 4; + string Name = 1; + repeated Field Fields = 4; } message URI { - string Scheme = 1; - string Host = 2; - uint32 Port = 3; + string Scheme = 1; + string Host = 2; + uint32 Port = 3; } message Node { - string ID = 1; - URI URI = 2; - bool IsCoordinator = 3; - string State = 4; + string ID = 1; + URI URI = 2; + bool IsCoordinator = 3; + string State = 4; } message NodeStateMessage { - string NodeID = 1; - string State = 2; + string NodeID = 1; + string State = 2; } message NodeEventMessage { - uint32 Event = 1; - Node Node = 2; + uint32 Event = 1; + Node Node = 2; } message NodeStatus { - Node Node = 1; - Schema Schema = 3; - repeated IndexStatus Indexes = 4; + Node Node = 1; + Schema Schema = 3; + repeated IndexStatus Indexes = 4; } message IndexStatus { - string Name = 1; - repeated FieldStatus Fields = 2; + string Name = 1; + repeated FieldStatus Fields = 2; } message FieldStatus { - string Name = 1; - repeated uint64 AvailableShards = 2; + string Name = 1; + repeated uint64 AvailableShards = 2; } message ClusterStatus { - string ClusterID = 1; - string State = 2; - repeated Node Nodes = 3; + string ClusterID = 1; + string State = 2; + repeated Node Nodes = 3; } message BSIGroup { - string Name = 1; - string Type = 2; - int64 Min = 3; - int64 Max = 4; + string Name = 1; + string Type = 2; + int64 Min = 3; + int64 Max = 4; } message CreateViewMessage { - string Index = 1; - string Field = 2; - string View = 3; + string Index = 1; + string Field = 2; + string View = 3; } message DeleteViewMessage { - string Index = 1; - string Field = 2; - string View = 3; + string Index = 1; + string Field = 2; + string View = 3; } message ResizeInstruction { - int64 JobID = 1; - Node Node = 2; - Node Coordinator = 3; - repeated ResizeSource Sources = 4; - NodeStatus NodeStatus = 7; - ClusterStatus ClusterStatus = 6; + int64 JobID = 1; + Node Node = 2; + Node Coordinator = 3; + repeated ResizeSource Sources = 4; + NodeStatus NodeStatus = 7; + ClusterStatus ClusterStatus = 6; } message ResizeSource { - Node Node = 1; - string Index = 2; - string Field = 3; - string View = 4; - uint64 Shard = 5; + Node Node = 1; + string Index = 2; + string Field = 3; + string View = 4; + uint64 Shard = 5; } message ResizeInstructionComplete { - int64 JobID = 1; - Node Node = 2; - string Error = 3; + int64 JobID = 1; + Node Node = 2; + string Error = 3; } message SetCoordinatorMessage { - Node New = 1; + Node New = 1; } message UpdateCoordinatorMessage { - Node New = 1; + Node New = 1; } message Topology { - string ClusterID = 1; - repeated string NodeIDs = 2; + string ClusterID = 1; + repeated string NodeIDs = 2; } message RecalculateCaches {} diff --git a/internal/public.pb.go b/internal/public.pb.go index 5cd86a833..708d43e2f 100644 --- a/internal/public.pb.go +++ b/internal/public.pb.go @@ -1,13 +1,39 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: public.proto +/* + Package internal is a generated protocol buffer package. + + It is generated from these files: + public.proto + + It has these top-level messages: + Row + RowIdentifiers + Pair + FieldRow + GroupCount + ValCount + ColumnAttrSet + Attr + AttrMap + QueryRequest + QueryResponse + QueryResult + ImportRequest + ImportValueRequest + TranslateKeysRequest + TranslateKeysResponse + ImportRoaringRequestView + ImportRoaringRequest +*/ package internal import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import encoding_binary "encoding/binary" +import binary "encoding/binary" import io "io" @@ -23,46 +49,15 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Row struct { - Columns []uint64 `protobuf:"varint,1,rep,packed,name=Columns" json:"Columns,omitempty"` - Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` - Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Columns []uint64 `protobuf:"varint,1,rep,packed,name=Columns" json:"Columns,omitempty"` + Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` } -func (m *Row) Reset() { *m = Row{} } -func (m *Row) String() string { return proto.CompactTextString(m) } -func (*Row) ProtoMessage() {} -func (*Row) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{0} -} -func (m *Row) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Row.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Row) XXX_Merge(src proto.Message) { - xxx_messageInfo_Row.Merge(dst, src) -} -func (m *Row) XXX_Size() int { - return m.Size() -} -func (m *Row) XXX_DiscardUnknown() { - xxx_messageInfo_Row.DiscardUnknown(m) -} - -var xxx_messageInfo_Row proto.InternalMessageInfo +func (m *Row) Reset() { *m = Row{} } +func (m *Row) String() string { return proto.CompactTextString(m) } +func (*Row) ProtoMessage() {} +func (*Row) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{0} } func (m *Row) GetColumns() []uint64 { if m != nil { @@ -86,45 +81,14 @@ func (m *Row) GetAttrs() []*Attr { } type RowIdentifiers struct { - Rows []uint64 `protobuf:"varint,1,rep,packed,name=Rows" json:"Rows,omitempty"` - Keys []string `protobuf:"bytes,2,rep,name=Keys" json:"Keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Rows []uint64 `protobuf:"varint,1,rep,packed,name=Rows" json:"Rows,omitempty"` + Keys []string `protobuf:"bytes,2,rep,name=Keys" json:"Keys,omitempty"` } -func (m *RowIdentifiers) Reset() { *m = RowIdentifiers{} } -func (m *RowIdentifiers) String() string { return proto.CompactTextString(m) } -func (*RowIdentifiers) ProtoMessage() {} -func (*RowIdentifiers) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{1} -} -func (m *RowIdentifiers) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RowIdentifiers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RowIdentifiers.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *RowIdentifiers) XXX_Merge(src proto.Message) { - xxx_messageInfo_RowIdentifiers.Merge(dst, src) -} -func (m *RowIdentifiers) XXX_Size() int { - return m.Size() -} -func (m *RowIdentifiers) XXX_DiscardUnknown() { - xxx_messageInfo_RowIdentifiers.DiscardUnknown(m) -} - -var xxx_messageInfo_RowIdentifiers proto.InternalMessageInfo +func (m *RowIdentifiers) Reset() { *m = RowIdentifiers{} } +func (m *RowIdentifiers) String() string { return proto.CompactTextString(m) } +func (*RowIdentifiers) ProtoMessage() {} +func (*RowIdentifiers) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{1} } func (m *RowIdentifiers) GetRows() []uint64 { if m != nil { @@ -141,46 +105,15 @@ func (m *RowIdentifiers) GetKeys() []string { } type Pair struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` } -func (m *Pair) Reset() { *m = Pair{} } -func (m *Pair) String() string { return proto.CompactTextString(m) } -func (*Pair) ProtoMessage() {} -func (*Pair) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{2} -} -func (m *Pair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Pair.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Pair) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pair.Merge(dst, src) -} -func (m *Pair) XXX_Size() int { - return m.Size() -} -func (m *Pair) XXX_DiscardUnknown() { - xxx_messageInfo_Pair.DiscardUnknown(m) -} - -var xxx_messageInfo_Pair proto.InternalMessageInfo +func (m *Pair) Reset() { *m = Pair{} } +func (m *Pair) String() string { return proto.CompactTextString(m) } +func (*Pair) ProtoMessage() {} +func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{2} } func (m *Pair) GetID() uint64 { if m != nil { @@ -204,46 +137,15 @@ func (m *Pair) GetCount() uint64 { } type FieldRow struct { - Field string `protobuf:"bytes,1,opt,name=Field,proto3" json:"Field,omitempty"` - RowID uint64 `protobuf:"varint,2,opt,name=RowID,proto3" json:"RowID,omitempty"` - RowKey string `protobuf:"bytes,3,opt,name=RowKey,proto3" json:"RowKey,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Field string `protobuf:"bytes,1,opt,name=Field,proto3" json:"Field,omitempty"` + RowID uint64 `protobuf:"varint,2,opt,name=RowID,proto3" json:"RowID,omitempty"` + RowKey string `protobuf:"bytes,3,opt,name=RowKey,proto3" json:"RowKey,omitempty"` } -func (m *FieldRow) Reset() { *m = FieldRow{} } -func (m *FieldRow) String() string { return proto.CompactTextString(m) } -func (*FieldRow) ProtoMessage() {} -func (*FieldRow) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{3} -} -func (m *FieldRow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FieldRow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *FieldRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldRow.Merge(dst, src) -} -func (m *FieldRow) XXX_Size() int { - return m.Size() -} -func (m *FieldRow) XXX_DiscardUnknown() { - xxx_messageInfo_FieldRow.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldRow proto.InternalMessageInfo +func (m *FieldRow) Reset() { *m = FieldRow{} } +func (m *FieldRow) String() string { return proto.CompactTextString(m) } +func (*FieldRow) ProtoMessage() {} +func (*FieldRow) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{3} } func (m *FieldRow) GetField() string { if m != nil { @@ -267,45 +169,14 @@ func (m *FieldRow) GetRowKey() string { } type GroupCount struct { - Group []*FieldRow `protobuf:"bytes,1,rep,name=Group" json:"Group,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Group []*FieldRow `protobuf:"bytes,1,rep,name=Group" json:"Group,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` } -func (m *GroupCount) Reset() { *m = GroupCount{} } -func (m *GroupCount) String() string { return proto.CompactTextString(m) } -func (*GroupCount) ProtoMessage() {} -func (*GroupCount) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{4} -} -func (m *GroupCount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GroupCount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *GroupCount) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupCount.Merge(dst, src) -} -func (m *GroupCount) XXX_Size() int { - return m.Size() -} -func (m *GroupCount) XXX_DiscardUnknown() { - xxx_messageInfo_GroupCount.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupCount proto.InternalMessageInfo +func (m *GroupCount) Reset() { *m = GroupCount{} } +func (m *GroupCount) String() string { return proto.CompactTextString(m) } +func (*GroupCount) ProtoMessage() {} +func (*GroupCount) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{4} } func (m *GroupCount) GetGroup() []*FieldRow { if m != nil { @@ -322,45 +193,14 @@ func (m *GroupCount) GetCount() uint64 { } type ValCount struct { - Val int64 `protobuf:"varint,1,opt,name=Val,proto3" json:"Val,omitempty"` - Count int64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Val int64 `protobuf:"varint,1,opt,name=Val,proto3" json:"Val,omitempty"` + Count int64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` } -func (m *ValCount) Reset() { *m = ValCount{} } -func (m *ValCount) String() string { return proto.CompactTextString(m) } -func (*ValCount) ProtoMessage() {} -func (*ValCount) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{5} -} -func (m *ValCount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValCount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ValCount) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValCount.Merge(dst, src) -} -func (m *ValCount) XXX_Size() int { - return m.Size() -} -func (m *ValCount) XXX_DiscardUnknown() { - xxx_messageInfo_ValCount.DiscardUnknown(m) -} - -var xxx_messageInfo_ValCount proto.InternalMessageInfo +func (m *ValCount) Reset() { *m = ValCount{} } +func (m *ValCount) String() string { return proto.CompactTextString(m) } +func (*ValCount) ProtoMessage() {} +func (*ValCount) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{5} } func (m *ValCount) GetVal() int64 { if m != nil { @@ -377,46 +217,15 @@ func (m *ValCount) GetCount() int64 { } type ColumnAttrSet struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"` - Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` } -func (m *ColumnAttrSet) Reset() { *m = ColumnAttrSet{} } -func (m *ColumnAttrSet) String() string { return proto.CompactTextString(m) } -func (*ColumnAttrSet) ProtoMessage() {} -func (*ColumnAttrSet) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{6} -} -func (m *ColumnAttrSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ColumnAttrSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ColumnAttrSet.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ColumnAttrSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnAttrSet.Merge(dst, src) -} -func (m *ColumnAttrSet) XXX_Size() int { - return m.Size() -} -func (m *ColumnAttrSet) XXX_DiscardUnknown() { - xxx_messageInfo_ColumnAttrSet.DiscardUnknown(m) -} - -var xxx_messageInfo_ColumnAttrSet proto.InternalMessageInfo +func (m *ColumnAttrSet) Reset() { *m = ColumnAttrSet{} } +func (m *ColumnAttrSet) String() string { return proto.CompactTextString(m) } +func (*ColumnAttrSet) ProtoMessage() {} +func (*ColumnAttrSet) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{6} } func (m *ColumnAttrSet) GetID() uint64 { if m != nil { @@ -440,49 +249,18 @@ func (m *ColumnAttrSet) GetAttrs() []*Attr { } type Attr struct { - Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` - Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` - IntValue int64 `protobuf:"varint,4,opt,name=IntValue,proto3" json:"IntValue,omitempty"` - BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` - FloatValue float64 `protobuf:"fixed64,6,opt,name=FloatValue,proto3" json:"FloatValue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` + IntValue int64 `protobuf:"varint,4,opt,name=IntValue,proto3" json:"IntValue,omitempty"` + BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` + FloatValue float64 `protobuf:"fixed64,6,opt,name=FloatValue,proto3" json:"FloatValue,omitempty"` } -func (m *Attr) Reset() { *m = Attr{} } -func (m *Attr) String() string { return proto.CompactTextString(m) } -func (*Attr) ProtoMessage() {} -func (*Attr) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{7} -} -func (m *Attr) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Attr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Attr.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Attr) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attr.Merge(dst, src) -} -func (m *Attr) XXX_Size() int { - return m.Size() -} -func (m *Attr) XXX_DiscardUnknown() { - xxx_messageInfo_Attr.DiscardUnknown(m) -} - -var xxx_messageInfo_Attr proto.InternalMessageInfo +func (m *Attr) Reset() { *m = Attr{} } +func (m *Attr) String() string { return proto.CompactTextString(m) } +func (*Attr) ProtoMessage() {} +func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{7} } func (m *Attr) GetKey() string { if m != nil { @@ -527,44 +305,13 @@ func (m *Attr) GetFloatValue() float64 { } type AttrMap struct { - Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` } -func (m *AttrMap) Reset() { *m = AttrMap{} } -func (m *AttrMap) String() string { return proto.CompactTextString(m) } -func (*AttrMap) ProtoMessage() {} -func (*AttrMap) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{8} -} -func (m *AttrMap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttrMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttrMap.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *AttrMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttrMap.Merge(dst, src) -} -func (m *AttrMap) XXX_Size() int { - return m.Size() -} -func (m *AttrMap) XXX_DiscardUnknown() { - xxx_messageInfo_AttrMap.DiscardUnknown(m) -} - -var xxx_messageInfo_AttrMap proto.InternalMessageInfo +func (m *AttrMap) Reset() { *m = AttrMap{} } +func (m *AttrMap) String() string { return proto.CompactTextString(m) } +func (*AttrMap) ProtoMessage() {} +func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{8} } func (m *AttrMap) GetAttrs() []*Attr { if m != nil { @@ -574,49 +321,18 @@ func (m *AttrMap) GetAttrs() []*Attr { } type QueryRequest struct { - Query string `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"` - Shards []uint64 `protobuf:"varint,2,rep,packed,name=Shards" json:"Shards,omitempty"` - ColumnAttrs bool `protobuf:"varint,3,opt,name=ColumnAttrs,proto3" json:"ColumnAttrs,omitempty"` - Remote bool `protobuf:"varint,5,opt,name=Remote,proto3" json:"Remote,omitempty"` - ExcludeRowAttrs bool `protobuf:"varint,6,opt,name=ExcludeRowAttrs,proto3" json:"ExcludeRowAttrs,omitempty"` - ExcludeColumns bool `protobuf:"varint,7,opt,name=ExcludeColumns,proto3" json:"ExcludeColumns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Query string `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"` + Shards []uint64 `protobuf:"varint,2,rep,packed,name=Shards" json:"Shards,omitempty"` + ColumnAttrs bool `protobuf:"varint,3,opt,name=ColumnAttrs,proto3" json:"ColumnAttrs,omitempty"` + Remote bool `protobuf:"varint,5,opt,name=Remote,proto3" json:"Remote,omitempty"` + ExcludeRowAttrs bool `protobuf:"varint,6,opt,name=ExcludeRowAttrs,proto3" json:"ExcludeRowAttrs,omitempty"` + ExcludeColumns bool `protobuf:"varint,7,opt,name=ExcludeColumns,proto3" json:"ExcludeColumns,omitempty"` } -func (m *QueryRequest) Reset() { *m = QueryRequest{} } -func (m *QueryRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRequest) ProtoMessage() {} -func (*QueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{9} -} -func (m *QueryRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *QueryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRequest.Merge(dst, src) -} -func (m *QueryRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRequest proto.InternalMessageInfo +func (m *QueryRequest) Reset() { *m = QueryRequest{} } +func (m *QueryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRequest) ProtoMessage() {} +func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{9} } func (m *QueryRequest) GetQuery() string { if m != nil { @@ -661,46 +377,15 @@ func (m *QueryRequest) GetExcludeColumns() bool { } type QueryResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` - Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` - ColumnAttrSets []*ColumnAttrSet `protobuf:"bytes,3,rep,name=ColumnAttrSets" json:"ColumnAttrSets,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` + Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` + ColumnAttrSets []*ColumnAttrSet `protobuf:"bytes,3,rep,name=ColumnAttrSets" json:"ColumnAttrSets,omitempty"` } -func (m *QueryResponse) Reset() { *m = QueryResponse{} } -func (m *QueryResponse) String() string { return proto.CompactTextString(m) } -func (*QueryResponse) ProtoMessage() {} -func (*QueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{10} -} -func (m *QueryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *QueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResponse.Merge(dst, src) -} -func (m *QueryResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResponse proto.InternalMessageInfo +func (m *QueryResponse) Reset() { *m = QueryResponse{} } +func (m *QueryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryResponse) ProtoMessage() {} +func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{10} } func (m *QueryResponse) GetErr() string { if m != nil { @@ -724,52 +409,21 @@ func (m *QueryResponse) GetColumnAttrSets() []*ColumnAttrSet { } type QueryResult struct { - Type uint32 `protobuf:"varint,6,opt,name=Type,proto3" json:"Type,omitempty"` - Row *Row `protobuf:"bytes,1,opt,name=Row" json:"Row,omitempty"` - N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` - Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` - Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` - ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount" json:"ValCount,omitempty"` - RowIDs []uint64 `protobuf:"varint,7,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` - GroupCounts []*GroupCount `protobuf:"bytes,8,rep,name=GroupCounts" json:"GroupCounts,omitempty"` - RowIdentifiers *RowIdentifiers `protobuf:"bytes,9,opt,name=RowIdentifiers" json:"RowIdentifiers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type uint32 `protobuf:"varint,6,opt,name=Type,proto3" json:"Type,omitempty"` + Row *Row `protobuf:"bytes,1,opt,name=Row" json:"Row,omitempty"` + N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` + Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` + Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` + ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount" json:"ValCount,omitempty"` + RowIDs []uint64 `protobuf:"varint,7,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` + GroupCounts []*GroupCount `protobuf:"bytes,8,rep,name=GroupCounts" json:"GroupCounts,omitempty"` + RowIdentifiers *RowIdentifiers `protobuf:"bytes,9,opt,name=RowIdentifiers" json:"RowIdentifiers,omitempty"` } -func (m *QueryResult) Reset() { *m = QueryResult{} } -func (m *QueryResult) String() string { return proto.CompactTextString(m) } -func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{11} -} -func (m *QueryResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *QueryResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResult.Merge(dst, src) -} -func (m *QueryResult) XXX_Size() int { - return m.Size() -} -func (m *QueryResult) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResult.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResult proto.InternalMessageInfo +func (m *QueryResult) Reset() { *m = QueryResult{} } +func (m *QueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryResult) ProtoMessage() {} +func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{11} } func (m *QueryResult) GetType() uint32 { if m != nil { @@ -835,51 +489,20 @@ func (m *QueryResult) GetRowIdentifiers() *RowIdentifiers { } type ImportRequest struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - Shard uint64 `protobuf:"varint,3,opt,name=Shard,proto3" json:"Shard,omitempty"` - RowIDs []uint64 `protobuf:"varint,4,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` - RowKeys []string `protobuf:"bytes,7,rep,name=RowKeys" json:"RowKeys,omitempty"` - ColumnKeys []string `protobuf:"bytes,8,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` - Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + Shard uint64 `protobuf:"varint,3,opt,name=Shard,proto3" json:"Shard,omitempty"` + RowIDs []uint64 `protobuf:"varint,4,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + RowKeys []string `protobuf:"bytes,7,rep,name=RowKeys" json:"RowKeys,omitempty"` + ColumnKeys []string `protobuf:"bytes,8,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` + Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` } -func (m *ImportRequest) Reset() { *m = ImportRequest{} } -func (m *ImportRequest) String() string { return proto.CompactTextString(m) } -func (*ImportRequest) ProtoMessage() {} -func (*ImportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{12} -} -func (m *ImportRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ImportRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRequest.Merge(dst, src) -} -func (m *ImportRequest) XXX_Size() int { - return m.Size() -} -func (m *ImportRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImportRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportRequest proto.InternalMessageInfo +func (m *ImportRequest) Reset() { *m = ImportRequest{} } +func (m *ImportRequest) String() string { return proto.CompactTextString(m) } +func (*ImportRequest) ProtoMessage() {} +func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{12} } func (m *ImportRequest) GetIndex() string { if m != nil { @@ -938,49 +561,18 @@ func (m *ImportRequest) GetTimestamps() []int64 { } type ImportValueRequest struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - Shard uint64 `protobuf:"varint,3,opt,name=Shard,proto3" json:"Shard,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` - ColumnKeys []string `protobuf:"bytes,7,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` - Values []int64 `protobuf:"varint,6,rep,packed,name=Values" json:"Values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + Shard uint64 `protobuf:"varint,3,opt,name=Shard,proto3" json:"Shard,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + ColumnKeys []string `protobuf:"bytes,7,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` + Values []int64 `protobuf:"varint,6,rep,packed,name=Values" json:"Values,omitempty"` } -func (m *ImportValueRequest) Reset() { *m = ImportValueRequest{} } -func (m *ImportValueRequest) String() string { return proto.CompactTextString(m) } -func (*ImportValueRequest) ProtoMessage() {} -func (*ImportValueRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{13} -} -func (m *ImportValueRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportValueRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ImportValueRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportValueRequest.Merge(dst, src) -} -func (m *ImportValueRequest) XXX_Size() int { - return m.Size() -} -func (m *ImportValueRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImportValueRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportValueRequest proto.InternalMessageInfo +func (m *ImportValueRequest) Reset() { *m = ImportValueRequest{} } +func (m *ImportValueRequest) String() string { return proto.CompactTextString(m) } +func (*ImportValueRequest) ProtoMessage() {} +func (*ImportValueRequest) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{13} } func (m *ImportValueRequest) GetIndex() string { if m != nil { @@ -1025,46 +617,15 @@ func (m *ImportValueRequest) GetValues() []int64 { } type TranslateKeysRequest struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` - Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` + Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` } -func (m *TranslateKeysRequest) Reset() { *m = TranslateKeysRequest{} } -func (m *TranslateKeysRequest) String() string { return proto.CompactTextString(m) } -func (*TranslateKeysRequest) ProtoMessage() {} -func (*TranslateKeysRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{14} -} -func (m *TranslateKeysRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TranslateKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TranslateKeysRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *TranslateKeysRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranslateKeysRequest.Merge(dst, src) -} -func (m *TranslateKeysRequest) XXX_Size() int { - return m.Size() -} -func (m *TranslateKeysRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TranslateKeysRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TranslateKeysRequest proto.InternalMessageInfo +func (m *TranslateKeysRequest) Reset() { *m = TranslateKeysRequest{} } +func (m *TranslateKeysRequest) String() string { return proto.CompactTextString(m) } +func (*TranslateKeysRequest) ProtoMessage() {} +func (*TranslateKeysRequest) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{14} } func (m *TranslateKeysRequest) GetIndex() string { if m != nil { @@ -1088,44 +649,13 @@ func (m *TranslateKeysRequest) GetKeys() []string { } type TranslateKeysResponse struct { - IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs" json:"IDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs" json:"IDs,omitempty"` } -func (m *TranslateKeysResponse) Reset() { *m = TranslateKeysResponse{} } -func (m *TranslateKeysResponse) String() string { return proto.CompactTextString(m) } -func (*TranslateKeysResponse) ProtoMessage() {} -func (*TranslateKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{15} -} -func (m *TranslateKeysResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TranslateKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TranslateKeysResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *TranslateKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranslateKeysResponse.Merge(dst, src) -} -func (m *TranslateKeysResponse) XXX_Size() int { - return m.Size() -} -func (m *TranslateKeysResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TranslateKeysResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TranslateKeysResponse proto.InternalMessageInfo +func (m *TranslateKeysResponse) Reset() { *m = TranslateKeysResponse{} } +func (m *TranslateKeysResponse) String() string { return proto.CompactTextString(m) } +func (*TranslateKeysResponse) ProtoMessage() {} +func (*TranslateKeysResponse) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{15} } func (m *TranslateKeysResponse) GetIDs() []uint64 { if m != nil { @@ -1135,45 +665,14 @@ func (m *TranslateKeysResponse) GetIDs() []uint64 { } type ImportRoaringRequestView struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` } -func (m *ImportRoaringRequestView) Reset() { *m = ImportRoaringRequestView{} } -func (m *ImportRoaringRequestView) String() string { return proto.CompactTextString(m) } -func (*ImportRoaringRequestView) ProtoMessage() {} -func (*ImportRoaringRequestView) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{16} -} -func (m *ImportRoaringRequestView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportRoaringRequestView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportRoaringRequestView.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ImportRoaringRequestView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRoaringRequestView.Merge(dst, src) -} -func (m *ImportRoaringRequestView) XXX_Size() int { - return m.Size() -} -func (m *ImportRoaringRequestView) XXX_DiscardUnknown() { - xxx_messageInfo_ImportRoaringRequestView.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportRoaringRequestView proto.InternalMessageInfo +func (m *ImportRoaringRequestView) Reset() { *m = ImportRoaringRequestView{} } +func (m *ImportRoaringRequestView) String() string { return proto.CompactTextString(m) } +func (*ImportRoaringRequestView) ProtoMessage() {} +func (*ImportRoaringRequestView) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{16} } func (m *ImportRoaringRequestView) GetName() string { if m != nil { @@ -1190,45 +689,14 @@ func (m *ImportRoaringRequestView) GetData() []byte { } type ImportRoaringRequest struct { - Clear bool `protobuf:"varint,1,opt,name=Clear,proto3" json:"Clear,omitempty"` - Views []*ImportRoaringRequestView `protobuf:"bytes,2,rep,name=views" json:"views,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Clear bool `protobuf:"varint,1,opt,name=Clear,proto3" json:"Clear,omitempty"` + Views []*ImportRoaringRequestView `protobuf:"bytes,2,rep,name=views" json:"views,omitempty"` } -func (m *ImportRoaringRequest) Reset() { *m = ImportRoaringRequest{} } -func (m *ImportRoaringRequest) String() string { return proto.CompactTextString(m) } -func (*ImportRoaringRequest) ProtoMessage() {} -func (*ImportRoaringRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_f65cfea24ac19f54, []int{17} -} -func (m *ImportRoaringRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportRoaringRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportRoaringRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ImportRoaringRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRoaringRequest.Merge(dst, src) -} -func (m *ImportRoaringRequest) XXX_Size() int { - return m.Size() -} -func (m *ImportRoaringRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImportRoaringRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportRoaringRequest proto.InternalMessageInfo +func (m *ImportRoaringRequest) Reset() { *m = ImportRoaringRequest{} } +func (m *ImportRoaringRequest) String() string { return proto.CompactTextString(m) } +func (*ImportRoaringRequest) ProtoMessage() {} +func (*ImportRoaringRequest) Descriptor() ([]byte, []int) { return fileDescriptorPublic, []int{17} } func (m *ImportRoaringRequest) GetClear() bool { if m != nil { @@ -1323,9 +791,6 @@ func (m *Row) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1376,9 +841,6 @@ func (m *RowIdentifiers) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1413,9 +875,6 @@ func (m *Pair) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1451,9 +910,6 @@ func (m *FieldRow) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(len(m.RowKey))) i += copy(dAtA[i:], m.RowKey) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1489,9 +945,6 @@ func (m *GroupCount) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPublic(dAtA, i, uint64(m.Count)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1520,9 +973,6 @@ func (m *ValCount) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPublic(dAtA, i, uint64(m.Count)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1564,9 +1014,6 @@ func (m *ColumnAttrSet) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1620,12 +1067,9 @@ func (m *Attr) MarshalTo(dAtA []byte) (int, error) { if m.FloatValue != 0 { dAtA[i] = 0x31 i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) i += 8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1656,9 +1100,6 @@ func (m *AttrMap) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1740,9 +1181,6 @@ func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { } i++ } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1791,9 +1229,6 @@ func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -1903,9 +1338,6 @@ func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { } i += n11 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2023,9 +1455,6 @@ func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2111,9 +1540,6 @@ func (m *ImportValueRequest) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2159,9 +1585,6 @@ func (m *TranslateKeysRequest) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2197,9 +1620,6 @@ func (m *TranslateKeysResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(j22)) i += copy(dAtA[i:], dAtA23[:j22]) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2230,9 +1650,6 @@ func (m *ImportRoaringRequestView) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2273,9 +1690,6 @@ func (m *ImportRoaringRequest) MarshalTo(dAtA []byte) (int, error) { i += n } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } return i, nil } @@ -2289,9 +1703,6 @@ func encodeVarintPublic(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Row) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Columns) > 0 { @@ -2313,16 +1724,10 @@ func (m *Row) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *RowIdentifiers) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Rows) > 0 { @@ -2338,16 +1743,10 @@ func (m *RowIdentifiers) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Pair) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.ID != 0 { @@ -2360,16 +1759,10 @@ func (m *Pair) Size() (n int) { if l > 0 { n += 1 + l + sovPublic(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *FieldRow) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Field) @@ -2383,16 +1776,10 @@ func (m *FieldRow) Size() (n int) { if l > 0 { n += 1 + l + sovPublic(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *GroupCount) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Group) > 0 { @@ -2404,16 +1791,10 @@ func (m *GroupCount) Size() (n int) { if m.Count != 0 { n += 1 + sovPublic(uint64(m.Count)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ValCount) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Val != 0 { @@ -2422,16 +1803,10 @@ func (m *ValCount) Size() (n int) { if m.Count != 0 { n += 1 + sovPublic(uint64(m.Count)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ColumnAttrSet) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.ID != 0 { @@ -2447,16 +1822,10 @@ func (m *ColumnAttrSet) Size() (n int) { if l > 0 { n += 1 + l + sovPublic(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *Attr) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Key) @@ -2479,16 +1848,10 @@ func (m *Attr) Size() (n int) { if m.FloatValue != 0 { n += 9 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *AttrMap) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.Attrs) > 0 { @@ -2497,16 +1860,10 @@ func (m *AttrMap) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *QueryRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Query) @@ -2532,16 +1889,10 @@ func (m *QueryRequest) Size() (n int) { if m.ExcludeColumns { n += 2 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *QueryResponse) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Err) @@ -2560,16 +1911,10 @@ func (m *QueryResponse) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *QueryResult) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Row != nil { @@ -2612,16 +1957,10 @@ func (m *QueryResult) Size() (n int) { l = m.RowIdentifiers.Size() n += 1 + l + sovPublic(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ImportRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -2668,16 +2007,10 @@ func (m *ImportRequest) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ImportValueRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -2711,16 +2044,10 @@ func (m *ImportValueRequest) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *TranslateKeysRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Index) @@ -2737,16 +2064,10 @@ func (m *TranslateKeysRequest) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *TranslateKeysResponse) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if len(m.IDs) > 0 { @@ -2756,16 +2077,10 @@ func (m *TranslateKeysResponse) Size() (n int) { } n += 1 + sovPublic(uint64(l)) + l } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ImportRoaringRequestView) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l l = len(m.Name) @@ -2776,16 +2091,10 @@ func (m *ImportRoaringRequestView) Size() (n int) { if l > 0 { n += 1 + l + sovPublic(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } func (m *ImportRoaringRequest) Size() (n int) { - if m == nil { - return 0 - } var l int _ = l if m.Clear { @@ -2797,9 +2106,6 @@ func (m *ImportRoaringRequest) Size() (n int) { n += 1 + l + sovPublic(uint64(l)) } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } return n } @@ -2886,17 +2192,6 @@ func (m *Row) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Columns) == 0 { - m.Columns = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -2990,7 +2285,6 @@ func (m *Row) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3070,17 +2364,6 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Rows) == 0 { - m.Rows = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -3143,7 +2426,6 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3261,7 +2543,6 @@ func (m *Pair) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3389,7 +2670,6 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3490,7 +2770,6 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3579,7 +2858,6 @@ func (m *ValCount) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3709,7 +2987,6 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3872,7 +3149,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.FloatValue = float64(math.Float64frombits(v)) default: @@ -3887,7 +3164,6 @@ func (m *Attr) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3969,7 +3245,6 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4078,17 +3353,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Shards) == 0 { - m.Shards = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -4202,7 +3466,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4344,7 +3607,6 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4579,17 +3841,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.RowIDs) == 0 { - m.RowIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -4687,7 +3938,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4844,17 +4094,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.RowIDs) == 0 { - m.RowIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -4917,17 +4156,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.ColumnIDs) == 0 { - m.ColumnIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -4990,17 +4218,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Timestamps) == 0 { - m.Timestamps = make([]int64, 0, elementCount) - } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { @@ -5092,7 +4309,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5249,17 +4465,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.ColumnIDs) == 0 { - m.ColumnIDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -5322,17 +4527,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]int64, 0, elementCount) - } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { @@ -5395,7 +4589,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5533,7 +4726,6 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5613,17 +4805,6 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.IDs) == 0 { - m.IDs = make([]uint64, 0, elementCount) - } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -5657,7 +4838,6 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5768,7 +4948,6 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5870,7 +5049,6 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -5985,9 +5163,9 @@ var ( ErrIntOverflowPublic = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("public.proto", fileDescriptor_public_f65cfea24ac19f54) } +func init() { proto.RegisterFile("public.proto", fileDescriptorPublic) } -var fileDescriptor_public_f65cfea24ac19f54 = []byte{ +var fileDescriptorPublic = []byte{ // 880 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x8e, 0x1b, 0x45, 0x10, 0xa6, 0x3d, 0x63, 0x7b, 0x5c, 0x5e, 0x9b, 0xa8, 0xe5, 0x84, 0x11, 0x8a, 0x8c, 0x35, 0x42, diff --git a/roaring/roaring.go b/roaring/roaring.go index 78b5f4ca8..2d1a2d08a 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -31,16 +31,18 @@ const ( // MagicNumber is an identifier, in bytes 0-1 of the file. MagicNumber = uint32(12348) - // storageVersion indicates the storage version, in bytes 2-3. + // storageVersion indicates the storage version, in byte 2. storageVersion = uint32(0) - // cookie is the first four bytes in a roaring bitmap file, + // NOTE: byte 3 stores user-defined flags. + + // cookie is the first 3 bytes in a roaring bitmap file, // formed by joining MagicNumber and storageVersion cookie = MagicNumber + storageVersion<<16 - // headerBaseSize is the size in bytes of the cookie and key count at the - // beginning of a file. - headerBaseSize = 4 + 4 + // headerBaseSize is the size in bytes of the cookie, flags, and key count + // at the beginning of a file. + headerBaseSize = 3 + 1 + 4 // runCountHeaderSize is the size in bytes of the run count stored // at the beginning of every serialized run container. @@ -123,6 +125,9 @@ type ContainerIterator interface { type Bitmap struct { Containers Containers + // User-defined flags. + Flags byte + // Number of bit change operations written to the writer. Some operations // contain multiple values, each of those counts the number of values rather // than counting as one operation. @@ -970,7 +975,7 @@ func (b *Bitmap) writeToUnoptimized(w io.Writer) (n int64, err error) { n: 0, } - ew.WriteUint32(byte4, cookie) + ew.WriteUint32(byte4, cookie|(uint32(b.Flags)<<24)) ew.WriteUint32(byte4, uint32(containerCount)) // Descriptive header section: encode keys and cardinality. @@ -1032,7 +1037,8 @@ func (b *Bitmap) unmarshalPilosaRoaring(data []byte) error { // Verify the first two bytes are a valid MagicNumber, and second two bytes match current storageVersion. fileMagic := uint32(binary.LittleEndian.Uint16(data[0:2])) - fileVersion := uint32(binary.LittleEndian.Uint16(data[2:4])) + b.Flags = data[2] + fileVersion := uint32(data[3]) if fileMagic != MagicNumber { return fmt.Errorf("invalid roaring file, magic number %v is incorrect", fileMagic) } @@ -1041,8 +1047,8 @@ func (b *Bitmap) unmarshalPilosaRoaring(data []byte) error { return fmt.Errorf("wrong roaring version, file is v%d, server requires v%d", fileVersion, storageVersion) } - // Read key count in bytes sizeof(cookie):(sizeof(cookie)+sizeof(uint32)). - keyN := binary.LittleEndian.Uint32(data[4:8]) + // Read key count in bytes sizeof(cookie)+sizeof(flag):(sizeof(cookie)+sizeof(uint32)). + keyN := binary.LittleEndian.Uint32(data[3+1 : 8]) headerSize := headerBaseSize b.Containers.Reset() @@ -4166,11 +4172,11 @@ const ( serialCookie = 12347 // runs, arrays, and bitmaps ) -func readOfficialHeader(buf []byte) (size uint32, containerTyper func(index uint, card int) byte, header, pos int, haveRuns bool, err error) { +func readOfficialHeader(buf []byte) (size uint32, containerTyper func(index uint, card int) byte, header, pos int, flags byte, haveRuns bool, err error) { statsHit("readOfficialHeader") if len(buf) < 8 { err = fmt.Errorf("buffer too small, expecting at least 8 bytes, was %d", len(buf)) - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } cf := func(index uint, card int) (newType byte) { newType = containerBitmap @@ -4180,7 +4186,8 @@ func readOfficialHeader(buf []byte) (size uint32, containerTyper func(index uint return newType } containerTyper = cf - cookie := binary.LittleEndian.Uint32(buf) + cookie := binary.LittleEndian.Uint32(buf) & 0xFFFFFF + flags = buf[3] pos += 4 // cookie header @@ -4195,7 +4202,7 @@ func readOfficialHeader(buf []byte) (size uint32, containerTyper func(index uint isRunBitmapSize := (int(size) + 7) / 8 if pos+isRunBitmapSize > len(buf) { err = fmt.Errorf("malformed bitmap, is-run bitmap overruns buffer at %d", pos+isRunBitmapSize) - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } isRunBitmap := buf[pos : pos+isRunBitmapSize] @@ -4208,22 +4215,22 @@ func readOfficialHeader(buf []byte) (size uint32, containerTyper func(index uint } } else { err = fmt.Errorf("did not find expected serialCookie in header") - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } header = pos if size > (1 << 16) { err = fmt.Errorf("it is logically impossible to have more than (1<<16) containers") - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } // descriptive header if pos+2*2*int(size) > len(buf) { err = fmt.Errorf("malformed bitmap, key-cardinality slice overruns buffer at %d", pos+2*2*int(size)) - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } pos += 2 * 2 * int(size) // moving pos past keycount - return size, containerTyper, header, pos, haveRuns, err + return size, containerTyper, header, pos, flags, haveRuns, err } // UnmarshalBinary decodes b from a binary-encoded byte slice. data can be in @@ -4240,10 +4247,11 @@ func (b *Bitmap) UnmarshalBinary(data []byte) error { return errors.Wrap(b.unmarshalPilosaRoaring(data), "unmarshaling as pilosa roaring") } - keyN, containerTyper, header, pos, haveRuns, err := readOfficialHeader(data) + keyN, containerTyper, header, pos, flags, haveRuns, err := readOfficialHeader(data) if err != nil { return errors.Wrap(err, "reading roaring header") } + b.Flags = flags b.Containers.Reset() // Descriptive header section: Read container keys and cardinalities. diff --git a/row.go b/row.go index e393a9db4..a2e938434 100644 --- a/row.go +++ b/row.go @@ -113,6 +113,16 @@ func (r *Row) Intersect(other *Row) *Row { return &Row{segments: segments} } +// Any returns true if row contains any bits. +func (r *Row) Any() bool { + for _, s := range r.segments { + if s.data.Any() { + return true + } + } + return false +} + // Xor returns the xor of r and other. func (r *Row) Xor(other *Row) *Row { var segments []rowSegment diff --git a/view.go b/view.go index e8894db7d..eee1ab810 100644 --- a/view.go +++ b/view.go @@ -166,6 +166,15 @@ func (v *view) close() error { return nil } +// flags returns a set of flags for the underlying fragments. +func (v *view) flags() byte { + var flag byte + if v.fieldType == FieldTypeInt { + flag |= roaringFlagBSIv2 + } + return flag +} + // availableShards returns a bitmap of shards which contain data. func (v *view) availableShards() *roaring.Bitmap { v.mu.RLock() @@ -254,7 +263,7 @@ func (v *view) CreateFragmentIfNotExists(shard uint64) (*fragment, error) { } func (v *view) newFragment(path string, shard uint64) *fragment { - frag := newFragment(path, v.index, v.field, v.name, shard) + frag := newFragment(path, v.index, v.field, v.name, shard, v.flags()) frag.CacheType = v.cacheType frag.CacheSize = v.cacheSize frag.Logger = v.logger @@ -331,7 +340,7 @@ func (v *view) clearBit(rowID, columnID uint64) (changed bool, err error) { } // value uses a column of bits to read a multi-bit value. -func (v *view) value(columnID uint64, bitDepth uint) (value uint64, exists bool, err error) { +func (v *view) value(columnID uint64, bitDepth uint) (value int64, exists bool, err error) { shard := columnID / ShardWidth frag, err := v.CreateFragmentIfNotExists(shard) if err != nil { @@ -341,7 +350,7 @@ func (v *view) value(columnID uint64, bitDepth uint) (value uint64, exists bool, } // setValue uses a column of bits to set a multi-bit value. -func (v *view) setValue(columnID uint64, bitDepth uint, value uint64) (changed bool, err error) { +func (v *view) setValue(columnID uint64, bitDepth uint, value int64) (changed bool, err error) { shard := columnID / ShardWidth frag, err := v.CreateFragmentIfNotExists(shard) if err != nil { @@ -351,7 +360,7 @@ func (v *view) setValue(columnID uint64, bitDepth uint, value uint64) (changed b } // sum returns the sum & count of a field. -func (v *view) sum(filter *Row, bitDepth uint) (sum, count uint64, err error) { +func (v *view) sum(filter *Row, bitDepth uint) (sum int64, count uint64, err error) { for _, f := range v.allFragments() { fsum, fcount, err := f.sum(filter, bitDepth) if err != nil { @@ -364,7 +373,7 @@ func (v *view) sum(filter *Row, bitDepth uint) (sum, count uint64, err error) { } // min returns the min and count of a field. -func (v *view) min(filter *Row, bitDepth uint) (min, count uint64, err error) { +func (v *view) min(filter *Row, bitDepth uint) (min int64, count uint64, err error) { var minHasValue bool for _, f := range v.allFragments() { fmin, fcount, err := f.min(filter, bitDepth) @@ -392,7 +401,7 @@ func (v *view) min(filter *Row, bitDepth uint) (min, count uint64, err error) { } // max returns the max and count of a field. -func (v *view) max(filter *Row, bitDepth uint) (max, count uint64, err error) { +func (v *view) max(filter *Row, bitDepth uint) (max int64, count uint64, err error) { for _, f := range v.allFragments() { fmax, fcount, err := f.max(filter, bitDepth) if err != nil { @@ -407,7 +416,7 @@ func (v *view) max(filter *Row, bitDepth uint) (max, count uint64, err error) { } // rangeOp returns rows with a field value encoding matching the predicate. -func (v *view) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, error) { +func (v *view) rangeOp(op pql.Token, bitDepth uint, predicate int64) (*Row, error) { r := NewRow() for _, frag := range v.allFragments() { other, err := frag.rangeOp(op, bitDepth, predicate) @@ -419,6 +428,29 @@ func (v *view) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, err return r, nil } +// upgradeViewBSIv2 upgrades the fragments of v. Returns ok true if any fragment upgraded. +func upgradeViewBSIv2(v *view, bitDepth uint) (ok bool, _ error) { + // If reading from an old formatted BSI roaring bitmap, upgrade and reload. + for _, frag := range v.allFragments() { + if frag.storage.Flags&roaringFlagBSIv2 == 1 { + continue // already upgraded, skip + } + ok = true // mark as upgraded, requires reload + + oldPath := frag.path + if newPath, err := upgradeRoaringBSIv2(frag, bitDepth); err != nil { + return ok, errors.Wrap(err, "upgrading bsi v2") + } else if err := frag.closeStorage(); err != nil { + return ok, errors.Wrap(err, "closing after bsi v2 upgrade") + } else if err := os.Rename(oldPath, newPath); err != nil { + return ok, errors.Wrap(err, "renaming after bsi v2 upgrade") + } else if err := frag.openStorage(); err != nil { + return ok, errors.Wrap(err, "re-opening after bsi v2 upgrade") + } + } + return ok, nil +} + // ViewInfo represents schema information for a view. type ViewInfo struct { Name string `json:"name"`