From 0a1de81441af1666294cfc345445528a71d62992 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Thu, 9 Jan 2020 10:47:09 -0600 Subject: [PATCH 01/11] allow field and index names up to 230 characters The lowest limitation I've seen on any filesystem we care about is 255 characters. 230 leaves enough space that an index or field could be backed up and have a timestamp and file extension appended while still allowing for much longer index and field names. --- docs/getting-started.md | 8 ++++---- docs/query-language.md | 2 +- field_test.go | 3 ++- pilosa.go | 4 ++-- pilosa_internal_test.go | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index a236d2156..982bf1ca1 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -100,7 +100,7 @@ curl localhost:10101/index/repository -X POST ``` response {"success":true} ``` -The index name must be 64 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. +The index name must be 230 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. Let's create the `stargazer` field which has user IDs of stargazers as its rows: ``` request @@ -325,7 +325,7 @@ Next, let's create the `repository` index: repository := schema.Index("repository") ``` -The index name must be 64 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. +The index name must be 230 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. Let's create the `stargazer` field which has user IDs of stargazers as its rows: ``` @@ -615,7 +615,7 @@ Next, let's create the `repository` index: ``` Index repository = schema.index("repository"); ``` -The index name must be 64 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. +The index name must be 230 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. Let's create the `stargazer` field which has user IDs of stargazers as its rows: ``` @@ -818,7 +818,7 @@ Next, let's create the `repository` index: ``` repository = schema.index("repository") ``` -The index name must be 64 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. +The index name must be 230 characters or fewer, start with a letter, and consist only of lowercase alphanumeric characters or `_-`. The same goes for field names. Let's create the `stargazer` field which has user IDs of stargazers as its rows: ``` diff --git a/docs/query-language.md b/docs/query-language.md index 4413d95d7..527cad445 100644 --- a/docs/query-language.md +++ b/docs/query-language.md @@ -43,7 +43,7 @@ curl localhost:10101/index/repository/query \ #### Arguments and Types -* `field` The field specifies on which Pilosa [field](../glossary/#field) the query will operate. Valid field names are lower case strings; they start with a lowercase letter, and contain only alphanumeric characters and `_-`. They must be 64 characters or less in length. +* `field` The field specifies on which Pilosa [field](../glossary/#field) the query will operate. Valid field names are lower case strings; they start with a lowercase letter, and contain only alphanumeric characters and `_-`. They must be 230 characters or less in length. * `TIMESTAMP` This is a timestamp in the following format `YYYY-MM-DDTHH:MM` (e.g. 2006-01-02T15:04). * `UINT` An unsigned integer (e.g. 42839). * `BOOL` A boolean value, `true` or `false`. diff --git a/field_test.go b/field_test.go index 398002ca2..40b64728a 100644 --- a/field_test.go +++ b/field_test.go @@ -158,6 +158,7 @@ func TestField_NameValidation(t *testing.T) { "under_score", "abc123", "trailing_", + "charact2301234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", } invalidFieldNames := []string{ "", @@ -168,7 +169,7 @@ func TestField_NameValidation(t *testing.T) { "abc def", "camelCase", "UPPERCASE", - "a12345678901234567890123456789012345678901234567890123456789012345", + "charact23112345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", } path, err := ioutil.TempDir("", "pilosa-field-") diff --git a/pilosa.go b/pilosa.go index 42ab3d3c1..61f3cde53 100644 --- a/pilosa.go +++ b/pilosa.go @@ -48,7 +48,7 @@ var ( ErrInvalidView = errors.New("invalid view") ErrInvalidCacheType = errors.New("invalid cache type") - ErrName = errors.New("invalid index or field name, must match [a-z][a-z0-9_-]* and contain at most 64 characters") + ErrName = errors.New("invalid index or field name, must match [a-z][a-z0-9_-]* and contain at most 230 characters") ErrLabel = errors.New("invalid row or column label, must match [A-Za-z0-9_-]") // ErrFragmentNotFound is returned when a fragment does not exist. @@ -118,7 +118,7 @@ func newNotFoundError(err error) NotFoundError { } // Regular expression to validate index and field names. -var nameRegexp = regexp.MustCompile(`^[a-z][a-z0-9_-]{0,63}$`) +var nameRegexp = regexp.MustCompile(`^[a-z][a-z0-9_-]{0,229}$`) // ColumnAttrSet represents a set of attributes for a vertical column in an index. // Can have a set of attributes attached to it. diff --git a/pilosa_internal_test.go b/pilosa_internal_test.go index 40e33ac4b..4abe89072 100644 --- a/pilosa_internal_test.go +++ b/pilosa_internal_test.go @@ -21,7 +21,7 @@ import ( func TestValidateName(t *testing.T) { names := []string{ "a", "ab", "ab1", "b-c", "d_e", "exists", - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "longbutnottoolongaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345689012345689012345678901234567890", } for _, name := range names { if validateName(name) != nil { @@ -33,7 +33,7 @@ func TestValidateName(t *testing.T) { func TestValidateNameInvalid(t *testing.T) { names := []string{ "", "'", "^", "/", "\\", "A", "*", "a:b", "valid?no", "yüce", "1", "_", "-", - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1", "_exists", + "long123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1", "_exists", } for _, name := range names { if validateName(name) == nil { From 1542cbefc0c235ea6692a711e576ce8f52d8815f Mon Sep 17 00:00:00 2001 From: Travis Date: Fri, 3 Jan 2020 14:39:26 -0600 Subject: [PATCH 02/11] Add FieldOption.ForeignIndex This allows a BSI field to have an option indicating that it is a foreign key to another index. If the foreign index has column keys, then this field handles string values by using the foreign index's translate store. --- api.go | 19 +++ api_test.go | 55 ++++++++ encoding/proto/proto.go | 22 ++-- executor.go | 105 ++++++++++++++-- executor_test.go | 64 ++++++++++ field.go | 22 ++++ go.mod | 2 +- go.sum | 2 + handler.go | 34 +++-- http/handler.go | 14 +++ index.go | 3 + internal/private.pb.go | 270 ++++++++++++++++++++++++---------------- internal/private.proto | 1 + server.go | 16 ++- 14 files changed, 484 insertions(+), 145 deletions(-) diff --git a/api.go b/api.go index af468914f..a3fdc3b93 100644 --- a/api.go +++ b/api.go @@ -1083,6 +1083,25 @@ func (api *API) ImportValue(ctx context.Context, req *ImportValueRequest, opts . } req.Shard = math.MaxUint64 } + + // Translate values when the field has a ForeignIndex with keys. + if fidx := field.Options().ForeignIndex; fidx != "" { + foreignIndex := api.holder.Index(fidx) + if foreignIndex == nil { + return errors.Errorf("foreign index does not exist: %s", fidx) + } + uints, err := foreignIndex.translateStore.TranslateKeys(req.StringValues) + if err != nil { + return errors.Wrap(err, "translating string values") + } + // Because the BSI field supports negative value, we have to + // convert the slice of uint64 keys to a slice of int64. + ints := make([]int64, len(uints)) + for i := range uints { + ints[i] = int64(uints[i]) + } + req.Values = ints + } } if !options.Presorted { diff --git a/api_test.go b/api_test.go index b6cfa8d07..7e94ebee1 100644 --- a/api_test.go +++ b/api_test.go @@ -536,6 +536,61 @@ func TestAPI_ImportValue(t *testing.T) { } }) + + t.Run("ValStringField", func(t *testing.T) { + ctx := context.Background() + index := "valstr" + field := "fstr" + + fgnIndex := "fgnvalstr" + + _, err := m0.API.CreateIndex(ctx, index, pilosa.IndexOptions{}) + if err != nil { + t.Fatalf("creating index: %v", err) + } + + _, err = m0.API.CreateIndex(ctx, fgnIndex, pilosa.IndexOptions{Keys: true}) + if err != nil { + t.Fatalf("creating foreign index: %v", err) + } + _, err = m0.API.CreateField(ctx, index, field, + pilosa.OptFieldTypeInt(0, math.MaxInt64), + pilosa.OptFieldForeignIndex(fgnIndex), + ) + if err != nil { + t.Fatalf("creating field: %v", err) + } + + // Generate some keyed records. + values := []string{} + colIDs := []uint64{} + for i := 0; i < 10; i++ { + value := fmt.Sprintf("strval-%d", (i)*100+10) + values = append(values, value) + colIDs = append(colIDs, uint64(i)) + } + + // Import data with keys to the coordinator (node0) and verify that it gets + // translated and forwarded to the owner of shard 0 (node1; because of offsetModHasher) + req := &pilosa.ImportValueRequest{ + Index: index, + Field: field, + ColumnIDs: colIDs, + StringValues: values, + } + if err := m0.API.ImportValue(ctx, req); err != nil { + t.Fatal(err) + } + + pql := fmt.Sprintf(`Row(%s=="strval-110")`, field) + + // Query node0. + if res, err := m0.API.Query(ctx, &pilosa.QueryRequest{Index: index, Query: pql}); err != nil { + t.Fatal(err) + } else if ids := res.Results[0].(*pilosa.Row).Columns(); !reflect.DeepEqual(ids, []uint64{1}) { + t.Fatalf("unexpected columns: %+v", ids) + } + }) } // offsetModHasher represents a simple, mod-based hashing offset by 1. diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index c1644ed58..a1352990b 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -567,16 +567,17 @@ func encodeFieldOptions(o *pilosa.FieldOptions) *internal.FieldOptions { return nil } return &internal.FieldOptions{ - Type: o.Type, - CacheType: o.CacheType, - CacheSize: o.CacheSize, - Min: o.Min, - Max: o.Max, - Base: o.Base, - Scale: o.Scale, - BitDepth: uint64(o.BitDepth), - TimeQuantum: string(o.TimeQuantum), - Keys: o.Keys, + Type: o.Type, + CacheType: o.CacheType, + CacheSize: o.CacheSize, + Min: o.Min, + Max: o.Max, + Base: o.Base, + Scale: o.Scale, + BitDepth: uint64(o.BitDepth), + TimeQuantum: string(o.TimeQuantum), + Keys: o.Keys, + ForeignIndex: o.ForeignIndex, } } @@ -848,6 +849,7 @@ func decodeFieldOptions(options *internal.FieldOptions, m *pilosa.FieldOptions) m.BitDepth = uint(options.BitDepth) m.TimeQuantum = pilosa.TimeQuantum(options.TimeQuantum) m.Keys = options.Keys + m.ForeignIndex = options.ForeignIndex } func decodeNodes(a []*internal.Node, m []*pilosa.Node) { diff --git a/executor.go b/executor.go index db53dad27..a17897793 100644 --- a/executor.go +++ b/executor.go @@ -3620,17 +3620,20 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { c.Args[rowKey] = rowID } } else if field.keys() { - if c.Args[rowKey] != nil && !isString(c.Args[rowKey]) { - // allow passing row id directly (this can come in handy, but make sure it is a valid row id) - if !isValidID(c.Args[rowKey]) { - return errors.Errorf("row value must be a string or non-negative integer, but got: %v of %[1]T", c.Args[rowKey]) + if err := e.translateRowKey(c, field.translateStore, rowKey); err != nil { + return errors.Wrap(err, "translating rowkey") + } + } else if field.Options().ForeignIndex != "" { + // Get the foreign index. + fidx := field.Options().ForeignIndex + foreignIndex := e.Holder.Index(fidx) + if foreignIndex == nil { + return errors.Errorf("foreign index does not exist: %s", fidx) + } + if foreignIndex.Keys() { + if err := e.translateRowKey(c, foreignIndex.translateStore, rowKey); err != nil { + return errors.Wrap(err, "translating rowkey") } - } else if value := callArgString(c, rowKey); value != "" { - id, err := field.translateStore.TranslateKey(value) - if err != nil { - return err - } - c.Args[rowKey] = id } } else { if isString(c.Args[rowKey]) { @@ -3662,6 +3665,42 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { return nil } +func (e *executor) translateRowKey(c *pql.Call, store TranslateStore, rowKey string) error { + if c.Args[rowKey] != nil && isCondition(c.Args[rowKey]) { + // In the case where a field has a foreign index with keys, + // allow `== "key"` or `!= "key"` to be used against the BSI + // field. + cond := c.Args[rowKey].(*pql.Condition) + if isString(cond.Value) { + switch cond.Op { + case pql.EQ, pql.NEQ: + id, err := store.TranslateKey(cond.Value.(string)) + if err != nil { + return errors.Wrap(err, "translating key") + } + c.Args[rowKey] = &pql.Condition{ + Op: cond.Op, + Value: id, + } + default: + return errors.Errorf("conditional is not supported with string predicates: %s", cond.Op) + } + } + } else if c.Args[rowKey] != nil && !isString(c.Args[rowKey]) { + // allow passing row id directly (this can come in handy, but make sure it is a valid row id) + if !isValidID(c.Args[rowKey]) { + return errors.Errorf("row value must be a string or non-negative integer, but got: %v of %[1]T", c.Args[rowKey]) + } + } else if value := callArgString(c, rowKey); value != "" { + id, err := store.TranslateKey(value) + if err != nil { + return errors.Wrap(err, "translating key") + } + c.Args[rowKey] = id + } + return nil +} + func (e *executor) translateGroupByCall(index string, idx *Index, c *pql.Call) error { if c.Name != "GroupBy" { panic("translateGroupByCall called with '" + c.Name + "'") @@ -3767,6 +3806,47 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res return other, nil } + // TODO: instead of supporting SignedRow here, we may be able to + // make the return type for an int field with a ForeignIndex be + // a *Row instead (because it should always be positive). + case SignedRow: + var store TranslateStore + + if fieldName := callArgString(call, "field"); fieldName != "" { + field := idx.Field(fieldName) + if field != nil { + // Get the foreign index. + if fidx := field.Options().ForeignIndex; fidx != "" { + foreignIndex := e.Holder.Index(fidx) + if foreignIndex == nil { + return nil, errors.Errorf("foreign index does not exist: %s", fidx) + } + store = foreignIndex.translateStore + } + } + } + + // In the case where a field/foreignIndex doesn't exist, + // fall back to using the index translateStore. + if store == nil && idx.Keys() { + store = idx.translateStore + } + + if store != nil { + rslt := result.Pos + other := &Row{Attrs: rslt.Attrs} + for _, segment := range rslt.Segments() { + for _, col := range segment.Columns() { + key, err := store.TranslateID(col) + if err != nil { + return nil, err + } + other.Keys = append(other.Keys, key) + } + } + return SignedRow{Pos: other}, nil + } + case PairField: if fieldName := callArgString(call, "field"); fieldName != "" { field := idx.Field(fieldName) @@ -4066,6 +4146,11 @@ func isString(v interface{}) bool { return ok } +func isCondition(v interface{}) bool { + _, ok := v.(*pql.Condition) + return ok +} + // isValidID returns whether v can be interpreted as a valid row or // column ID. In short, is v a non-negative integer? I think the int64 // and default cases are the only ones actually used since the PQL diff --git a/executor_test.go b/executor_test.go index ec8865c8a..9af38856f 100644 --- a/executor_test.go +++ b/executor_test.go @@ -3854,6 +3854,70 @@ func TestExecutor_Execute_Rows_Keys(t *testing.T) { } +func TestExecutor_ForeignIndex(t *testing.T) { + c := test.MustRunCluster(t, 1) + defer c.Close() + + c.CreateField(t, "parent", pilosa.IndexOptions{Keys: true}, "general") + c.CreateField(t, "child", pilosa.IndexOptions{}, "parent_id", + pilosa.OptFieldTypeInt(0, math.MaxInt64), + pilosa.OptFieldForeignIndex("parent"), + ) + c.CreateField(t, "child", pilosa.IndexOptions{}, "color", + pilosa.OptFieldKeys(), + ) + + // Populate parent data. + c.Query(t, "parent", ` + Set("one", general=1) + Set("two", general=1) + Set("three", general=1) + + Set("twenty-one", general=2) + Set("twenty-two", general=2) + Set("twenty-three", general=2) + + Set("one", general=3) + Set("twenty-one", general=3) + `) + + // Populate child data. + c.Query(t, "child", ` + Set(1, parent_id="one") + Set(2, parent_id="two") + Set(3, parent_id="one") + Set(4, parent_id="twenty-one") + `) + + // Populate color data. + c.Query(t, "child", ` + Set(1, color="red") + Set(2, color="blue") + Set(3, color="blue") + Set(4, color="red") + `) + + distinct := c.Query(t, "child", `Distinct(index="child", field="parent_id")`).Results[0].(pilosa.SignedRow) + if !reflect.DeepEqual(distinct.Pos.Keys, []string{"one", "two", "twenty-one"}) { + t.Fatalf("unexpected keys: %v", distinct.Pos.Keys) + } + + eq := c.Query(t, "child", `Row(parent_id=="one")`).Results[0].(*pilosa.Row) + if !reflect.DeepEqual(eq.Columns(), []uint64{1, 3}) { + t.Fatalf("unexpected columns: %v", eq.Columns()) + } + + neq := c.Query(t, "child", `Row(parent_id!="one")`).Results[0].(*pilosa.Row) + if !reflect.DeepEqual(neq.Columns(), []uint64{2, 4}) { + t.Fatalf("unexpected columns: %v", neq.Columns()) + } + + join := c.Query(t, "parent", `Intersect(Row(general=3), Distinct(Row(color="blue"), index="child", field="parent_id"))`).Results[0].(*pilosa.Row) + if !reflect.DeepEqual(join.Keys, []string{"one"}) { + t.Fatalf("unexpected keys: %v", join.Keys) + } +} + func TestExecutor_Execute_GroupBy(t *testing.T) { groupByTest := func(t *testing.T, clusterSize int) { c := test.MustRunCluster(t, 1) diff --git a/field.go b/field.go index 86c5204a8..ffaacb39a 100644 --- a/field.go +++ b/field.go @@ -108,6 +108,17 @@ func OptFieldKeys() FieldOption { } } +// OptFieldForeignIndex marks this field as a foreign key to another +// index. That is, the values of this field should be interpreted as +// referencing records (Pilosa columns) in another index. TODO explain +// where/how this is used by Pilosa. +func OptFieldForeignIndex(index string) FieldOption { + return func(fo *FieldOptions) error { + fo.ForeignIndex = index + return nil + } +} + // OptFieldTypeDefault is a functional option on FieldOptions // used to set the field type and cache setting to the default values. func OptFieldTypeDefault() FieldOption { @@ -230,6 +241,11 @@ func OptFieldTypeBool() FieldOption { } // NewField returns a new instance of field. +// NOTE: This function is only used in tests, which is why +// it only takes a single `FieldOption` (the assumption being +// that it's of the type `OptFieldType*`). This means +// this function couldn't be used to set, for example, +// `FieldOptions.Keys`. func NewField(path, index, name string, opts FieldOption) (*Field, error) { err := validateName(name) if err != nil { @@ -594,6 +610,7 @@ func (f *Field) loadMeta() error { f.options.TimeQuantum = TimeQuantum(pb.TimeQuantum) f.options.Keys = pb.Keys f.options.NoStandardView = pb.NoStandardView + f.options.ForeignIndex = pb.ForeignIndex return nil } @@ -647,6 +664,7 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.BitDepth = 0 f.options.TimeQuantum = "" f.options.Keys = opt.Keys + f.options.ForeignIndex = "" case FieldTypeInt, FieldTypeDecimal: f.options.Type = opt.Type f.options.CacheType = CacheTypeNone @@ -658,6 +676,7 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.BitDepth = opt.BitDepth f.options.TimeQuantum = "" f.options.Keys = opt.Keys + f.options.ForeignIndex = opt.ForeignIndex // Create new bsiGroup. bsig := &bsiGroup{ @@ -691,6 +710,7 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.Close() return errors.Wrap(err, "setting time quantum") } + f.options.ForeignIndex = "" case FieldTypeBool: f.options.Type = FieldTypeBool f.options.CacheType = CacheTypeNone @@ -701,6 +721,7 @@ func (f *Field) applyOptions(opt FieldOptions) error { f.options.BitDepth = 0 f.options.TimeQuantum = "" f.options.Keys = false + f.options.ForeignIndex = "" default: return errors.New("invalid field type") } @@ -1580,6 +1601,7 @@ type FieldOptions struct { CacheType string `json:"cacheType,omitempty"` Type string `json:"type,omitempty"` TimeQuantum TimeQuantum `json:"timeQuantum,omitempty"` + ForeignIndex string `json:"foreignIndex"` } // applyDefaultOptions returns a new FieldOptions object diff --git a/go.mod b/go.mod index 9366e18cd..97c1a420d 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/gorilla/mux v1.7.0 github.com/hashicorp/memberlist v0.1.3 github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/molecula/ext v0.0.0-20191202195653-240f38a75171 + github.com/molecula/ext v0.0.0-20200103203257-8a458a73e8c2 github.com/molecula/extensions v0.0.0-20191218165536-562244600fd4 github.com/opentracing/opentracing-go v1.1.0 github.com/pelletier/go-toml v1.2.0 diff --git a/go.sum b/go.sum index 1b1b7af2f..cc8233904 100644 --- a/go.sum +++ b/go.sum @@ -91,6 +91,8 @@ github.com/molecula/apophenia v0.0.0-20190827192002-68b7a14a478b h1:cZADDaNYM7xn github.com/molecula/apophenia v0.0.0-20190827192002-68b7a14a478b/go.mod h1:uXd1BiH7xLmgkhVmspdJLENv6uGWrTL/MQX2TN7Yz9s= github.com/molecula/ext v0.0.0-20191202195653-240f38a75171 h1:4VK7u/RM+54Yaz8aRB9vIaDSnbKi3M0NQYg5tsZvOT4= github.com/molecula/ext v0.0.0-20191202195653-240f38a75171/go.mod h1:r6EIj0GH8dx5xxFLW6Voi1/mX3wXOUkJu6AoEE/xvGQ= +github.com/molecula/ext v0.0.0-20200103203257-8a458a73e8c2 h1:XOImsA5XhGklFj8Y0TxSm1qWZzEwYxom2JOXiu9GMq0= +github.com/molecula/ext v0.0.0-20200103203257-8a458a73e8c2/go.mod h1:r6EIj0GH8dx5xxFLW6Voi1/mX3wXOUkJu6AoEE/xvGQ= github.com/molecula/extensions v0.0.0-20191218165536-562244600fd4 h1:mDB/dicofRVFuRYcCVPk+JBiVKXlfbzMahuqHvrYqu4= github.com/molecula/extensions v0.0.0-20191218165536-562244600fd4/go.mod h1:QQgN5OFjuBAi4Q2UYVMzfvi4k9yvg/qqC+MNFB4I9JI= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= diff --git a/handler.go b/handler.go index 19fcbac44..cc3625c1a 100644 --- a/handler.go +++ b/handler.go @@ -116,11 +116,12 @@ type ImportValueRequest struct { Field string // if Shard is MaxUint64 (an impossible shard value), this // indicates that the column IDs may come from multiple shards. - Shard uint64 - ColumnIDs []uint64 - ColumnKeys []string - Values []int64 - FloatValues []float64 + Shard uint64 + ColumnIDs []uint64 + ColumnKeys []string + Values []int64 + FloatValues []float64 + StringValues []string } func (ivr *ImportValueRequest) Len() int { return len(ivr.ColumnIDs) } @@ -134,15 +135,26 @@ func (ivr *ImportValueRequest) Swap(i, j int) { } } -func (i *ImportValueRequest) Validate() error { - if i.Index == "" || i.Field == "" { - return errors.Errorf("index and field required, but got '%s' and '%s'", i.Index, i.Field) +// Validate ensures that the payload of the request is valid. +func (ivr *ImportValueRequest) Validate() error { + if ivr.Index == "" || ivr.Field == "" { + return errors.Errorf("index and field required, but got '%s' and '%s'", ivr.Index, ivr.Field) } - if len(i.ColumnIDs) != 0 && len(i.ColumnKeys) != 0 { + if len(ivr.ColumnIDs) != 0 && len(ivr.ColumnKeys) != 0 { return errors.Errorf("must pass either column ids or keys, but not both") } - if len(i.Values) != 0 && len(i.FloatValues) != 0 { - return errors.Errorf("must pass ints or floats but not both") + var valueSetCount int + if len(ivr.Values) != 0 { + valueSetCount++ + } + if len(ivr.FloatValues) != 0 { + valueSetCount++ + } + if len(ivr.StringValues) != 0 { + valueSetCount++ + } + if valueSetCount > 1 { + return errors.Errorf("must pass ints, floats, or strings but not multiple") } return nil } diff --git a/http/handler.go b/http/handler.go index ba7877222..1ea09cd09 100644 --- a/http/handler.go +++ b/http/handler.go @@ -807,6 +807,9 @@ func (h *Handler) handlePostField(w http.ResponseWriter, r *http.Request) { fos = append(fos, pilosa.OptFieldKeys()) } } + if req.Options.ForeignIndex != nil { + fos = append(fos, pilosa.OptFieldForeignIndex(*req.Options.ForeignIndex)) + } _, err = h.api.CreateField(r.Context(), indexName, fieldName, fos...) if _, ok := err.(pilosa.BadRequestError); ok { @@ -832,6 +835,7 @@ type fieldOptions struct { TimeQuantum *pilosa.TimeQuantum `json:"timeQuantum,omitempty"` Keys *bool `json:"keys,omitempty"` NoStandardView bool `json:"noStandardView,omitempty"` + ForeignIndex *string `json:"foreignIndex,omitempty"` } func (o *fieldOptions) validate() error { @@ -859,6 +863,8 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("max does not apply to field type set")) } else if o.TimeQuantum != nil { return pilosa.NewBadRequestError(errors.New("timeQuantum does not apply to field type set")) + } else if o.ForeignIndex != nil { + return pilosa.NewBadRequestError(errors.New("set field cannot be a foreign key")) } case pilosa.FieldTypeInt, pilosa.FieldTypeDecimal: if o.CacheType != nil { @@ -867,6 +873,8 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("cacheSize does not apply to field type int")) } else if o.TimeQuantum != nil { return pilosa.NewBadRequestError(errors.New("timeQuantum does not apply to field type int")) + } else if o.ForeignIndex != nil && o.Type == pilosa.FieldTypeDecimal { + return pilosa.NewBadRequestError(errors.New("decimal field cannot be a foreign key")) } case pilosa.FieldTypeTime: if o.CacheType != nil { @@ -879,6 +887,8 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("max does not apply to field type time")) } else if o.TimeQuantum == nil { return pilosa.NewBadRequestError(errors.New("timeQuantum is required for field type time")) + } else if o.ForeignIndex != nil { + return pilosa.NewBadRequestError(errors.New("time field cannot be a foreign key")) } case pilosa.FieldTypeMutex: if o.CacheType == nil { @@ -893,6 +903,8 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("max does not apply to field type mutex")) } else if o.TimeQuantum != nil { return pilosa.NewBadRequestError(errors.New("timeQuantum does not apply to field type mutex")) + } else if o.ForeignIndex != nil { + return pilosa.NewBadRequestError(errors.New("mutex field cannot be a foreign key")) } case pilosa.FieldTypeBool: if o.CacheType != nil { @@ -907,6 +919,8 @@ func (o *fieldOptions) validate() error { return pilosa.NewBadRequestError(errors.New("timeQuantum does not apply to field type bool")) } else if o.Keys != nil { return pilosa.NewBadRequestError(errors.New("keys does not apply to field type bool")) + } else if o.ForeignIndex != nil { + return pilosa.NewBadRequestError(errors.New("bool field cannot be a foreign key")) } default: return errors.Errorf("invalid field type: %s", o.Type) diff --git a/index.go b/index.go index c96e3bd5f..a6a9e3070 100644 --- a/index.go +++ b/index.go @@ -432,6 +432,9 @@ func (i *Index) createField(name string, opt FieldOptions) (*Field, error) { } // Apply field options. + // This is already happening in f.Open() just before this, but in + // that case, the options being applied are those read from the meta + // file on disk. if err := f.applyOptions(opt); err != nil { f.Close() return nil, errors.Wrap(err, "applying options") diff --git a/internal/private.pb.go b/internal/private.pb.go index d42e410cf..f64f9b5b7 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -32,7 +32,7 @@ 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_e6d12fddb5948a73, []int{0} + return fileDescriptor_private_54a82f4803638cdd, []int{0} } func (m *IndexMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,6 +87,7 @@ type FieldOptions struct { Base int64 `protobuf:"varint,13,opt,name=Base,proto3" json:"Base,omitempty"` BitDepth uint64 `protobuf:"varint,14,opt,name=BitDepth,proto3" json:"BitDepth,omitempty"` Scale int64 `protobuf:"varint,15,opt,name=Scale,proto3" json:"Scale,omitempty"` + ForeignIndex string `protobuf:"bytes,16,opt,name=ForeignIndex,proto3" json:"ForeignIndex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -96,7 +97,7 @@ 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_e6d12fddb5948a73, []int{1} + return fileDescriptor_private_54a82f4803638cdd, []int{1} } func (m *FieldOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -202,6 +203,13 @@ func (m *FieldOptions) GetScale() int64 { return 0 } +func (m *FieldOptions) GetForeignIndex() string { + if m != nil { + return m.ForeignIndex + } + return "" +} + type ImportResponse struct { Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -213,7 +221,7 @@ 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_e6d12fddb5948a73, []int{2} + return fileDescriptor_private_54a82f4803638cdd, []int{2} } func (m *ImportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -264,7 +272,7 @@ 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_e6d12fddb5948a73, []int{3} + return fileDescriptor_private_54a82f4803638cdd, []int{3} } func (m *BlockDataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -340,7 +348,7 @@ 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_e6d12fddb5948a73, []int{4} + return fileDescriptor_private_54a82f4803638cdd, []int{4} } func (m *BlockDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,7 +402,7 @@ 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_e6d12fddb5948a73, []int{5} + return fileDescriptor_private_54a82f4803638cdd, []int{5} } func (m *Cache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +449,7 @@ 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_e6d12fddb5948a73, []int{6} + return fileDescriptor_private_54a82f4803638cdd, []int{6} } func (m *MaxShards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +498,7 @@ 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_e6d12fddb5948a73, []int{7} + return fileDescriptor_private_54a82f4803638cdd, []int{7} } func (m *CreateShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,7 +559,7 @@ 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_e6d12fddb5948a73, []int{8} + return fileDescriptor_private_54a82f4803638cdd, []int{8} } func (m *DeleteIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -599,7 +607,7 @@ 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_e6d12fddb5948a73, []int{9} + return fileDescriptor_private_54a82f4803638cdd, []int{9} } func (m *CreateIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -655,7 +663,7 @@ 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_e6d12fddb5948a73, []int{10} + return fileDescriptor_private_54a82f4803638cdd, []int{10} } func (m *CreateFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -717,7 +725,7 @@ 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_e6d12fddb5948a73, []int{11} + return fileDescriptor_private_54a82f4803638cdd, []int{11} } func (m *DeleteFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -773,7 +781,7 @@ func (m *DeleteAvailableShardMessage) Reset() { *m = DeleteAvailableShar func (m *DeleteAvailableShardMessage) String() string { return proto.CompactTextString(m) } func (*DeleteAvailableShardMessage) ProtoMessage() {} func (*DeleteAvailableShardMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_e6d12fddb5948a73, []int{12} + return fileDescriptor_private_54a82f4803638cdd, []int{12} } func (m *DeleteAvailableShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +844,7 @@ 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_e6d12fddb5948a73, []int{13} + return fileDescriptor_private_54a82f4803638cdd, []int{13} } func (m *Field) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -897,7 +905,7 @@ 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_e6d12fddb5948a73, []int{14} + return fileDescriptor_private_54a82f4803638cdd, []int{14} } func (m *Schema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -945,7 +953,7 @@ 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_e6d12fddb5948a73, []int{15} + return fileDescriptor_private_54a82f4803638cdd, []int{15} } func (m *Index) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1001,7 +1009,7 @@ 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_e6d12fddb5948a73, []int{16} + return fileDescriptor_private_54a82f4803638cdd, []int{16} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1065,7 +1073,7 @@ 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_e6d12fddb5948a73, []int{17} + return fileDescriptor_private_54a82f4803638cdd, []int{17} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1134,7 +1142,7 @@ 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_e6d12fddb5948a73, []int{18} + return fileDescriptor_private_54a82f4803638cdd, []int{18} } func (m *NodeStateMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1189,7 +1197,7 @@ 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_e6d12fddb5948a73, []int{19} + return fileDescriptor_private_54a82f4803638cdd, []int{19} } func (m *NodeEventMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1245,7 +1253,7 @@ 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_e6d12fddb5948a73, []int{20} + return fileDescriptor_private_54a82f4803638cdd, []int{20} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1307,7 +1315,7 @@ 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_e6d12fddb5948a73, []int{21} + return fileDescriptor_private_54a82f4803638cdd, []int{21} } func (m *IndexStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1362,7 +1370,7 @@ 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_e6d12fddb5948a73, []int{22} + return fileDescriptor_private_54a82f4803638cdd, []int{22} } func (m *FieldStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1418,7 +1426,7 @@ 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_e6d12fddb5948a73, []int{23} + return fileDescriptor_private_54a82f4803638cdd, []int{23} } func (m *ClusterStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1482,7 +1490,7 @@ 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_e6d12fddb5948a73, []int{24} + return fileDescriptor_private_54a82f4803638cdd, []int{24} } func (m *BSIGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1552,7 +1560,7 @@ 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_e6d12fddb5948a73, []int{25} + return fileDescriptor_private_54a82f4803638cdd, []int{25} } func (m *CreateViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1615,7 +1623,7 @@ 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_e6d12fddb5948a73, []int{26} + return fileDescriptor_private_54a82f4803638cdd, []int{26} } func (m *DeleteViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1681,7 +1689,7 @@ 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_e6d12fddb5948a73, []int{27} + return fileDescriptor_private_54a82f4803638cdd, []int{27} } func (m *ResizeInstruction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1767,7 +1775,7 @@ 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_e6d12fddb5948a73, []int{28} + return fileDescriptor_private_54a82f4803638cdd, []int{28} } func (m *ResizeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1844,7 +1852,7 @@ func (m *ResizeInstructionComplete) Reset() { *m = ResizeInstructionComp func (m *ResizeInstructionComplete) String() string { return proto.CompactTextString(m) } func (*ResizeInstructionComplete) ProtoMessage() {} func (*ResizeInstructionComplete) Descriptor() ([]byte, []int) { - return fileDescriptor_private_e6d12fddb5948a73, []int{29} + return fileDescriptor_private_54a82f4803638cdd, []int{29} } func (m *ResizeInstructionComplete) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1905,7 +1913,7 @@ 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_e6d12fddb5948a73, []int{30} + return fileDescriptor_private_54a82f4803638cdd, []int{30} } func (m *SetCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1952,7 +1960,7 @@ func (m *UpdateCoordinatorMessage) Reset() { *m = UpdateCoordinatorMessa func (m *UpdateCoordinatorMessage) String() string { return proto.CompactTextString(m) } func (*UpdateCoordinatorMessage) ProtoMessage() {} func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_e6d12fddb5948a73, []int{31} + return fileDescriptor_private_54a82f4803638cdd, []int{31} } func (m *UpdateCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2000,7 +2008,7 @@ 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_e6d12fddb5948a73, []int{32} + return fileDescriptor_private_54a82f4803638cdd, []int{32} } func (m *Topology) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2053,7 +2061,7 @@ 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_e6d12fddb5948a73, []int{33} + return fileDescriptor_private_54a82f4803638cdd, []int{33} } func (m *RecalculateCaches) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2243,6 +2251,14 @@ func (m *FieldOptions) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Scale)) } + if len(m.ForeignIndex) > 0 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ForeignIndex))) + i += copy(dAtA[i:], m.ForeignIndex) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -3625,6 +3641,10 @@ func (m *FieldOptions) Size() (n int) { if m.Scale != 0 { n += 1 + sovPrivate(uint64(m.Scale)) } + l = len(m.ForeignIndex) + if l > 0 { + n += 2 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -4725,6 +4745,35 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { break } } + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForeignIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForeignIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -8982,82 +9031,83 @@ var ( ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("private.proto", fileDescriptor_private_e6d12fddb5948a73) } +func init() { proto.RegisterFile("private.proto", fileDescriptor_private_54a82f4803638cdd) } -var fileDescriptor_private_e6d12fddb5948a73 = []byte{ - // 1174 bytes of a gzipped FileDescriptorProto +var fileDescriptor_private_54a82f4803638cdd = []byte{ + // 1192 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, 0x71, 0x0e, 0xdb, 0x36, 0x6c, 0x0b, 0x0a, 0x66, 0x54, 0x51, - 0x53, 0x89, 0x50, 0xb5, 0x5c, 0x70, 0xaa, 0x54, 0x1c, 0x87, 0xb2, 0x94, 0x84, 0x32, 0x4e, 0x72, - 0xc7, 0xc5, 0xc4, 0x1e, 0x35, 0xab, 0xac, 0x77, 0xcc, 0xee, 0x6c, 0x12, 0xf7, 0x82, 0x5b, 0x90, - 0x78, 0x01, 0x9e,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0x13, 0xaf, 0x93, 0x77, 0xde, - 0x6c, 0xcb, 0x6a, 0xa9, 0xa5, 0xf9, 0x34, 0x9f, 0x8c, 0x8f, 0xcb, 0xc9, 0xd0, 0x2d, 0xbd, 0x33, - 0x33, 0x19, 0xda, 0x6b, 0x39, 0x1f, 0x2f, 0xa1, 0x59, 0xe1, 0xcf, 0x9d, 0x92, 0x8f, 0x8a, 0x29, - 0xb1, 0x67, 0x21, 0x91, 0x6f, 0x20, 0xf3, 0x59, 0x79, 0x01, 0xcd, 0x0a, 0x7b, 0x2e, 0x62, 0x07, - 0x56, 0xa6, 0xf7, 0x30, 0xbf, 0xef, 0xb3, 0x6c, 0x12, 0x42, 0x6b, 0x2b, 0xca, 0x52, 0xc9, 0x13, - 0x03, 0xa7, 0x7e, 0x14, 0x34, 0xa3, 0x68, 0x5e, 0xc9, 0x98, 0xdf, 0x3f, 0xef, 0x3e, 0x2c, 0xa8, - 0x32, 0xea, 0x75, 0xba, 0x58, 0x63, 0x2d, 0x24, 0x07, 0x50, 0xef, 0xf6, 0x83, 0xe7, 0x89, 0xc8, - 0xc6, 0x73, 0x83, 0xce, 0xbf, 0x0c, 0xec, 0x8b, 0x5f, 0x06, 0xce, 0x85, 0x2f, 0x03, 0xb7, 0xf8, - 0x32, 0x20, 0x7d, 0x58, 0xd3, 0xa7, 0x52, 0x6d, 0xf1, 0x4d, 0x0e, 0x4e, 0xfe, 0x43, 0xea, 0x54, - 0x7e, 0x48, 0xfb, 0xb0, 0xa6, 0xef, 0xd9, 0xff, 0x09, 0xfa, 0xc6, 0x86, 0x35, 0xca, 0xd3, 0xf0, - 0x35, 0x0f, 0xe2, 0x54, 0x26, 0xd9, 0x40, 0xdd, 0x24, 0x65, 0xff, 0xad, 0x38, 0x34, 0xd5, 0x76, - 0xa8, 0x26, 0xae, 0x33, 0xe9, 0xde, 0x23, 0x68, 0xce, 0xee, 0xec, 0x45, 0xd5, 0xaa, 0x8a, 0xf7, - 0x08, 0x16, 0xfb, 0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0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x70, - 0x9a, 0xfe, 0xda, 0x0c, 0x00, 0x00, + 0x18, 0x66, 0x0f, 0x71, 0xec, 0xdf, 0x71, 0xe2, 0x6c, 0xdb, 0xb0, 0x2d, 0x28, 0x98, 0x51, 0x45, + 0x4d, 0x25, 0x42, 0xd5, 0x72, 0xc1, 0xa9, 0x52, 0x71, 0x9c, 0x96, 0xa5, 0x24, 0x94, 0x71, 0x92, + 0x3b, 0x2e, 0x26, 0xf6, 0x28, 0x59, 0x65, 0xbd, 0x63, 0x76, 0xc7, 0x49, 0xdc, 0x0b, 0x6e, 0x41, + 0xe2, 0x05, 0x78, 0x02, 0x9e, 0x05, 0x71, 0xc5, 0x23, 0xa0, 0xf0, 0x22, 0x68, 0xfe, 0x99, 0x3d, + 0xd8, 0x71, 0x48, 0x14, 0x7a, 0x37, 0xff, 0xf9, 0xf0, 0xfd, 0xff, 0xec, 0x2c, 0x34, 0x46, 0x49, + 0x78, 0xc2, 0x24, 0xdf, 0x18, 0x25, 0x42, 0x0a, 0xaf, 0x1a, 0xc6, 0x92, 0x27, 0x31, 0x8b, 0xc8, + 0x0b, 0xa8, 0x05, 0xf1, 0x80, 0x9f, 0x6d, 0x73, 0xc9, 0x3c, 0x0f, 0xdc, 0x97, 0x7c, 0x92, 0xfa, + 0x4e, 0xcb, 0x6a, 0x57, 0x29, 0x9e, 0xbd, 0x0f, 0x60, 0x79, 0x37, 0x61, 0xfd, 0xe3, 0xad, 0xb3, + 0x30, 0x95, 0x3c, 0xee, 0x73, 0xdf, 0x45, 0xe9, 0x0c, 0x97, 0xfc, 0x69, 0xc3, 0xd2, 0xf3, 0x90, + 0x47, 0x83, 0xef, 0x46, 0x32, 0x14, 0x71, 0xea, 0xbd, 0x0b, 0xb5, 0x4d, 0xd6, 0x3f, 0xe2, 0xbb, + 0x93, 0x11, 0x47, 0x8f, 0x35, 0x5a, 0x30, 0x72, 0x69, 0x2f, 0x7c, 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9, 0x71, 0x59, 0x02, 0x2c, 0x9b, 0xbc, 0x16, 0x38, 0x3b, 0xfc, + 0xf4, 0x92, 0xf2, 0x95, 0x88, 0x7c, 0x09, 0xfe, 0xde, 0x68, 0xc0, 0x24, 0xbf, 0x91, 0x75, 0x07, + 0xaa, 0xbb, 0x62, 0x24, 0x22, 0x71, 0x38, 0xb9, 0xe2, 0x06, 0xf0, 0x61, 0x51, 0xdf, 0xe5, 0xfa, + 0x4a, 0xa9, 0xd1, 0x8c, 0x24, 0xb7, 0xd4, 0x70, 0xf7, 0x59, 0xd4, 0x1f, 0x47, 0x2a, 0x0d, 0xf5, + 0x76, 0x4c, 0x3b, 0xcd, 0x3f, 0xce, 0xd7, 0xad, 0xbf, 0xce, 0xd7, 0xad, 0xbf, 0xcf, 0xd7, 0xad, + 0xdf, 0xfe, 0x59, 0x7f, 0xeb, 0xa0, 0x82, 0x7f, 0x3b, 0x4f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, + 0xf4, 0x25, 0x10, 0xc0, 0xfe, 0x0c, 0x00, 0x00, } diff --git a/internal/private.proto b/internal/private.proto index d36527f63..381fe5adb 100644 --- a/internal/private.proto +++ b/internal/private.proto @@ -19,6 +19,7 @@ message FieldOptions { int64 Base = 13; uint64 BitDepth = 14; int64 Scale = 15; + string ForeignIndex = 16; } message ImportResponse { diff --git a/server.go b/server.go index 96a4d5cde..d253fab4d 100644 --- a/server.go +++ b/server.go @@ -380,7 +380,7 @@ func NewServer(opts ...ServerOption) (*Server, error) { s.cluster.broadcaster = s s.cluster.maxWritesPerRequest = s.maxWritesPerRequest s.holder.broadcaster = s - err = s.loadExtensions() + err = s.loadAllExtensions() if err != nil { s.logger.Printf("not all plugins loaded successfully") } @@ -417,8 +417,18 @@ func (s *Server) InternalClient() InternalClient { return s.defaultClient } -func (s *Server) loadExtensions() error { - exts := ext.NewExtensions() +// loadNewExtensions loads extensions that have been +// registered since the last call to loadNewExtensions. +func (s *Server) loadNewExtensions() error { + return s.loadExtensions(ext.NewExtensions()) +} + +// loadAllExtensions loads all extensions. +func (s *Server) loadAllExtensions() error { + return s.loadExtensions(ext.AllExtensions()) +} + +func (s *Server) loadExtensions(exts []*ext.ExtensionInfo) error { var lastError error for _, extension := range exts { if err := s.loadExtension(extension); err != nil { From b22d0143e4b5b40c4beb5462d612cf6af4de0660 Mon Sep 17 00:00:00 2001 From: Travis Date: Fri, 3 Jan 2020 15:06:44 -0600 Subject: [PATCH 03/11] loadNewExtensions is unused, but included for completeness --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index d253fab4d..af5dd7b32 100644 --- a/server.go +++ b/server.go @@ -419,7 +419,7 @@ func (s *Server) InternalClient() InternalClient { // loadNewExtensions loads extensions that have been // registered since the last call to loadNewExtensions. -func (s *Server) loadNewExtensions() error { +func (s *Server) loadNewExtensions() error { //nolint:unused return s.loadExtensions(ext.NewExtensions()) } From 132cf7cc1ced5089592a1cceeba8c88d713500f4 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Sat, 4 Jan 2020 08:22:07 -0600 Subject: [PATCH 04/11] add StringValues to proto ImportValueRequest, update proto versions I ran: brew upgrade protobuf GO111MODULE=off go get -u github.com/gogo/protobuf/protoc-gen-gofast I'm not sure if everything is still going to work, but I'm excited to find out! --- encoding/proto/proto.go | 16 +- internal/private.pb.go | 2866 +++++++++++++++++++++++---------------- internal/public.pb.go | 2616 ++++++++++++++++++++--------------- internal/public.proto | 1 + 4 files changed, 3258 insertions(+), 2241 deletions(-) diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index a1352990b..4c4e566ff 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -379,13 +379,14 @@ func encodeImportRequest(m *pilosa.ImportRequest) *internal.ImportRequest { func encodeImportValueRequest(m *pilosa.ImportValueRequest) *internal.ImportValueRequest { return &internal.ImportValueRequest{ - Index: m.Index, - Field: m.Field, - Shard: m.Shard, - ColumnIDs: m.ColumnIDs, - ColumnKeys: m.ColumnKeys, - Values: m.Values, - FloatValues: m.FloatValues, + Index: m.Index, + Field: m.Field, + Shard: m.Shard, + ColumnIDs: m.ColumnIDs, + ColumnKeys: m.ColumnKeys, + Values: m.Values, + FloatValues: m.FloatValues, + StringValues: m.StringValues, } } @@ -1027,6 +1028,7 @@ func decodeImportValueRequest(pb *internal.ImportValueRequest, m *pilosa.ImportV m.ColumnKeys = pb.ColumnKeys m.Values = pb.Values m.FloatValues = pb.FloatValues + m.StringValues = pb.StringValues } func decodeImportRoaringRequest(pb *internal.ImportRoaringRequest, m *pilosa.ImportRoaringRequest) { diff --git a/internal/private.pb.go b/internal/private.pb.go index f64f9b5b7..df22cdc09 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -3,11 +3,13 @@ package internal -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +20,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type IndexMeta struct { Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` @@ -32,7 +34,7 @@ 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_54a82f4803638cdd, []int{0} + return fileDescriptor_d2a91b51c7bdc125, []int{0} } func (m *IndexMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -42,15 +44,15 @@ func (m *IndexMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IndexMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_IndexMeta.Merge(m, src) } func (m *IndexMeta) XXX_Size() int { return m.Size() @@ -97,7 +99,7 @@ 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_54a82f4803638cdd, []int{1} + return fileDescriptor_d2a91b51c7bdc125, []int{1} } func (m *FieldOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,15 +109,15 @@ func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(m, src) } func (m *FieldOptions) XXX_Size() int { return m.Size() @@ -221,7 +223,7 @@ 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_54a82f4803638cdd, []int{2} + return fileDescriptor_d2a91b51c7bdc125, []int{2} } func (m *ImportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,15 +233,15 @@ func (m *ImportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ImportResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (dst *ImportResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportResponse.Merge(dst, src) +func (m *ImportResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportResponse.Merge(m, src) } func (m *ImportResponse) XXX_Size() int { return m.Size() @@ -272,7 +274,7 @@ 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_54a82f4803638cdd, []int{3} + return fileDescriptor_d2a91b51c7bdc125, []int{3} } func (m *BlockDataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -282,15 +284,15 @@ func (m *BlockDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_BlockDataRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_BlockDataRequest.Merge(m, src) } func (m *BlockDataRequest) XXX_Size() int { return m.Size() @@ -337,8 +339,8 @@ 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"` + RowIDs []uint64 `protobuf:"varint,1,rep,packed,name=RowIDs,proto3" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,2,rep,packed,name=ColumnIDs,proto3" json:"ColumnIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -348,7 +350,7 @@ 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_54a82f4803638cdd, []int{4} + return fileDescriptor_d2a91b51c7bdc125, []int{4} } func (m *BlockDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,15 +360,15 @@ func (m *BlockDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_BlockDataResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_BlockDataResponse.Merge(m, src) } func (m *BlockDataResponse) XXX_Size() int { return m.Size() @@ -392,7 +394,7 @@ func (m *BlockDataResponse) GetColumnIDs() []uint64 { } type Cache struct { - IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs" json:"IDs,omitempty"` + IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs,proto3" json:"IDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -402,7 +404,7 @@ 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_54a82f4803638cdd, []int{5} + return fileDescriptor_d2a91b51c7bdc125, []int{5} } func (m *Cache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,15 +414,15 @@ func (m *Cache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Cache.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Cache.Merge(m, src) } func (m *Cache) XXX_Size() int { return m.Size() @@ -439,7 +441,7 @@ 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"` + Standard map[string]uint64 `protobuf:"bytes,1,rep,name=Standard,proto3" 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:"-"` @@ -449,7 +451,7 @@ 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_54a82f4803638cdd, []int{6} + return fileDescriptor_d2a91b51c7bdc125, []int{6} } func (m *MaxShards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -459,15 +461,15 @@ func (m *MaxShards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_MaxShards.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_MaxShards.Merge(m, src) } func (m *MaxShards) XXX_Size() int { return m.Size() @@ -498,7 +500,7 @@ 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_54a82f4803638cdd, []int{7} + return fileDescriptor_d2a91b51c7bdc125, []int{7} } func (m *CreateShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -508,15 +510,15 @@ func (m *CreateShardMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateShardMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_CreateShardMessage.Merge(m, src) } func (m *CreateShardMessage) XXX_Size() int { return m.Size() @@ -559,7 +561,7 @@ 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_54a82f4803638cdd, []int{8} + return fileDescriptor_d2a91b51c7bdc125, []int{8} } func (m *DeleteIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -569,15 +571,15 @@ func (m *DeleteIndexMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_DeleteIndexMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_DeleteIndexMessage.Merge(m, src) } func (m *DeleteIndexMessage) XXX_Size() int { return m.Size() @@ -597,7 +599,7 @@ 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"` + Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -607,7 +609,7 @@ 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_54a82f4803638cdd, []int{9} + return fileDescriptor_d2a91b51c7bdc125, []int{9} } func (m *CreateIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -617,15 +619,15 @@ func (m *CreateIndexMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateIndexMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_CreateIndexMessage.Merge(m, src) } func (m *CreateIndexMessage) XXX_Size() int { return m.Size() @@ -653,7 +655,7 @@ 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"` + Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta,proto3" json:"Meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -663,7 +665,7 @@ 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_54a82f4803638cdd, []int{10} + return fileDescriptor_d2a91b51c7bdc125, []int{10} } func (m *CreateFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -673,15 +675,15 @@ func (m *CreateFieldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateFieldMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_CreateFieldMessage.Merge(m, src) } func (m *CreateFieldMessage) XXX_Size() int { return m.Size() @@ -725,7 +727,7 @@ 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_54a82f4803638cdd, []int{11} + return fileDescriptor_d2a91b51c7bdc125, []int{11} } func (m *DeleteFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -735,15 +737,15 @@ func (m *DeleteFieldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_DeleteFieldMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_DeleteFieldMessage.Merge(m, src) } func (m *DeleteFieldMessage) XXX_Size() int { return m.Size() @@ -781,7 +783,7 @@ func (m *DeleteAvailableShardMessage) Reset() { *m = DeleteAvailableShar func (m *DeleteAvailableShardMessage) String() string { return proto.CompactTextString(m) } func (*DeleteAvailableShardMessage) ProtoMessage() {} func (*DeleteAvailableShardMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_54a82f4803638cdd, []int{12} + return fileDescriptor_d2a91b51c7bdc125, []int{12} } func (m *DeleteAvailableShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -791,15 +793,15 @@ func (m *DeleteAvailableShardMessage) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_DeleteAvailableShardMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_DeleteAvailableShardMessage.Merge(m, src) } func (m *DeleteAvailableShardMessage) XXX_Size() int { return m.Size() @@ -833,8 +835,8 @@ 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"` + Meta *FieldOptions `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` + Views []string `protobuf:"bytes,3,rep,name=Views,proto3" json:"Views,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -844,7 +846,7 @@ 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_54a82f4803638cdd, []int{13} + return fileDescriptor_d2a91b51c7bdc125, []int{13} } func (m *Field) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -854,15 +856,15 @@ func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Field.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(m, src) } func (m *Field) XXX_Size() int { return m.Size() @@ -895,7 +897,7 @@ func (m *Field) GetViews() []string { } type Schema struct { - Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes" json:"Indexes,omitempty"` + Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes,proto3" json:"Indexes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -905,7 +907,7 @@ 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_54a82f4803638cdd, []int{14} + return fileDescriptor_d2a91b51c7bdc125, []int{14} } func (m *Schema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -915,15 +917,15 @@ func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Schema.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Schema.Merge(m, src) } func (m *Schema) XXX_Size() int { return m.Size() @@ -943,7 +945,7 @@ 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"` + Fields []*Field `protobuf:"bytes,4,rep,name=Fields,proto3" json:"Fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -953,7 +955,7 @@ 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_54a82f4803638cdd, []int{15} + return fileDescriptor_d2a91b51c7bdc125, []int{15} } func (m *Index) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -963,15 +965,15 @@ func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Index.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Index.Merge(m, src) } func (m *Index) XXX_Size() int { return m.Size() @@ -1009,7 +1011,7 @@ 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_54a82f4803638cdd, []int{16} + return fileDescriptor_d2a91b51c7bdc125, []int{16} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1019,15 +1021,15 @@ func (m *URI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_URI.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_URI.Merge(m, src) } func (m *URI) XXX_Size() int { return m.Size() @@ -1061,7 +1063,7 @@ 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"` + URI *URI `protobuf:"bytes,2,opt,name=URI,proto3" 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:"-"` @@ -1073,7 +1075,7 @@ 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_54a82f4803638cdd, []int{17} + return fileDescriptor_d2a91b51c7bdc125, []int{17} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1083,15 +1085,15 @@ func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Node.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(m, src) } func (m *Node) XXX_Size() int { return m.Size() @@ -1142,7 +1144,7 @@ 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_54a82f4803638cdd, []int{18} + return fileDescriptor_d2a91b51c7bdc125, []int{18} } func (m *NodeStateMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1152,15 +1154,15 @@ func (m *NodeStateMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_NodeStateMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_NodeStateMessage.Merge(m, src) } func (m *NodeStateMessage) XXX_Size() int { return m.Size() @@ -1187,7 +1189,7 @@ 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"` + Node *Node `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1197,7 +1199,7 @@ 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_54a82f4803638cdd, []int{19} + return fileDescriptor_d2a91b51c7bdc125, []int{19} } func (m *NodeEventMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1207,15 +1209,15 @@ func (m *NodeEventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_NodeEventMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_NodeEventMessage.Merge(m, src) } func (m *NodeEventMessage) XXX_Size() int { return m.Size() @@ -1241,9 +1243,9 @@ 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"` + Node *Node `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"` + Schema *Schema `protobuf:"bytes,3,opt,name=Schema,proto3" json:"Schema,omitempty"` + Indexes []*IndexStatus `protobuf:"bytes,4,rep,name=Indexes,proto3" json:"Indexes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1253,7 +1255,7 @@ 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_54a82f4803638cdd, []int{20} + return fileDescriptor_d2a91b51c7bdc125, []int{20} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1263,15 +1265,15 @@ func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_NodeStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_NodeStatus.Merge(m, src) } func (m *NodeStatus) XXX_Size() int { return m.Size() @@ -1305,7 +1307,7 @@ 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"` + Fields []*FieldStatus `protobuf:"bytes,2,rep,name=Fields,proto3" json:"Fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1315,7 +1317,7 @@ 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_54a82f4803638cdd, []int{21} + return fileDescriptor_d2a91b51c7bdc125, []int{21} } func (m *IndexStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1325,15 +1327,15 @@ func (m *IndexStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_IndexStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_IndexStatus.Merge(m, src) } func (m *IndexStatus) XXX_Size() int { return m.Size() @@ -1360,7 +1362,7 @@ 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"` + AvailableShards []uint64 `protobuf:"varint,2,rep,packed,name=AvailableShards,proto3" json:"AvailableShards,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1370,7 +1372,7 @@ 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_54a82f4803638cdd, []int{22} + return fileDescriptor_d2a91b51c7bdc125, []int{22} } func (m *FieldStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1380,15 +1382,15 @@ func (m *FieldStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_FieldStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_FieldStatus.Merge(m, src) } func (m *FieldStatus) XXX_Size() int { return m.Size() @@ -1416,7 +1418,7 @@ 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"` + Nodes []*Node `protobuf:"bytes,3,rep,name=Nodes,proto3" json:"Nodes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1426,7 +1428,7 @@ 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_54a82f4803638cdd, []int{23} + return fileDescriptor_d2a91b51c7bdc125, []int{23} } func (m *ClusterStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1436,15 +1438,15 @@ func (m *ClusterStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ClusterStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ClusterStatus.Merge(m, src) } func (m *ClusterStatus) XXX_Size() int { return m.Size() @@ -1490,7 +1492,7 @@ 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_54a82f4803638cdd, []int{24} + return fileDescriptor_d2a91b51c7bdc125, []int{24} } func (m *BSIGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1500,15 +1502,15 @@ func (m *BSIGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BSIGroup.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_BSIGroup.Merge(m, src) } func (m *BSIGroup) XXX_Size() int { return m.Size() @@ -1560,7 +1562,7 @@ 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_54a82f4803638cdd, []int{25} + return fileDescriptor_d2a91b51c7bdc125, []int{25} } func (m *CreateViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1570,15 +1572,15 @@ func (m *CreateViewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CreateViewMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_CreateViewMessage.Merge(m, src) } func (m *CreateViewMessage) XXX_Size() int { return m.Size() @@ -1623,7 +1625,7 @@ 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_54a82f4803638cdd, []int{26} + return fileDescriptor_d2a91b51c7bdc125, []int{26} } func (m *DeleteViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1633,15 +1635,15 @@ func (m *DeleteViewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_DeleteViewMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_DeleteViewMessage.Merge(m, src) } func (m *DeleteViewMessage) XXX_Size() int { return m.Size() @@ -1675,11 +1677,11 @@ 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"` + Node *Node `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"` + Coordinator *Node `protobuf:"bytes,3,opt,name=Coordinator,proto3" json:"Coordinator,omitempty"` + Sources []*ResizeSource `protobuf:"bytes,4,rep,name=Sources,proto3" json:"Sources,omitempty"` + NodeStatus *NodeStatus `protobuf:"bytes,7,opt,name=NodeStatus,proto3" json:"NodeStatus,omitempty"` + ClusterStatus *ClusterStatus `protobuf:"bytes,6,opt,name=ClusterStatus,proto3" json:"ClusterStatus,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1689,7 +1691,7 @@ 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_54a82f4803638cdd, []int{27} + return fileDescriptor_d2a91b51c7bdc125, []int{27} } func (m *ResizeInstruction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1699,15 +1701,15 @@ func (m *ResizeInstruction) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_ResizeInstruction.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ResizeInstruction.Merge(m, src) } func (m *ResizeInstruction) XXX_Size() int { return m.Size() @@ -1761,7 +1763,7 @@ func (m *ResizeInstruction) GetClusterStatus() *ClusterStatus { } type ResizeSource struct { - Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` + Node *Node `protobuf:"bytes,1,opt,name=Node,proto3" 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"` @@ -1775,7 +1777,7 @@ 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_54a82f4803638cdd, []int{28} + return fileDescriptor_d2a91b51c7bdc125, []int{28} } func (m *ResizeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1785,15 +1787,15 @@ func (m *ResizeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ResizeSource.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ResizeSource.Merge(m, src) } func (m *ResizeSource) XXX_Size() int { return m.Size() @@ -1841,7 +1843,7 @@ 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"` + Node *Node `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"` Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1852,7 +1854,7 @@ func (m *ResizeInstructionComplete) Reset() { *m = ResizeInstructionComp func (m *ResizeInstructionComplete) String() string { return proto.CompactTextString(m) } func (*ResizeInstructionComplete) ProtoMessage() {} func (*ResizeInstructionComplete) Descriptor() ([]byte, []int) { - return fileDescriptor_private_54a82f4803638cdd, []int{29} + return fileDescriptor_d2a91b51c7bdc125, []int{29} } func (m *ResizeInstructionComplete) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1862,15 +1864,15 @@ func (m *ResizeInstructionComplete) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_ResizeInstructionComplete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ResizeInstructionComplete.Merge(m, src) } func (m *ResizeInstructionComplete) XXX_Size() int { return m.Size() @@ -1903,7 +1905,7 @@ func (m *ResizeInstructionComplete) GetError() string { } type SetCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` + New *Node `protobuf:"bytes,1,opt,name=New,proto3" json:"New,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1913,7 +1915,7 @@ 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_54a82f4803638cdd, []int{30} + return fileDescriptor_d2a91b51c7bdc125, []int{30} } func (m *SetCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1923,15 +1925,15 @@ func (m *SetCoordinatorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_SetCoordinatorMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_SetCoordinatorMessage.Merge(m, src) } func (m *SetCoordinatorMessage) XXX_Size() int { return m.Size() @@ -1950,7 +1952,7 @@ func (m *SetCoordinatorMessage) GetNew() *Node { } type UpdateCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` + New *Node `protobuf:"bytes,1,opt,name=New,proto3" json:"New,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1960,7 +1962,7 @@ func (m *UpdateCoordinatorMessage) Reset() { *m = UpdateCoordinatorMessa func (m *UpdateCoordinatorMessage) String() string { return proto.CompactTextString(m) } func (*UpdateCoordinatorMessage) ProtoMessage() {} func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_private_54a82f4803638cdd, []int{31} + return fileDescriptor_d2a91b51c7bdc125, []int{31} } func (m *UpdateCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1970,15 +1972,15 @@ func (m *UpdateCoordinatorMessage) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_UpdateCoordinatorMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_UpdateCoordinatorMessage.Merge(m, src) } func (m *UpdateCoordinatorMessage) XXX_Size() int { return m.Size() @@ -1998,7 +2000,7 @@ 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"` + NodeIDs []string `protobuf:"bytes,2,rep,name=NodeIDs,proto3" json:"NodeIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2008,7 +2010,7 @@ 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_54a82f4803638cdd, []int{32} + return fileDescriptor_d2a91b51c7bdc125, []int{32} } func (m *Topology) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2018,15 +2020,15 @@ func (m *Topology) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Topology.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Topology.Merge(m, src) } func (m *Topology) XXX_Size() int { return m.Size() @@ -2061,7 +2063,7 @@ 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_54a82f4803638cdd, []int{33} + return fileDescriptor_d2a91b51c7bdc125, []int{33} } func (m *RecalculateCaches) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2071,15 +2073,15 @@ func (m *RecalculateCaches) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_RecalculateCaches.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_RecalculateCaches.Merge(m, src) } func (m *RecalculateCaches) XXX_Size() int { return m.Size() @@ -2127,10 +2129,92 @@ func init() { proto.RegisterType((*Topology)(nil), "internal.Topology") proto.RegisterType((*RecalculateCaches)(nil), "internal.RecalculateCaches") } + +func init() { proto.RegisterFile("private.proto", fileDescriptor_d2a91b51c7bdc125) } + +var fileDescriptor_d2a91b51c7bdc125 = []byte{ + // 1191 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, 0x71, 0xea, 0x4e, 0x0f, 0x6c, 0x0b, 0x0a, 0x66, 0x54, 0x51, + 0x53, 0x89, 0x50, 0xb5, 0x5c, 0x70, 0xaa, 0x54, 0x1c, 0xa7, 0x65, 0x29, 0x09, 0x65, 0x9c, 0xf6, + 0x8e, 0x8b, 0xa9, 0x3d, 0x6a, 0x56, 0x59, 0xef, 0x98, 0xdd, 0x71, 0x12, 0xf7, 0x82, 0x5b, 0x90, + 0x78, 0x01, 0x9e, 0x80, 0x67, 0x41, 0x5c, 0xf1, 0x08, 0x28, 0xbc, 0x08, 0x9a, 0x7f, 0x66, 0x0f, + 0x76, 0x5c, 0x12, 0x02, 0x77, 0xf3, 0x7f, 0xff, 0xfc, 0xe7, 0xc3, 0xce, 0x42, 0x6b, 0x92, 0x46, + 0x87, 0x5c, 0x89, 0xcd, 0x49, 0x2a, 0x95, 0x24, 0xf5, 0x28, 0x51, 0x22, 0x4d, 0x78, 0x4c, 0x1f, + 0x43, 0x23, 0x4c, 0x46, 0xe2, 0x78, 0x47, 0x28, 0x4e, 0x08, 0xf8, 0x4f, 0xc4, 0x2c, 0x0b, 0xbc, + 0x8e, 0xd3, 0xad, 0x33, 0x3c, 0x93, 0xf7, 0x60, 0x7d, 0x2f, 0xe5, 0xc3, 0x83, 0xed, 0xe3, 0x28, + 0x53, 0x22, 0x19, 0x8a, 0xc0, 0x47, 0xee, 0x02, 0x4a, 0x7f, 0x77, 0x61, 0xed, 0x51, 0x24, 0xe2, + 0xd1, 0x37, 0x13, 0x15, 0xc9, 0x24, 0xd3, 0xca, 0xf6, 0x66, 0x13, 0x11, 0xd4, 0x3b, 0x4e, 0xb7, + 0xc1, 0xf0, 0x4c, 0xde, 0x86, 0xc6, 0x16, 0x1f, 0xee, 0x0b, 0x64, 0x78, 0xc8, 0x28, 0x81, 0x82, + 0x3b, 0x88, 0x5e, 0x19, 0x2b, 0x2d, 0x56, 0x02, 0xa4, 0x03, 0xcd, 0xbd, 0x68, 0x2c, 0xbe, 0x9d, + 0xf2, 0x44, 0x4d, 0xc7, 0xc1, 0x0a, 0x4a, 0x57, 0x21, 0xd2, 0x06, 0x6f, 0x27, 0x4a, 0x82, 0x46, + 0xc7, 0xe9, 0x7a, 0x4c, 0x1f, 0x11, 0xe1, 0xc7, 0x01, 0x58, 0x84, 0x1f, 0x17, 0x21, 0x36, 0xe7, + 0x43, 0xdc, 0x95, 0x03, 0xc5, 0x93, 0x11, 0x4f, 0x47, 0xcf, 0x23, 0x71, 0x14, 0xac, 0x99, 0x10, + 0xe7, 0x51, 0x2d, 0xdb, 0xe3, 0x99, 0x08, 0x5a, 0xa8, 0x0e, 0xcf, 0xe4, 0x26, 0xd4, 0x7b, 0x91, + 0xea, 0x8b, 0x89, 0xda, 0x0f, 0xd6, 0x3b, 0x4e, 0xd7, 0x67, 0x05, 0x4d, 0xae, 0xc2, 0xca, 0x60, + 0xc8, 0x63, 0x11, 0x5c, 0x42, 0x01, 0x43, 0x10, 0x0a, 0x6b, 0x8f, 0x64, 0x2a, 0xa2, 0x97, 0x09, + 0x26, 0x3e, 0x68, 0x63, 0x20, 0x73, 0x18, 0xa5, 0xb0, 0x1e, 0x8e, 0x27, 0x32, 0x55, 0x4c, 0x64, + 0x13, 0x99, 0x64, 0x42, 0x47, 0xb2, 0x9d, 0xa6, 0x81, 0x83, 0x97, 0xf5, 0x91, 0xfe, 0x00, 0xed, + 0x5e, 0x2c, 0x87, 0x07, 0x7d, 0xae, 0x38, 0x13, 0xdf, 0x4f, 0x45, 0xa6, 0xb4, 0x45, 0xa3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0xa5, 0xd3, 0xeb, 0x2d, 0x4d, 0x6d, 0xd1, 0x1a, 0xcc, 0x10, + 0xf4, 0x13, 0xb8, 0x36, 0x10, 0xaa, 0x52, 0xb0, 0xbc, 0xf3, 0x3a, 0xe0, 0xed, 0x8a, 0xa3, 0xd7, + 0x84, 0xaf, 0x59, 0xf4, 0x73, 0x08, 0x9e, 0x4d, 0x46, 0x5c, 0x89, 0x0b, 0x49, 0xf7, 0xa0, 0xbe, + 0x27, 0x27, 0x32, 0x96, 0x2f, 0x67, 0x67, 0x6c, 0x80, 0x00, 0x56, 0xcd, 0x2e, 0x37, 0x2b, 0xa5, + 0xc1, 0x72, 0x92, 0x5e, 0xd1, 0xcd, 0x3d, 0xe4, 0xf1, 0x70, 0x1a, 0x6b, 0x37, 0xf4, 0xdb, 0x31, + 0xeb, 0xb5, 0x7f, 0x3b, 0xd9, 0x70, 0xfe, 0x38, 0xd9, 0x70, 0xfe, 0x3c, 0xd9, 0x70, 0x7e, 0xf9, + 0x6b, 0xe3, 0x8d, 0x17, 0x35, 0xfc, 0xdb, 0xb9, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, + 0xfb, 0x46, 0xba, 0xfe, 0x0c, 0x00, 0x00, +} + func (m *IndexMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2138,40 +2222,46 @@ func (m *IndexMeta) Marshal() (dAtA []byte, err error) { } func (m *IndexMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IndexMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Keys { - dAtA[i] = 0x18 - i++ - if m.Keys { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.TrackExistence { - dAtA[i] = 0x20 - i++ + i-- if m.TrackExistence { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Keys { + i-- + if m.Keys { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - return i, nil + return len(dAtA) - i, nil } func (m *FieldOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2179,96 +2269,106 @@ func (m *FieldOptions) Marshal() (dAtA []byte, err error) { } func (m *FieldOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.CacheType) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.CacheType))) - i += copy(dAtA[i:], m.CacheType) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.CacheSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.CacheSize)) + if len(m.ForeignIndex) > 0 { + i -= len(m.ForeignIndex) + copy(dAtA[i:], m.ForeignIndex) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ForeignIndex))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 } - if len(m.TimeQuantum) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.TimeQuantum))) - i += copy(dAtA[i:], m.TimeQuantum) + if m.Scale != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Scale)) + i-- + dAtA[i] = 0x78 } - if len(m.Type) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) + if m.BitDepth != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.BitDepth)) + i-- + dAtA[i] = 0x70 } - if m.Min != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) - } - if m.Max != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) - } - if m.Keys { - dAtA[i] = 0x58 - i++ - if m.Keys { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.Base != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Base)) + i-- + dAtA[i] = 0x68 } if m.NoStandardView { - dAtA[i] = 0x60 - i++ + i-- if m.NoStandardView { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x60 } - if m.Base != 0 { - dAtA[i] = 0x68 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Base)) + if m.Keys { + i-- + if m.Keys { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 } - if m.BitDepth != 0 { - dAtA[i] = 0x70 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.BitDepth)) + if m.Max != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) + i-- + dAtA[i] = 0x50 } - if m.Scale != 0 { - dAtA[i] = 0x78 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Scale)) + if m.Min != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) + i-- + dAtA[i] = 0x48 } - if len(m.ForeignIndex) > 0 { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.ForeignIndex))) - i += copy(dAtA[i:], m.ForeignIndex) + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x42 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.TimeQuantum) > 0 { + i -= len(m.TimeQuantum) + copy(dAtA[i:], m.TimeQuantum) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.TimeQuantum))) + i-- + dAtA[i] = 0x2a } - return i, nil + if m.CacheSize != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.CacheSize)) + i-- + dAtA[i] = 0x20 + } + if len(m.CacheType) > 0 { + i -= len(m.CacheType) + copy(dAtA[i:], m.CacheType) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.CacheType))) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil } func (m *ImportResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2276,26 +2376,33 @@ func (m *ImportResponse) Marshal() (dAtA []byte, err error) { } func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Err) > 0 { - dAtA[i] = 0xa - i++ - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Err) > 0 { + i -= len(m.Err) + copy(dAtA[i:], m.Err) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Err))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2303,48 +2410,57 @@ func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { } func (m *BlockDataRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } - if m.Block != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Block)) - } - if m.Shard != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.View) > 0 { - dAtA[i] = 0x2a - i++ + i -= len(m.View) + copy(dAtA[i:], m.View) i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) - i += copy(dAtA[i:], m.View) + i-- + dAtA[i] = 0x2a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Shard != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x20 } - return i, nil + if m.Block != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Block)) + i-- + dAtA[i] = 0x18 + } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2352,14 +2468,23 @@ func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { } func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.RowIDs) > 0 { - dAtA2 := make([]byte, len(m.RowIDs)*10) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ColumnIDs) > 0 { + dAtA2 := make([]byte, len(m.ColumnIDs)*10) var j1 int - for _, num := range m.RowIDs { + for _, num := range m.ColumnIDs { for num >= 1<<7 { dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2368,15 +2493,16 @@ func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - dAtA[i] = 0xa - i++ + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) i = encodeVarintPrivate(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) + i-- + dAtA[i] = 0x12 } - if len(m.ColumnIDs) > 0 { - dAtA4 := make([]byte, len(m.ColumnIDs)*10) + if len(m.RowIDs) > 0 { + dAtA4 := make([]byte, len(m.RowIDs)*10) var j3 int - for _, num := range m.ColumnIDs { + for _, num := range m.RowIDs { for num >= 1<<7 { dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2385,21 +2511,19 @@ func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { dAtA4[j3] = uint8(num) j3++ } - dAtA[i] = 0x12 - i++ + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) i = encodeVarintPrivate(dAtA, i, uint64(j3)) - i += copy(dAtA[i:], dAtA4[:j3]) + i-- + dAtA[i] = 0xa } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Cache) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2407,10 +2531,19 @@ func (m *Cache) Marshal() (dAtA []byte, err error) { } func (m *Cache) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Cache) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.IDs) > 0 { dAtA6 := make([]byte, len(m.IDs)*10) var j5 int @@ -2423,21 +2556,19 @@ func (m *Cache) MarshalTo(dAtA []byte) (int, error) { dAtA6[j5] = uint8(num) j5++ } - dAtA[i] = 0xa - i++ + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) i = encodeVarintPrivate(dAtA, i, uint64(j5)) - i += copy(dAtA[i:], dAtA6[:j5]) + i-- + dAtA[i] = 0xa } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *MaxShards) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2445,36 +2576,43 @@ func (m *MaxShards) Marshal() (dAtA []byte, err error) { } func (m *MaxShards) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MaxShards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Standard) > 0 { - for k, _ := range m.Standard { - dAtA[i] = 0xa - i++ + for k := range m.Standard { v := m.Standard[k] - mapSize := 1 + len(k) + sovPrivate(uint64(len(k))) + 1 + sovPrivate(uint64(v)) - i = encodeVarintPrivate(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x10 - i++ + baseI := i i = encodeVarintPrivate(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintPrivate(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintPrivate(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CreateShardMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2482,37 +2620,45 @@ func (m *CreateShardMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateShardMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateShardMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if m.Shard != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Field) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Field) + copy(dAtA[i:], m.Field) i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Shard != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteIndexMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2520,26 +2666,33 @@ func (m *DeleteIndexMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteIndexMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - 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) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateIndexMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2547,36 +2700,45 @@ func (m *CreateIndexMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateIndexMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Meta != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) - n7, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2584,42 +2746,52 @@ func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Meta != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) - n8, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2627,32 +2799,40 @@ func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Field) + copy(dAtA[i:], m.Field) i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *DeleteAvailableShardMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2660,37 +2840,45 @@ func (m *DeleteAvailableShardMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteAvailableShardMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteAvailableShardMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.ShardID != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPrivate(dAtA, i, uint64(m.ShardID)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Field) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2698,51 +2886,54 @@ func (m *Field) Marshal() (dAtA []byte, err error) { } func (m *Field) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Meta != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) - n9, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Views) > 0 { - for _, s := range m.Views { + for iNdEx := len(m.Views) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Views[iNdEx]) + copy(dAtA[i:], m.Views[iNdEx]) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Views[iNdEx]))) + i-- dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Meta != nil { + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Schema) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2750,32 +2941,40 @@ func (m *Schema) Marshal() (dAtA []byte, err error) { } func (m *Schema) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Indexes) > 0 { - for _, msg := range m.Indexes { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Indexes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Indexes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Index) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2783,38 +2982,47 @@ func (m *Index) Marshal() (dAtA []byte, err error) { } func (m *Index) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Fields) > 0 { - for _, msg := range m.Fields { - dAtA[i] = 0x22 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x22 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *URI) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2822,37 +3030,45 @@ func (m *URI) Marshal() (dAtA []byte, err error) { } func (m *URI) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *URI) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Scheme) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Scheme))) - i += copy(dAtA[i:], m.Scheme) - } - if len(m.Host) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Port != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Host))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Scheme) > 0 { + i -= len(m.Scheme) + copy(dAtA[i:], m.Scheme) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Scheme))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Node) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2860,52 +3076,62 @@ func (m *Node) Marshal() (dAtA []byte, err error) { } func (m *Node) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.URI != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.URI.Size())) - n10, err := m.URI.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x22 } if m.IsCoordinator { - dAtA[i] = 0x18 - i++ + i-- if m.IsCoordinator { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if len(m.State) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) - i += copy(dAtA[i:], m.State) + if m.URI != nil { + { + size, err := m.URI.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NodeStateMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2913,32 +3139,40 @@ func (m *NodeStateMessage) Marshal() (dAtA []byte, err error) { } func (m *NodeStateMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeStateMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.NodeID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.NodeID))) - i += copy(dAtA[i:], m.NodeID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.State) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.State) + copy(dAtA[i:], m.State) i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) - i += copy(dAtA[i:], m.State) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.NodeID) > 0 { + i -= len(m.NodeID) + copy(dAtA[i:], m.NodeID) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.NodeID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NodeEventMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2946,35 +3180,43 @@ func (m *NodeEventMessage) Marshal() (dAtA []byte, err error) { } func (m *NodeEventMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeEventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Event != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Event)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Node != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) - n11, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n11 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Event != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Event)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *NodeStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2982,52 +3224,64 @@ func (m *NodeStatus) Marshal() (dAtA []byte, err error) { } func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Node != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) - n12, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.Schema != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Schema.Size())) - n13, err := m.Schema.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Indexes) > 0 { - for _, msg := range m.Indexes { + for iNdEx := len(m.Indexes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Indexes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.Schema != nil { + { + size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *IndexStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3035,38 +3289,47 @@ func (m *IndexStatus) Marshal() (dAtA []byte, err error) { } func (m *IndexStatus) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IndexStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Fields) > 0 { - for _, msg := range m.Fields { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *FieldStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3074,15 +3337,18 @@ func (m *FieldStatus) Marshal() (dAtA []byte, err error) { } func (m *FieldStatus) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.AvailableShards) > 0 { dAtA15 := make([]byte, len(m.AvailableShards)*10) @@ -3096,21 +3362,26 @@ func (m *FieldStatus) MarshalTo(dAtA []byte) (int, error) { dAtA15[j14] = uint8(num) j14++ } - dAtA[i] = 0x12 - i++ + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) i = encodeVarintPrivate(dAtA, i, uint64(j14)) - i += copy(dAtA[i:], dAtA15[:j14]) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ClusterStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3118,44 +3389,54 @@ func (m *ClusterStatus) Marshal() (dAtA []byte, err error) { } func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClusterStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClusterID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.ClusterID))) - i += copy(dAtA[i:], m.ClusterID) - } - if len(m.State) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) - i += copy(dAtA[i:], m.State) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Nodes) > 0 { - for _, msg := range m.Nodes { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ClusterID) > 0 { + i -= len(m.ClusterID) + copy(dAtA[i:], m.ClusterID) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ClusterID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *BSIGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3163,42 +3444,50 @@ func (m *BSIGroup) Marshal() (dAtA []byte, err error) { } func (m *BSIGroup) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BSIGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Type) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } - if m.Min != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Max != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Min != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateViewMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3206,38 +3495,47 @@ func (m *CreateViewMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateViewMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateViewMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.View) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.View) + copy(dAtA[i:], m.View) i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) - i += copy(dAtA[i:], m.View) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteViewMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3245,38 +3543,47 @@ func (m *DeleteViewMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteViewMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteViewMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.View) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.View) + copy(dAtA[i:], m.View) i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) - i += copy(dAtA[i:], m.View) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ResizeInstruction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3284,77 +3591,93 @@ func (m *ResizeInstruction) Marshal() (dAtA []byte, err error) { } func (m *ResizeInstruction) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizeInstruction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.JobID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Node != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) - n16, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.Coordinator != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Coordinator.Size())) - n17, err := m.Coordinator.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if len(m.Sources) > 0 { - for _, msg := range m.Sources { - dAtA[i] = 0x22 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.NodeStatus != nil { + { + size, err := m.NodeStatus.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a } if m.ClusterStatus != nil { + { + size, err := m.ClusterStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x32 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.ClusterStatus.Size())) - n18, err := m.ClusterStatus.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if len(m.Sources) > 0 { + for iNdEx := len(m.Sources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i += n18 } - if m.NodeStatus != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.NodeStatus.Size())) - n19, err := m.NodeStatus.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Coordinator != nil { + { + size, err := m.Coordinator.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) } - i += n19 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + if m.JobID != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *ResizeSource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3362,53 +3685,64 @@ func (m *ResizeSource) Marshal() (dAtA []byte, err error) { } func (m *ResizeSource) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Node != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) - n20, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if len(m.Index) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } - if len(m.View) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) - i += copy(dAtA[i:], m.View) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Shard != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x28 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.View) > 0 { + i -= len(m.View) + copy(dAtA[i:], m.View) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) + i-- + dAtA[i] = 0x22 } - return i, nil + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x1a + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x12 + } + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ResizeInstructionComplete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3416,41 +3750,50 @@ func (m *ResizeInstructionComplete) Marshal() (dAtA []byte, err error) { } func (m *ResizeInstructionComplete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizeInstructionComplete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.JobID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) - } - if m.Node != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) - n21, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Error) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Error) + copy(dAtA[i:], m.Error) i = encodeVarintPrivate(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + if m.JobID != 0 { + i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *SetCoordinatorMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3458,30 +3801,38 @@ func (m *SetCoordinatorMessage) Marshal() (dAtA []byte, err error) { } func (m *SetCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetCoordinatorMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.New != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size())) - n22, err := m.New.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.New != nil { + { + size, err := m.New.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *UpdateCoordinatorMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3489,30 +3840,38 @@ func (m *UpdateCoordinatorMessage) Marshal() (dAtA []byte, err error) { } func (m *UpdateCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateCoordinatorMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.New != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size())) - n23, err := m.New.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.New != nil { + { + size, err := m.New.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPrivate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Topology) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3520,41 +3879,42 @@ func (m *Topology) Marshal() (dAtA []byte, err error) { } func (m *Topology) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Topology) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClusterID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.ClusterID))) - i += copy(dAtA[i:], m.ClusterID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.NodeIDs) > 0 { - for _, s := range m.NodeIDs { + for iNdEx := len(m.NodeIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NodeIDs[iNdEx]) + copy(dAtA[i:], m.NodeIDs[iNdEx]) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.NodeIDs[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ClusterID) > 0 { + i -= len(m.ClusterID) + copy(dAtA[i:], m.ClusterID) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ClusterID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RecalculateCaches) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3562,24 +3922,32 @@ func (m *RecalculateCaches) Marshal() (dAtA []byte, err error) { } func (m *RecalculateCaches) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RecalculateCaches) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPrivate(dAtA []byte, offset int, v uint64) int { + offset -= sovPrivate(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *IndexMeta) Size() (n int) { if m == nil { @@ -4372,14 +4740,7 @@ func (m *RecalculateCaches) Size() (n int) { } func sovPrivate(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPrivate(x uint64) (n int) { return sovPrivate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -4399,7 +4760,7 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4427,7 +4788,7 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4447,7 +4808,7 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4462,6 +4823,9 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4490,7 +4854,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4518,7 +4882,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4528,6 +4892,9 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4547,7 +4914,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CacheSize |= (uint32(b) & 0x7F) << shift + m.CacheSize |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -4566,7 +4933,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4576,6 +4943,9 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4595,7 +4965,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4605,6 +4975,9 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4624,7 +4997,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Min |= (int64(b) & 0x7F) << shift + m.Min |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4643,7 +5016,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Max |= (int64(b) & 0x7F) << shift + m.Max |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4662,7 +5035,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4682,7 +5055,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4702,7 +5075,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Base |= (int64(b) & 0x7F) << shift + m.Base |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4721,7 +5094,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BitDepth |= (uint64(b) & 0x7F) << shift + m.BitDepth |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4740,7 +5113,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Scale |= (int64(b) & 0x7F) << shift + m.Scale |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4759,7 +5132,7 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4769,6 +5142,9 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4783,6 +5159,9 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4811,7 +5190,7 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4839,7 +5218,7 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4849,6 +5228,9 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4863,6 +5245,9 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4891,7 +5276,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4919,7 +5304,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4929,6 +5314,9 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4948,7 +5336,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4958,6 +5346,9 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4977,7 +5368,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Block |= (uint64(b) & 0x7F) << shift + m.Block |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4996,7 +5387,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5015,7 +5406,7 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5025,6 +5416,9 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5039,6 +5433,9 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5067,7 +5464,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5093,7 +5490,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5110,7 +5507,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5119,12 +5516,15 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -5144,7 +5544,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5166,7 +5566,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5183,7 +5583,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5192,12 +5592,15 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -5217,7 +5620,7 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5236,6 +5639,9 @@ func (m *BlockDataResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5264,7 +5670,7 @@ func (m *Cache) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5290,7 +5696,7 @@ func (m *Cache) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5307,7 +5713,7 @@ func (m *Cache) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5316,12 +5722,15 @@ func (m *Cache) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -5341,7 +5750,7 @@ func (m *Cache) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5360,6 +5769,9 @@ func (m *Cache) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5388,7 +5800,7 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5416,7 +5828,7 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5425,6 +5837,9 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5445,7 +5860,7 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5462,7 +5877,7 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5472,6 +5887,9 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthPrivate + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -5487,7 +5905,7 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift + mapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5518,6 +5936,9 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5546,7 +5967,7 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5574,7 +5995,7 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5584,6 +6005,9 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5603,7 +6027,7 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5622,7 +6046,7 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5632,6 +6056,9 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5646,6 +6073,9 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5674,7 +6104,7 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5702,7 +6132,7 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5712,6 +6142,9 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5726,6 +6159,9 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5754,7 +6190,7 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5782,7 +6218,7 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5792,6 +6228,9 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5811,7 +6250,7 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5820,6 +6259,9 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5839,6 +6281,9 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5867,7 +6312,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5895,7 +6340,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5905,6 +6350,9 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5924,7 +6372,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5934,6 +6382,9 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5953,7 +6404,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5962,6 +6413,9 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5981,6 +6435,9 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6009,7 +6466,7 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6037,7 +6494,7 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6047,6 +6504,9 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6066,7 +6526,7 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6076,6 +6536,9 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6090,6 +6553,9 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6118,7 +6584,7 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6146,7 +6612,7 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6156,6 +6622,9 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6175,7 +6644,7 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6185,6 +6654,9 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6204,7 +6676,7 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ShardID |= (uint64(b) & 0x7F) << shift + m.ShardID |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6218,6 +6690,9 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6246,7 +6721,7 @@ func (m *Field) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6274,7 +6749,7 @@ func (m *Field) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6284,6 +6759,9 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6303,7 +6781,7 @@ func (m *Field) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6312,6 +6790,9 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6336,7 +6817,7 @@ func (m *Field) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6346,6 +6827,9 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6360,6 +6844,9 @@ func (m *Field) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6388,7 +6875,7 @@ func (m *Schema) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6416,7 +6903,7 @@ func (m *Schema) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6425,6 +6912,9 @@ func (m *Schema) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6442,6 +6932,9 @@ func (m *Schema) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6470,7 +6963,7 @@ func (m *Index) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6498,7 +6991,7 @@ func (m *Index) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6508,6 +7001,9 @@ func (m *Index) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6527,7 +7023,7 @@ func (m *Index) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6536,6 +7032,9 @@ func (m *Index) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6553,6 +7052,9 @@ func (m *Index) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6581,7 +7083,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6609,7 +7111,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6619,6 +7121,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6638,7 +7143,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6648,6 +7153,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6667,7 +7175,7 @@ func (m *URI) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= (uint32(b) & 0x7F) << shift + m.Port |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -6681,6 +7189,9 @@ func (m *URI) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6709,7 +7220,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6737,7 +7248,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6747,6 +7258,9 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6766,7 +7280,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6775,6 +7289,9 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6799,7 +7316,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6819,7 +7336,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6829,6 +7346,9 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6843,6 +7363,9 @@ func (m *Node) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6871,7 +7394,7 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6899,7 +7422,7 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6909,6 +7432,9 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6928,7 +7454,7 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6938,6 +7464,9 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6952,6 +7481,9 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6980,7 +7512,7 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7008,7 +7540,7 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Event |= (uint32(b) & 0x7F) << shift + m.Event |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -7027,7 +7559,7 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7036,6 +7568,9 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7055,6 +7590,9 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7083,7 +7621,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7111,7 +7649,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7120,6 +7658,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7144,7 +7685,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7153,6 +7694,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7177,7 +7721,7 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7186,6 +7730,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7203,6 +7750,9 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7231,7 +7781,7 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7259,7 +7809,7 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7269,6 +7819,9 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7288,7 +7841,7 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7297,6 +7850,9 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7314,6 +7870,9 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7342,7 +7901,7 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7370,7 +7929,7 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7380,6 +7939,9 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7397,7 +7959,7 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7414,7 +7976,7 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7423,12 +7985,15 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -7448,7 +8013,7 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7467,6 +8032,9 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7495,7 +8063,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7523,7 +8091,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7533,6 +8101,9 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7552,7 +8123,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7562,6 +8133,9 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7581,7 +8155,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7590,6 +8164,9 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7607,6 +8184,9 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7635,7 +8215,7 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7663,7 +8243,7 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7673,6 +8253,9 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7692,7 +8275,7 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7702,6 +8285,9 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7721,7 +8307,7 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Min |= (int64(b) & 0x7F) << shift + m.Min |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -7740,7 +8326,7 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Max |= (int64(b) & 0x7F) << shift + m.Max |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -7754,6 +8340,9 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7782,7 +8371,7 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7810,7 +8399,7 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7820,6 +8409,9 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7839,7 +8431,7 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7849,6 +8441,9 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7868,7 +8463,7 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7878,6 +8473,9 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7892,6 +8490,9 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7920,7 +8521,7 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7948,7 +8549,7 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7958,6 +8559,9 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7977,7 +8581,7 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7987,6 +8591,9 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8006,7 +8613,7 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8016,6 +8623,9 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8030,6 +8640,9 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8058,7 +8671,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8086,7 +8699,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.JobID |= (int64(b) & 0x7F) << shift + m.JobID |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -8105,7 +8718,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8114,6 +8727,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8138,7 +8754,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8147,6 +8763,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8171,7 +8790,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8180,6 +8799,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8202,7 +8824,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8211,6 +8833,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8235,7 +8860,7 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8244,6 +8869,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8263,6 +8891,9 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8291,7 +8922,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8319,7 +8950,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8328,6 +8959,9 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8352,7 +8986,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8362,6 +8996,9 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8381,7 +9018,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8391,6 +9028,9 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8410,7 +9050,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8420,6 +9060,9 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8439,7 +9082,7 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8453,6 +9096,9 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8481,7 +9127,7 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8509,7 +9155,7 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.JobID |= (int64(b) & 0x7F) << shift + m.JobID |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -8528,7 +9174,7 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8537,6 +9183,9 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8561,7 +9210,7 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8571,6 +9220,9 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8585,6 +9237,9 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8613,7 +9268,7 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8641,7 +9296,7 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8650,6 +9305,9 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8669,6 +9327,9 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8697,7 +9358,7 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8725,7 +9386,7 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -8734,6 +9395,9 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8753,6 +9417,9 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8781,7 +9448,7 @@ func (m *Topology) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8809,7 +9476,7 @@ func (m *Topology) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8819,6 +9486,9 @@ func (m *Topology) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8838,7 +9508,7 @@ func (m *Topology) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8848,6 +9518,9 @@ func (m *Topology) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8862,6 +9535,9 @@ func (m *Topology) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8890,7 +9566,7 @@ func (m *RecalculateCaches) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8913,6 +9589,9 @@ func (m *RecalculateCaches) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPrivate } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPrivate + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8929,6 +9608,7 @@ func (m *RecalculateCaches) Unmarshal(dAtA []byte) error { func skipPrivate(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -8960,10 +9640,8 @@ func skipPrivate(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -8980,134 +9658,34 @@ func skipPrivate(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPrivate } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPrivate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPrivate(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPrivate + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPrivate + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPrivate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPrivate = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPrivate = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("private.proto", fileDescriptor_private_54a82f4803638cdd) } - -var fileDescriptor_private_54a82f4803638cdd = []byte{ - // 1192 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, 0x71, 0xe2, 0x6c, 0xdb, 0xb0, 0x2d, 0x28, 0x98, 0x51, 0x45, - 0x4d, 0x25, 0x42, 0xd5, 0x72, 0xc1, 0xa9, 0x52, 0x71, 0x9c, 0x96, 0xa5, 0x24, 0x94, 0x71, 0x92, - 0x3b, 0x2e, 0x26, 0xf6, 0x28, 0x59, 0x65, 0xbd, 0x63, 0x76, 0xc7, 0x49, 0xdc, 0x0b, 0x6e, 0x41, - 0xe2, 0x05, 0x78, 0x02, 0x9e, 0x05, 0x71, 0xc5, 0x23, 0xa0, 0xf0, 0x22, 0x68, 0xfe, 0x99, 0x3d, - 0xd8, 0x71, 0x48, 0x14, 0x7a, 0x37, 0xff, 0xf9, 0xf0, 0xfd, 0xff, 0xec, 0x2c, 0x34, 0x46, 0x49, - 0x78, 0xc2, 0x24, 0xdf, 0x18, 0x25, 0x42, 0x0a, 0xaf, 0x1a, 0xc6, 0x92, 0x27, 0x31, 0x8b, 0xc8, - 0x0b, 0xa8, 0x05, 0xf1, 0x80, 0x9f, 0x6d, 0x73, 0xc9, 0x3c, 0x0f, 0xdc, 0x97, 0x7c, 0x92, 0xfa, - 0x4e, 0xcb, 0x6a, 0x57, 0x29, 0x9e, 0xbd, 0x0f, 0x60, 0x79, 0x37, 0x61, 0xfd, 0xe3, 0xad, 0xb3, - 0x30, 0x95, 0x3c, 0xee, 0x73, 0xdf, 0x45, 0xe9, 0x0c, 0x97, 0xfc, 0x69, 0xc3, 0xd2, 0xf3, 0x90, - 0x47, 0x83, 0xef, 0x46, 0x32, 0x14, 0x71, 0xea, 0xbd, 0x0b, 0xb5, 0x4d, 0xd6, 0x3f, 0xe2, 0xbb, - 0x93, 0x11, 0x47, 0x8f, 0x35, 0x5a, 0x30, 0x72, 0x69, 0x2f, 0x7c, 0xad, 0x3d, 0x36, 0x68, 0xc1, - 0xf0, 0x5a, 0x50, 0xdf, 0x0d, 0x87, 0xfc, 0xfb, 0x31, 0x8b, 0xe5, 0x78, 0xe8, 0x2f, 0xa0, 0x75, - 0x99, 0xa5, 0x52, 0x45, 0xc7, 0x55, 0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xbb, 0x62, 0x24, 0x22, 0x71, 0x38, 0xb9, 0xe2, 0x06, 0xf0, 0x61, 0x51, 0xdf, 0xe5, 0xfa, - 0x4a, 0xa9, 0xd1, 0x8c, 0x24, 0xb7, 0xd4, 0x70, 0xf7, 0x59, 0xd4, 0x1f, 0x47, 0x2a, 0x0d, 0xf5, - 0x76, 0x4c, 0x3b, 0xcd, 0x3f, 0xce, 0xd7, 0xad, 0xbf, 0xce, 0xd7, 0xad, 0xbf, 0xcf, 0xd7, 0xad, - 0xdf, 0xfe, 0x59, 0x7f, 0xeb, 0xa0, 0x82, 0x7f, 0x3b, 0x4f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, - 0xf4, 0x25, 0x10, 0xc0, 0xfe, 0x0c, 0x00, 0x00, -} diff --git a/internal/public.pb.go b/internal/public.pb.go index 08ed42318..d364038f2 100644 --- a/internal/public.pb.go +++ b/internal/public.pb.go @@ -3,13 +3,14 @@ package internal -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import encoding_binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -20,12 +21,12 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // 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"` + Columns []uint64 `protobuf:"varint,1,rep,packed,name=Columns,proto3" json:"Columns,omitempty"` + Keys []string `protobuf:"bytes,3,rep,name=Keys,proto3" json:"Keys,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty"` Roaring []byte `protobuf:"bytes,4,opt,name=Roaring,proto3" json:"Roaring,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -36,7 +37,7 @@ 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_48374b395a722341, []int{0} + return fileDescriptor_413a91106d7bcce8, []int{0} } func (m *Row) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -46,15 +47,15 @@ func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Row.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Row.Merge(m, src) } func (m *Row) XXX_Size() int { return m.Size() @@ -94,8 +95,8 @@ func (m *Row) GetRoaring() []byte { } type SignedRow struct { - Pos *Row `protobuf:"bytes,1,opt,name=Pos" json:"Pos,omitempty"` - Neg *Row `protobuf:"bytes,2,opt,name=Neg" json:"Neg,omitempty"` + Pos *Row `protobuf:"bytes,1,opt,name=Pos,proto3" json:"Pos,omitempty"` + Neg *Row `protobuf:"bytes,2,opt,name=Neg,proto3" json:"Neg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -105,7 +106,7 @@ func (m *SignedRow) Reset() { *m = SignedRow{} } func (m *SignedRow) String() string { return proto.CompactTextString(m) } func (*SignedRow) ProtoMessage() {} func (*SignedRow) Descriptor() ([]byte, []int) { - return fileDescriptor_public_48374b395a722341, []int{1} + return fileDescriptor_413a91106d7bcce8, []int{1} } func (m *SignedRow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,15 +116,15 @@ func (m *SignedRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SignedRow.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (dst *SignedRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedRow.Merge(dst, src) +func (m *SignedRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedRow.Merge(m, src) } func (m *SignedRow) XXX_Size() int { return m.Size() @@ -149,8 +150,8 @@ func (m *SignedRow) GetNeg() *Row { } 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"` + Rows []uint64 `protobuf:"varint,1,rep,packed,name=Rows,proto3" json:"Rows,omitempty"` + Keys []string `protobuf:"bytes,2,rep,name=Keys,proto3" json:"Keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -160,7 +161,7 @@ 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_48374b395a722341, []int{2} + return fileDescriptor_413a91106d7bcce8, []int{2} } func (m *RowIdentifiers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,15 +171,15 @@ func (m *RowIdentifiers) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_RowIdentifiers.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_RowIdentifiers.Merge(m, src) } func (m *RowIdentifiers) XXX_Size() int { return m.Size() @@ -216,7 +217,7 @@ 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_48374b395a722341, []int{3} + return fileDescriptor_413a91106d7bcce8, []int{3} } func (m *Pair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -226,15 +227,15 @@ func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Pair.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Pair.Merge(m, src) } func (m *Pair) XXX_Size() int { return m.Size() @@ -267,7 +268,7 @@ func (m *Pair) GetCount() uint64 { } type PairField struct { - Pair *Pair `protobuf:"bytes,1,opt,name=Pair" json:"Pair,omitempty"` + Pair *Pair `protobuf:"bytes,1,opt,name=Pair,proto3" json:"Pair,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -278,7 +279,7 @@ func (m *PairField) Reset() { *m = PairField{} } func (m *PairField) String() string { return proto.CompactTextString(m) } func (*PairField) ProtoMessage() {} func (*PairField) Descriptor() ([]byte, []int) { - return fileDescriptor_public_48374b395a722341, []int{4} + return fileDescriptor_413a91106d7bcce8, []int{4} } func (m *PairField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -288,15 +289,15 @@ func (m *PairField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PairField.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (dst *PairField) XXX_Merge(src proto.Message) { - xxx_messageInfo_PairField.Merge(dst, src) +func (m *PairField) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairField.Merge(m, src) } func (m *PairField) XXX_Size() int { return m.Size() @@ -322,7 +323,7 @@ func (m *PairField) GetField() string { } type PairsField struct { - Pairs []*Pair `protobuf:"bytes,1,rep,name=Pairs" json:"Pairs,omitempty"` + Pairs []*Pair `protobuf:"bytes,1,rep,name=Pairs,proto3" json:"Pairs,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -333,7 +334,7 @@ func (m *PairsField) Reset() { *m = PairsField{} } func (m *PairsField) String() string { return proto.CompactTextString(m) } func (*PairsField) ProtoMessage() {} func (*PairsField) Descriptor() ([]byte, []int) { - return fileDescriptor_public_48374b395a722341, []int{5} + return fileDescriptor_413a91106d7bcce8, []int{5} } func (m *PairsField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,15 +344,15 @@ func (m *PairsField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PairsField.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (dst *PairsField) XXX_Merge(src proto.Message) { - xxx_messageInfo_PairsField.Merge(dst, src) +func (m *PairsField) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairsField.Merge(m, src) } func (m *PairsField) XXX_Size() int { return m.Size() @@ -389,7 +390,7 @@ 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_48374b395a722341, []int{6} + return fileDescriptor_413a91106d7bcce8, []int{6} } func (m *FieldRow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -399,15 +400,15 @@ func (m *FieldRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FieldRow.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_FieldRow.Merge(m, src) } func (m *FieldRow) XXX_Size() int { return m.Size() @@ -440,7 +441,7 @@ func (m *FieldRow) GetRowKey() string { } type GroupCount struct { - Group []*FieldRow `protobuf:"bytes,1,rep,name=Group" json:"Group,omitempty"` + Group []*FieldRow `protobuf:"bytes,1,rep,name=Group,proto3" json:"Group,omitempty"` Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` Sum int64 `protobuf:"varint,3,opt,name=Sum,proto3" json:"Sum,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -452,7 +453,7 @@ 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_48374b395a722341, []int{7} + return fileDescriptor_413a91106d7bcce8, []int{7} } func (m *GroupCount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -462,15 +463,15 @@ func (m *GroupCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GroupCount.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_GroupCount.Merge(m, src) } func (m *GroupCount) XXX_Size() int { return m.Size() @@ -514,7 +515,7 @@ 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_48374b395a722341, []int{8} + return fileDescriptor_413a91106d7bcce8, []int{8} } func (m *ValCount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -524,15 +525,15 @@ func (m *ValCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ValCount.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ValCount.Merge(m, src) } func (m *ValCount) XXX_Size() int { return m.Size() @@ -560,7 +561,7 @@ 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"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -570,7 +571,7 @@ 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_48374b395a722341, []int{9} + return fileDescriptor_413a91106d7bcce8, []int{9} } func (m *ColumnAttrSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -580,15 +581,15 @@ func (m *ColumnAttrSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ColumnAttrSet.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ColumnAttrSet.Merge(m, src) } func (m *ColumnAttrSet) XXX_Size() int { return m.Size() @@ -636,7 +637,7 @@ 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_48374b395a722341, []int{10} + return fileDescriptor_413a91106d7bcce8, []int{10} } func (m *Attr) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -646,15 +647,15 @@ func (m *Attr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Attr.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_Attr.Merge(m, src) } func (m *Attr) XXX_Size() int { return m.Size() @@ -708,7 +709,7 @@ func (m *Attr) GetFloatValue() float64 { } type AttrMap struct { - Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` + Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs,proto3" json:"Attrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -718,7 +719,7 @@ 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_48374b395a722341, []int{11} + return fileDescriptor_413a91106d7bcce8, []int{11} } func (m *AttrMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -728,15 +729,15 @@ func (m *AttrMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AttrMap.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_AttrMap.Merge(m, src) } func (m *AttrMap) XXX_Size() int { return m.Size() @@ -756,12 +757,12 @@ 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"` + Shards []uint64 `protobuf:"varint,2,rep,packed,name=Shards,proto3" 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"` - EmbeddedData []*Row `protobuf:"bytes,8,rep,name=EmbeddedData" json:"EmbeddedData,omitempty"` + EmbeddedData []*Row `protobuf:"bytes,8,rep,name=EmbeddedData,proto3" json:"EmbeddedData,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -771,7 +772,7 @@ 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_48374b395a722341, []int{12} + return fileDescriptor_413a91106d7bcce8, []int{12} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,15 +782,15 @@ func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_QueryRequest.Merge(m, src) } func (m *QueryRequest) XXX_Size() int { return m.Size() @@ -851,8 +852,8 @@ func (m *QueryRequest) GetEmbeddedData() []*Row { 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"` + Results []*QueryResult `protobuf:"bytes,2,rep,name=Results,proto3" json:"Results,omitempty"` + ColumnAttrSets []*ColumnAttrSet `protobuf:"bytes,3,rep,name=ColumnAttrSets,proto3" json:"ColumnAttrSets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -862,7 +863,7 @@ 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_48374b395a722341, []int{13} + return fileDescriptor_413a91106d7bcce8, []int{13} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -872,15 +873,15 @@ func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_QueryResponse.Merge(m, src) } func (m *QueryResponse) XXX_Size() int { return m.Size() @@ -914,16 +915,16 @@ 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"` + Row *Row `protobuf:"bytes,1,opt,name=Row,proto3" 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"` + Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs,proto3" 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"` - SignedRow *SignedRow `protobuf:"bytes,10,opt,name=SignedRow" json:"SignedRow,omitempty"` - PairsField *PairsField `protobuf:"bytes,11,opt,name=PairsField" json:"PairsField,omitempty"` + ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount,proto3" json:"ValCount,omitempty"` + RowIDs []uint64 `protobuf:"varint,7,rep,packed,name=RowIDs,proto3" json:"RowIDs,omitempty"` + GroupCounts []*GroupCount `protobuf:"bytes,8,rep,name=GroupCounts,proto3" json:"GroupCounts,omitempty"` + RowIdentifiers *RowIdentifiers `protobuf:"bytes,9,opt,name=RowIdentifiers,proto3" json:"RowIdentifiers,omitempty"` + SignedRow *SignedRow `protobuf:"bytes,10,opt,name=SignedRow,proto3" json:"SignedRow,omitempty"` + PairsField *PairsField `protobuf:"bytes,11,opt,name=PairsField,proto3" json:"PairsField,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -933,7 +934,7 @@ 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_48374b395a722341, []int{14} + return fileDescriptor_413a91106d7bcce8, []int{14} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,15 +944,15 @@ func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(m, src) } func (m *QueryResult) XXX_Size() int { return m.Size() @@ -1043,11 +1044,11 @@ 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"` + RowIDs []uint64 `protobuf:"varint,4,rep,packed,name=RowIDs,proto3" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs,proto3" json:"ColumnIDs,omitempty"` + RowKeys []string `protobuf:"bytes,7,rep,name=RowKeys,proto3" json:"RowKeys,omitempty"` + ColumnKeys []string `protobuf:"bytes,8,rep,name=ColumnKeys,proto3" json:"ColumnKeys,omitempty"` + Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps,proto3" json:"Timestamps,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1057,7 +1058,7 @@ 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_48374b395a722341, []int{15} + return fileDescriptor_413a91106d7bcce8, []int{15} } func (m *ImportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1067,15 +1068,15 @@ func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ImportRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ImportRequest.Merge(m, src) } func (m *ImportRequest) XXX_Size() int { return m.Size() @@ -1146,10 +1147,11 @@ 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"` - FloatValues []float64 `protobuf:"fixed64,8,rep,packed,name=FloatValues" json:"FloatValues,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs,proto3" json:"ColumnIDs,omitempty"` + ColumnKeys []string `protobuf:"bytes,7,rep,name=ColumnKeys,proto3" json:"ColumnKeys,omitempty"` + Values []int64 `protobuf:"varint,6,rep,packed,name=Values,proto3" json:"Values,omitempty"` + FloatValues []float64 `protobuf:"fixed64,8,rep,packed,name=FloatValues,proto3" json:"FloatValues,omitempty"` + StringValues []string `protobuf:"bytes,9,rep,name=StringValues,proto3" json:"StringValues,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1159,7 +1161,7 @@ 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_48374b395a722341, []int{16} + return fileDescriptor_413a91106d7bcce8, []int{16} } func (m *ImportValueRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1169,15 +1171,15 @@ func (m *ImportValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ImportValueRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ImportValueRequest.Merge(m, src) } func (m *ImportValueRequest) XXX_Size() int { return m.Size() @@ -1237,10 +1239,17 @@ func (m *ImportValueRequest) GetFloatValues() []float64 { return nil } +func (m *ImportValueRequest) GetStringValues() []string { + if m != nil { + return m.StringValues + } + return nil +} + 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"` + Keys []string `protobuf:"bytes,3,rep,name=Keys,proto3" json:"Keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1250,7 +1259,7 @@ 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_48374b395a722341, []int{17} + return fileDescriptor_413a91106d7bcce8, []int{17} } func (m *TranslateKeysRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1260,15 +1269,15 @@ func (m *TranslateKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_TranslateKeysRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_TranslateKeysRequest.Merge(m, src) } func (m *TranslateKeysRequest) XXX_Size() int { return m.Size() @@ -1301,7 +1310,7 @@ func (m *TranslateKeysRequest) GetKeys() []string { } type TranslateKeysResponse struct { - IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs" json:"IDs,omitempty"` + IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs,proto3" json:"IDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1311,7 +1320,7 @@ 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_48374b395a722341, []int{18} + return fileDescriptor_413a91106d7bcce8, []int{18} } func (m *TranslateKeysResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1321,15 +1330,15 @@ func (m *TranslateKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_TranslateKeysResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_TranslateKeysResponse.Merge(m, src) } func (m *TranslateKeysResponse) XXX_Size() int { return m.Size() @@ -1359,7 +1368,7 @@ func (m *ImportRoaringRequestView) Reset() { *m = ImportRoaringRequestVi func (m *ImportRoaringRequestView) String() string { return proto.CompactTextString(m) } func (*ImportRoaringRequestView) ProtoMessage() {} func (*ImportRoaringRequestView) Descriptor() ([]byte, []int) { - return fileDescriptor_public_48374b395a722341, []int{19} + return fileDescriptor_413a91106d7bcce8, []int{19} } func (m *ImportRoaringRequestView) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1369,15 +1378,15 @@ func (m *ImportRoaringRequestView) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_ImportRoaringRequestView.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ImportRoaringRequestView.Merge(m, src) } func (m *ImportRoaringRequestView) XXX_Size() int { return m.Size() @@ -1404,7 +1413,7 @@ 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"` + Views []*ImportRoaringRequestView `protobuf:"bytes,2,rep,name=views,proto3" json:"views,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1414,7 +1423,7 @@ 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_48374b395a722341, []int{20} + return fileDescriptor_413a91106d7bcce8, []int{20} } func (m *ImportRoaringRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1424,15 +1433,15 @@ func (m *ImportRoaringRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ImportRoaringRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(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_Merge(src proto.Message) { + xxx_messageInfo_ImportRoaringRequest.Merge(m, src) } func (m *ImportRoaringRequest) XXX_Size() int { return m.Size() @@ -1461,8 +1470,8 @@ type ImportColumnAttrsRequest struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Shard int64 `protobuf:"varint,2,opt,name=Shard,proto3" json:"Shard,omitempty"` AttrKey string `protobuf:"bytes,3,opt,name=AttrKey,proto3" json:"AttrKey,omitempty"` - AttrVals []string `protobuf:"bytes,4,rep,name=AttrVals" json:"AttrVals,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + AttrVals []string `protobuf:"bytes,4,rep,name=AttrVals,proto3" json:"AttrVals,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs,proto3" json:"ColumnIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1472,7 +1481,7 @@ func (m *ImportColumnAttrsRequest) Reset() { *m = ImportColumnAttrsReque func (m *ImportColumnAttrsRequest) String() string { return proto.CompactTextString(m) } func (*ImportColumnAttrsRequest) ProtoMessage() {} func (*ImportColumnAttrsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_public_48374b395a722341, []int{21} + return fileDescriptor_413a91106d7bcce8, []int{21} } func (m *ImportColumnAttrsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1482,15 +1491,15 @@ func (m *ImportColumnAttrsRequest) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_ImportColumnAttrsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (dst *ImportColumnAttrsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportColumnAttrsRequest.Merge(dst, src) +func (m *ImportColumnAttrsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportColumnAttrsRequest.Merge(m, src) } func (m *ImportColumnAttrsRequest) XXX_Size() int { return m.Size() @@ -1560,10 +1569,85 @@ func init() { proto.RegisterType((*ImportRoaringRequest)(nil), "internal.ImportRoaringRequest") proto.RegisterType((*ImportColumnAttrsRequest)(nil), "internal.ImportColumnAttrsRequest") } + +func init() { proto.RegisterFile("public.proto", fileDescriptor_413a91106d7bcce8) } + +var fileDescriptor_413a91106d7bcce8 = []byte{ + // 1076 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x8e, 0x1b, 0xc5, + 0x13, 0xff, 0xb7, 0x67, 0xbc, 0xb6, 0xcb, 0xde, 0xfd, 0x47, 0x8d, 0x13, 0x46, 0x28, 0xda, 0x58, + 0xad, 0x08, 0x0d, 0x97, 0x8d, 0xb2, 0x20, 0x94, 0x13, 0x1f, 0x9b, 0xdd, 0x80, 0x15, 0xc5, 0x0a, + 0xb5, 0x2b, 0x73, 0x43, 0x9a, 0x8d, 0x3b, 0x9b, 0x91, 0xc6, 0x33, 0x66, 0x3e, 0x70, 0xf6, 0x39, + 0xb8, 0x20, 0x9e, 0x80, 0x77, 0xe0, 0x05, 0x38, 0xf2, 0x08, 0xb0, 0xbc, 0x01, 0x57, 0x2e, 0xa8, + 0xaa, 0xa7, 0xdd, 0x63, 0xc7, 0xbb, 0x44, 0x88, 0x5b, 0x7d, 0x75, 0x75, 0xfd, 0x6a, 0xaa, 0x7f, + 0x35, 0x30, 0x58, 0x54, 0xe7, 0x49, 0xfc, 0xe2, 0x60, 0x91, 0x67, 0x65, 0x26, 0xbb, 0x71, 0x5a, + 0xea, 0x3c, 0x8d, 0x12, 0x55, 0x80, 0x87, 0xd9, 0x52, 0x06, 0xd0, 0x79, 0x9c, 0x25, 0xd5, 0x3c, + 0x2d, 0x02, 0x31, 0xf2, 0x42, 0x1f, 0xad, 0x2a, 0x25, 0xf8, 0x4f, 0xf5, 0x65, 0x11, 0x78, 0x23, + 0x2f, 0xec, 0x21, 0xcb, 0xf2, 0x3e, 0xb4, 0x3f, 0x2f, 0xcb, 0xbc, 0x08, 0x5a, 0x23, 0x2f, 0xec, + 0x1f, 0xee, 0x1d, 0xd8, 0x74, 0x07, 0x64, 0x46, 0xe3, 0xa4, 0x9c, 0x98, 0x45, 0x79, 0x9c, 0x5e, + 0x04, 0xfe, 0x48, 0x84, 0x03, 0xb4, 0xaa, 0x7a, 0x06, 0xbd, 0xd3, 0xf8, 0x22, 0xd5, 0x33, 0xba, + 0xfa, 0x1e, 0x78, 0xcf, 0x33, 0xba, 0x56, 0x84, 0xfd, 0xc3, 0x5d, 0x97, 0x0a, 0xb3, 0x25, 0x92, + 0x87, 0x02, 0x26, 0xfa, 0x22, 0x68, 0x6d, 0x0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0x82, + 0x7a, 0xb4, 0xcc, 0x1f, 0x53, 0x5d, 0xc2, 0x34, 0xd6, 0x4b, 0x4a, 0x3d, 0x89, 0xe6, 0xba, 0xae, + 0x82, 0x65, 0xb2, 0x31, 0x15, 0xb6, 0xf8, 0x3f, 0x8b, 0x65, 0xf5, 0x12, 0x86, 0xdb, 0x72, 0xf0, + 0x52, 0x4d, 0x74, 0x64, 0xb8, 0xaf, 0x8b, 0x46, 0x91, 0x8f, 0xa0, 0xfd, 0x5d, 0xac, 0x97, 0x96, + 0xfb, 0x94, 0x1b, 0xff, 0xeb, 0x0a, 0x41, 0x73, 0x40, 0xfd, 0x28, 0x6c, 0xb1, 0x8d, 0x75, 0xf0, + 0x8f, 0x3d, 0x33, 0x33, 0x51, 0xef, 0x75, 0x33, 0x13, 0x81, 0xd9, 0x69, 0x6e, 0x75, 0x5b, 0x95, + 0xf6, 0x28, 0x89, 0xd3, 0x28, 0x31, 0x0f, 0xa3, 0x87, 0x2b, 0xfd, 0xe6, 0x49, 0x3a, 0xba, 0xf5, + 0xcb, 0xd5, 0xbe, 0xf8, 0xf5, 0x6a, 0x5f, 0xfc, 0x76, 0xb5, 0x2f, 0x7e, 0xf8, 0x63, 0xff, 0x7f, + 0xe7, 0x3b, 0xfc, 0x07, 0xfc, 0xe1, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0x76, 0x6d, 0xe9, + 0x11, 0x0b, 0x00, 0x00, +} + func (m *Row) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1571,10 +1655,49 @@ func (m *Row) Marshal() (dAtA []byte, err error) { } func (m *Row) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Row) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Roaring) > 0 { + i -= len(m.Roaring) + copy(dAtA[i:], m.Roaring) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Roaring))) + i-- + dAtA[i] = 0x22 + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Attrs) > 0 { + for iNdEx := len(m.Attrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } if len(m.Columns) > 0 { dAtA2 := make([]byte, len(m.Columns)*10) var j1 int @@ -1587,54 +1710,19 @@ func (m *Row) MarshalTo(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - dAtA[i] = 0xa - i++ + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) i = encodeVarintPublic(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) + i-- + dAtA[i] = 0xa } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Keys) > 0 { - for _, s := range m.Keys { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Roaring) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Roaring))) - i += copy(dAtA[i:], m.Roaring) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *SignedRow) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1642,40 +1730,50 @@ func (m *SignedRow) Marshal() (dAtA []byte, err error) { } func (m *SignedRow) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pos != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Pos.Size())) - n3, err := m.Pos.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Neg != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Neg.Size())) - n4, err := m.Neg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Neg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Pos != nil { + { + size, err := m.Pos.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RowIdentifiers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1683,10 +1781,28 @@ func (m *RowIdentifiers) Marshal() (dAtA []byte, err error) { } func (m *RowIdentifiers) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RowIdentifiers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } if len(m.Rows) > 0 { dAtA6 := make([]byte, len(m.Rows)*10) var j5 int @@ -1699,36 +1815,19 @@ func (m *RowIdentifiers) MarshalTo(dAtA []byte) (int, error) { dAtA6[j5] = uint8(num) j5++ } - dAtA[i] = 0xa - i++ + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) i = encodeVarintPublic(dAtA, i, uint64(j5)) - i += copy(dAtA[i:], dAtA6[:j5]) + i-- + dAtA[i] = 0xa } - if len(m.Keys) > 0 { - for _, s := range m.Keys { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Pair) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1736,36 +1835,43 @@ func (m *Pair) Marshal() (dAtA []byte, err error) { } func (m *Pair) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.ID)) - } - if m.Count != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Count != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.ID != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *PairField) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1773,36 +1879,45 @@ func (m *PairField) Marshal() (dAtA []byte, err error) { } func (m *PairField) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PairField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pair != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Pair.Size())) - n7, err := m.Pair.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Field) + copy(dAtA[i:], m.Field) i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Pair != nil { + { + size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PairsField) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1810,38 +1925,47 @@ func (m *PairsField) Marshal() (dAtA []byte, err error) { } func (m *PairsField) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PairsField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Pairs) > 0 { - for _, msg := range m.Pairs { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Field) + copy(dAtA[i:], m.Field) i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *FieldRow) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1849,37 +1973,45 @@ func (m *FieldRow) Marshal() (dAtA []byte, err error) { } func (m *FieldRow) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } - if m.RowID != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.RowID)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.RowKey) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.RowKey) + copy(dAtA[i:], m.RowKey) i = encodeVarintPublic(dAtA, i, uint64(len(m.RowKey))) - i += copy(dAtA[i:], m.RowKey) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.RowID != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.RowID)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *GroupCount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1887,42 +2019,50 @@ func (m *GroupCount) Marshal() (dAtA []byte, err error) { } func (m *GroupCount) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupCount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Group) > 0 { - for _, msg := range m.Group { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Count != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Sum != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPublic(dAtA, i, uint64(m.Sum)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Count != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Group) > 0 { + for iNdEx := len(m.Group) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Group[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *ValCount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1930,30 +2070,36 @@ func (m *ValCount) Marshal() (dAtA []byte, err error) { } func (m *ValCount) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValCount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Val != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Val)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Count != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Val != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Val)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *ColumnAttrSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1961,43 +2107,52 @@ func (m *ColumnAttrSet) Marshal() (dAtA []byte, err error) { } func (m *ColumnAttrSet) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ColumnAttrSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.ID)) - } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Attrs) > 0 { + for iNdEx := len(m.Attrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return i, nil + if m.ID != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Attr) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2005,58 +2160,66 @@ func (m *Attr) Marshal() (dAtA []byte, err error) { } func (m *Attr) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Attr) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Type != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Type)) - } - if len(m.StringValue) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.StringValue))) - i += copy(dAtA[i:], m.StringValue) - } - if m.IntValue != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.IntValue)) + if m.FloatValue != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) + i-- + dAtA[i] = 0x31 } if m.BoolValue { - dAtA[i] = 0x28 - i++ + i-- if m.BoolValue { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if m.FloatValue != 0 { - dAtA[i] = 0x31 - i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) - i += 8 + if m.IntValue != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.IntValue)) + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.StringValue) > 0 { + i -= len(m.StringValue) + copy(dAtA[i:], m.StringValue) + i = encodeVarintPublic(dAtA, i, uint64(len(m.StringValue))) + i-- + dAtA[i] = 0x1a } - return i, nil + if m.Type != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *AttrMap) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2064,32 +2227,40 @@ func (m *AttrMap) Marshal() (dAtA []byte, err error) { } func (m *AttrMap) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttrMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Attrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *QueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2097,15 +2268,72 @@ func (m *QueryRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Query) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.EmbeddedData) > 0 { + for iNdEx := len(m.EmbeddedData) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.EmbeddedData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if m.ExcludeColumns { + i-- + if m.ExcludeColumns { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.ExcludeRowAttrs { + i-- + if m.ExcludeRowAttrs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Remote { + i-- + if m.Remote { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.ColumnAttrs { + i-- + if m.ColumnAttrs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } if len(m.Shards) > 0 { dAtA9 := make([]byte, len(m.Shards)*10) @@ -2119,73 +2347,26 @@ func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { dAtA9[j8] = uint8(num) j8++ } - dAtA[i] = 0x12 - i++ + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) i = encodeVarintPublic(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) + i-- + dAtA[i] = 0x12 } - if m.ColumnAttrs { - dAtA[i] = 0x18 - i++ - if m.ColumnAttrs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } - if m.Remote { - dAtA[i] = 0x28 - i++ - if m.Remote { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.ExcludeRowAttrs { - dAtA[i] = 0x30 - i++ - if m.ExcludeRowAttrs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.ExcludeColumns { - dAtA[i] = 0x38 - i++ - if m.ExcludeColumns { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.EmbeddedData) > 0 { - for _, msg := range m.EmbeddedData { - dAtA[i] = 0x42 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *QueryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2193,50 +2374,61 @@ func (m *QueryResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Err) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Err))) - i += copy(dAtA[i:], m.Err) - } - if len(m.Results) > 0 { - for _, msg := range m.Results { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ColumnAttrSets) > 0 { - for _, msg := range m.ColumnAttrSets { - dAtA[i] = 0x1a - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.ColumnAttrSets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ColumnAttrSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return i, nil + if len(m.Err) > 0 { + i -= len(m.Err) + copy(dAtA[i:], m.Err) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Err))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *QueryResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2244,131 +2436,152 @@ func (m *QueryResult) Marshal() (dAtA []byte, err error) { } func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Row != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Row.Size())) - n10, err := m.Row.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.N != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.N)) - } - if len(m.Pairs) > 0 { - for _, msg := range m.Pairs { - dAtA[i] = 0x1a - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.PairsField != nil { + { + size, err := m.PairsField.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.SignedRow != nil { + { + size, err := m.SignedRow.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.RowIdentifiers != nil { + { + size, err := m.RowIdentifiers.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.GroupCounts) > 0 { + for iNdEx := len(m.GroupCounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupCounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 } } + if len(m.RowIDs) > 0 { + dAtA14 := make([]byte, len(m.RowIDs)*10) + var j13 int + for _, num := range m.RowIDs { + for num >= 1<<7 { + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + dAtA14[j13] = uint8(num) + j13++ + } + i -= j13 + copy(dAtA[i:], dAtA14[:j13]) + i = encodeVarintPublic(dAtA, i, uint64(j13)) + i-- + dAtA[i] = 0x3a + } + if m.Type != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x30 + } + if m.ValCount != nil { + { + size, err := m.ValCount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if m.Changed { - dAtA[i] = 0x20 - i++ + i-- if m.Changed { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.ValCount != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.ValCount.Size())) - n11, err := m.ValCount.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.Type != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Type)) - } - if len(m.RowIDs) > 0 { - dAtA13 := make([]byte, len(m.RowIDs)*10) - var j12 int - for _, num := range m.RowIDs { - for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j12++ + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) } - dAtA13[j12] = uint8(num) - j12++ + i-- + dAtA[i] = 0x1a } - dAtA[i] = 0x3a - i++ - i = encodeVarintPublic(dAtA, i, uint64(j12)) - i += copy(dAtA[i:], dAtA13[:j12]) } - if len(m.GroupCounts) > 0 { - for _, msg := range m.GroupCounts { - dAtA[i] = 0x42 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.N != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.N)) + i-- + dAtA[i] = 0x10 + } + if m.Row != nil { + { + size, err := m.Row.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.RowIdentifiers != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.RowIdentifiers.Size())) - n14, err := m.RowIdentifiers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - if m.SignedRow != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.SignedRow.Size())) - n15, err := m.SignedRow.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if m.PairsField != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.PairsField.Size())) - n16, err := m.PairsField.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ImportRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2376,31 +2589,42 @@ func (m *ImportRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if len(m.ColumnKeys) > 0 { + for iNdEx := len(m.ColumnKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ColumnKeys[iNdEx]) + copy(dAtA[i:], m.ColumnKeys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.ColumnKeys[iNdEx]))) + i-- + dAtA[i] = 0x42 + } } - if m.Shard != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) + if len(m.RowKeys) > 0 { + for iNdEx := len(m.RowKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RowKeys[iNdEx]) + copy(dAtA[i:], m.RowKeys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.RowKeys[iNdEx]))) + i-- + dAtA[i] = 0x3a + } } - if len(m.RowIDs) > 0 { - dAtA18 := make([]byte, len(m.RowIDs)*10) + if len(m.Timestamps) > 0 { + dAtA18 := make([]byte, len(m.Timestamps)*10) var j17 int - for _, num := range m.RowIDs { + for _, num1 := range m.Timestamps { + num := uint64(num1) for num >= 1<<7 { dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2409,10 +2633,11 @@ func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { dAtA18[j17] = uint8(num) j17++ } - dAtA[i] = 0x22 - i++ + i -= j17 + copy(dAtA[i:], dAtA18[:j17]) i = encodeVarintPublic(dAtA, i, uint64(j17)) - i += copy(dAtA[i:], dAtA18[:j17]) + i-- + dAtA[i] = 0x32 } if len(m.ColumnIDs) > 0 { dAtA20 := make([]byte, len(m.ColumnIDs)*10) @@ -2426,16 +2651,16 @@ func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { dAtA20[j19] = uint8(num) j19++ } - dAtA[i] = 0x2a - i++ + i -= j19 + copy(dAtA[i:], dAtA20[:j19]) i = encodeVarintPublic(dAtA, i, uint64(j19)) - i += copy(dAtA[i:], dAtA20[:j19]) + i-- + dAtA[i] = 0x2a } - if len(m.Timestamps) > 0 { - dAtA22 := make([]byte, len(m.Timestamps)*10) + if len(m.RowIDs) > 0 { + dAtA22 := make([]byte, len(m.RowIDs)*10) var j21 int - for _, num1 := range m.Timestamps { - num := uint64(num1) + for _, num := range m.RowIDs { for num >= 1<<7 { dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2444,51 +2669,38 @@ func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { dAtA22[j21] = uint8(num) j21++ } - dAtA[i] = 0x32 - i++ + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) i = encodeVarintPublic(dAtA, i, uint64(j21)) - i += copy(dAtA[i:], dAtA22[:j21]) + i-- + dAtA[i] = 0x22 } - if len(m.RowKeys) > 0 { - for _, s := range m.RowKeys { - dAtA[i] = 0x3a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if m.Shard != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x18 } - if len(m.ColumnKeys) > 0 { - for _, s := range m.ColumnKeys { - dAtA[i] = 0x42 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ImportValueRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2496,97 +2708,110 @@ func (m *ImportValueRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportValueRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } - if m.Shard != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) - } - if len(m.ColumnIDs) > 0 { - dAtA24 := make([]byte, len(m.ColumnIDs)*10) - var j23 int - for _, num := range m.ColumnIDs { - for num >= 1<<7 { - dAtA24[j23] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j23++ - } - dAtA24[j23] = uint8(num) - j23++ - } - dAtA[i] = 0x2a - i++ - i = encodeVarintPublic(dAtA, i, uint64(j23)) - i += copy(dAtA[i:], dAtA24[:j23]) - } - if len(m.Values) > 0 { - dAtA26 := make([]byte, len(m.Values)*10) - var j25 int - for _, num1 := range m.Values { - num := uint64(num1) - for num >= 1<<7 { - dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j25++ - } - dAtA26[j25] = uint8(num) - j25++ - } - dAtA[i] = 0x32 - i++ - i = encodeVarintPublic(dAtA, i, uint64(j25)) - i += copy(dAtA[i:], dAtA26[:j25]) - } - if len(m.ColumnKeys) > 0 { - for _, s := range m.ColumnKeys { - dAtA[i] = 0x3a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + if len(m.StringValues) > 0 { + for iNdEx := len(m.StringValues) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StringValues[iNdEx]) + copy(dAtA[i:], m.StringValues[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.StringValues[iNdEx]))) + i-- + dAtA[i] = 0x4a } } if len(m.FloatValues) > 0 { - dAtA[i] = 0x42 - i++ + for iNdEx := len(m.FloatValues) - 1; iNdEx >= 0; iNdEx-- { + f23 := math.Float64bits(float64(m.FloatValues[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f23)) + } i = encodeVarintPublic(dAtA, i, uint64(len(m.FloatValues)*8)) - for _, num := range m.FloatValues { - f27 := math.Float64bits(float64(num)) - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f27)) - i += 8 + i-- + dAtA[i] = 0x42 + } + if len(m.ColumnKeys) > 0 { + for iNdEx := len(m.ColumnKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ColumnKeys[iNdEx]) + copy(dAtA[i:], m.ColumnKeys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.ColumnKeys[iNdEx]))) + i-- + dAtA[i] = 0x3a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Values) > 0 { + dAtA25 := make([]byte, len(m.Values)*10) + var j24 int + for _, num1 := range m.Values { + num := uint64(num1) + for num >= 1<<7 { + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j24++ + } + dAtA25[j24] = uint8(num) + j24++ + } + i -= j24 + copy(dAtA[i:], dAtA25[:j24]) + i = encodeVarintPublic(dAtA, i, uint64(j24)) + i-- + dAtA[i] = 0x32 } - return i, nil + if len(m.ColumnIDs) > 0 { + dAtA27 := make([]byte, len(m.ColumnIDs)*10) + var j26 int + for _, num := range m.ColumnIDs { + for num >= 1<<7 { + dAtA27[j26] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j26++ + } + dAtA27[j26] = uint8(num) + j26++ + } + i -= j26 + copy(dAtA[i:], dAtA27[:j26]) + i = encodeVarintPublic(dAtA, i, uint64(j26)) + i-- + dAtA[i] = 0x2a + } + if m.Shard != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x18 + } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TranslateKeysRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2594,47 +2819,49 @@ func (m *TranslateKeysRequest) Marshal() (dAtA []byte, err error) { } func (m *TranslateKeysRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TranslateKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if len(m.Field) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Keys) > 0 { - for _, s := range m.Keys { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TranslateKeysResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2642,10 +2869,19 @@ func (m *TranslateKeysResponse) Marshal() (dAtA []byte, err error) { } func (m *TranslateKeysResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TranslateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.IDs) > 0 { dAtA29 := make([]byte, len(m.IDs)*10) var j28 int @@ -2658,21 +2894,19 @@ func (m *TranslateKeysResponse) MarshalTo(dAtA []byte) (int, error) { dAtA29[j28] = uint8(num) j28++ } - dAtA[i] = 0x1a - i++ + i -= j28 + copy(dAtA[i:], dAtA29[:j28]) i = encodeVarintPublic(dAtA, i, uint64(j28)) - i += copy(dAtA[i:], dAtA29[:j28]) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ImportRoaringRequestView) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2680,32 +2914,40 @@ func (m *ImportRoaringRequestView) Marshal() (dAtA []byte, err error) { } func (m *ImportRoaringRequestView) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportRoaringRequestView) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Data) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintPublic(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ImportRoaringRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2713,42 +2955,50 @@ func (m *ImportRoaringRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportRoaringRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportRoaringRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Views) > 0 { + for iNdEx := len(m.Views) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Views[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } if m.Clear { - dAtA[i] = 0x8 - i++ + i-- if m.Clear { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - if len(m.Views) > 0 { - for _, msg := range m.Views { - dAtA[i] = 0x12 - i++ - i = encodeVarintPublic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ImportColumnAttrsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2756,41 +3006,18 @@ func (m *ImportColumnAttrsRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportColumnAttrsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImportColumnAttrsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i += copy(dAtA[i:], m.Index) - } - if m.Shard != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) - } - if len(m.AttrKey) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPublic(dAtA, i, uint64(len(m.AttrKey))) - i += copy(dAtA[i:], m.AttrKey) - } - if len(m.AttrVals) > 0 { - for _, s := range m.AttrVals { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ColumnIDs) > 0 { dAtA31 := make([]byte, len(m.ColumnIDs)*10) @@ -2804,25 +3031,53 @@ func (m *ImportColumnAttrsRequest) MarshalTo(dAtA []byte) (int, error) { dAtA31[j30] = uint8(num) j30++ } - dAtA[i] = 0x2a - i++ + i -= j30 + copy(dAtA[i:], dAtA31[:j30]) i = encodeVarintPublic(dAtA, i, uint64(j30)) - i += copy(dAtA[i:], dAtA31[:j30]) + i-- + dAtA[i] = 0x2a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.AttrVals) > 0 { + for iNdEx := len(m.AttrVals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AttrVals[iNdEx]) + copy(dAtA[i:], m.AttrVals[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.AttrVals[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - return i, nil + if len(m.AttrKey) > 0 { + i -= len(m.AttrKey) + copy(dAtA[i:], m.AttrKey) + i = encodeVarintPublic(dAtA, i, uint64(len(m.AttrKey))) + i-- + dAtA[i] = 0x1a + } + if m.Shard != 0 { + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x10 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintPublic(dAtA []byte, offset int, v uint64) int { + offset -= sovPublic(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Row) Size() (n int) { if m == nil { @@ -3333,6 +3588,12 @@ func (m *ImportValueRequest) Size() (n int) { if len(m.FloatValues) > 0 { n += 1 + sovPublic(uint64(len(m.FloatValues)*8)) + len(m.FloatValues)*8 } + if len(m.StringValues) > 0 { + for _, s := range m.StringValues { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3462,14 +3723,7 @@ func (m *ImportColumnAttrsRequest) Size() (n int) { } func sovPublic(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPublic(x uint64) (n int) { return sovPublic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3489,7 +3743,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3515,7 +3769,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3532,7 +3786,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3541,12 +3795,15 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -3566,7 +3823,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3590,7 +3847,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3599,6 +3856,9 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3621,7 +3881,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3631,6 +3891,9 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3650,7 +3913,7 @@ func (m *Row) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3659,6 +3922,9 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3676,6 +3942,9 @@ func (m *Row) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3704,7 +3973,7 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3732,7 +4001,7 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3741,6 +4010,9 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3765,7 +4037,7 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3774,6 +4046,9 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3793,6 +4068,9 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3821,7 +4099,7 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3847,7 +4125,7 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3864,7 +4142,7 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3873,12 +4151,15 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -3898,7 +4179,7 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3922,7 +4203,7 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3932,6 +4213,9 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3946,6 +4230,9 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -3974,7 +4261,7 @@ func (m *Pair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4002,7 +4289,7 @@ func (m *Pair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ID |= (uint64(b) & 0x7F) << shift + m.ID |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4021,7 +4308,7 @@ func (m *Pair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= (uint64(b) & 0x7F) << shift + m.Count |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4040,7 +4327,7 @@ func (m *Pair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4050,6 +4337,9 @@ func (m *Pair) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4064,6 +4354,9 @@ func (m *Pair) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4092,7 +4385,7 @@ func (m *PairField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4120,7 +4413,7 @@ func (m *PairField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4129,6 +4422,9 @@ func (m *PairField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4153,7 +4449,7 @@ func (m *PairField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4163,6 +4459,9 @@ func (m *PairField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4177,6 +4476,9 @@ func (m *PairField) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4205,7 +4507,7 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4233,7 +4535,7 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4242,6 +4544,9 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4264,7 +4569,7 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4274,6 +4579,9 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4288,6 +4596,9 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4316,7 +4627,7 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4344,7 +4655,7 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4354,6 +4665,9 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4373,7 +4687,7 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RowID |= (uint64(b) & 0x7F) << shift + m.RowID |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4392,7 +4706,7 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4402,6 +4716,9 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4416,6 +4733,9 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4444,7 +4764,7 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4472,7 +4792,7 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4481,6 +4801,9 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4503,7 +4826,7 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= (uint64(b) & 0x7F) << shift + m.Count |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4522,7 +4845,7 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Sum |= (int64(b) & 0x7F) << shift + m.Sum |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4536,6 +4859,9 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4564,7 +4890,7 @@ func (m *ValCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4592,7 +4918,7 @@ func (m *ValCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Val |= (int64(b) & 0x7F) << shift + m.Val |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4611,7 +4937,7 @@ func (m *ValCount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= (int64(b) & 0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4625,6 +4951,9 @@ func (m *ValCount) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4653,7 +4982,7 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4681,7 +5010,7 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ID |= (uint64(b) & 0x7F) << shift + m.ID |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4700,7 +5029,7 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4709,6 +5038,9 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4731,7 +5063,7 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4741,6 +5073,9 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4755,6 +5090,9 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4783,7 +5121,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4811,7 +5149,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4821,6 +5159,9 @@ func (m *Attr) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4840,7 +5181,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (uint64(b) & 0x7F) << shift + m.Type |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4859,7 +5200,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4869,6 +5210,9 @@ func (m *Attr) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4888,7 +5232,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IntValue |= (int64(b) & 0x7F) << shift + m.IntValue |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4907,7 +5251,7 @@ func (m *Attr) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4933,6 +5277,9 @@ func (m *Attr) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -4961,7 +5308,7 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4989,7 +5336,7 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4998,6 +5345,9 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5015,6 +5365,9 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5043,7 +5396,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5071,7 +5424,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5081,6 +5434,9 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5098,7 +5454,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5115,7 +5471,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5124,12 +5480,15 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -5149,7 +5508,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5173,7 +5532,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5193,7 +5552,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5213,7 +5572,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5233,7 +5592,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5253,7 +5612,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5262,6 +5621,9 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5279,6 +5641,9 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5307,7 +5672,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5335,7 +5700,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5345,6 +5710,9 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5364,7 +5732,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5373,6 +5741,9 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5395,7 +5766,7 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5404,6 +5775,9 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5421,6 +5795,9 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5449,7 +5826,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5477,7 +5854,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5486,6 +5863,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5510,7 +5890,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.N |= (uint64(b) & 0x7F) << shift + m.N |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5529,7 +5909,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5538,6 +5918,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5560,7 +5943,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5580,7 +5963,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5589,6 +5972,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5613,7 +5999,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (uint32(b) & 0x7F) << shift + m.Type |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -5630,7 +6016,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5647,7 +6033,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5656,12 +6042,15 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -5681,7 +6070,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5705,7 +6094,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5714,6 +6103,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5736,7 +6128,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5745,6 +6137,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5769,7 +6164,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5778,6 +6173,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5802,7 +6200,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5811,6 +6209,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5830,6 +6231,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5858,7 +6262,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5886,7 +6290,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5896,6 +6300,9 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5915,7 +6322,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5925,6 +6332,9 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5944,7 +6354,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5961,7 +6371,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5978,7 +6388,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5987,12 +6397,15 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6012,7 +6425,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6034,7 +6447,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6051,7 +6464,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6060,12 +6473,15 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6085,7 +6501,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6107,7 +6523,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6124,7 +6540,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6133,12 +6549,15 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6158,7 +6577,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6182,7 +6601,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6192,6 +6611,9 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6211,7 +6633,7 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6221,6 +6643,9 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6235,6 +6660,9 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6263,7 +6691,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6291,7 +6719,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6301,6 +6729,9 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6320,7 +6751,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6330,6 +6761,9 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6349,7 +6783,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6366,7 +6800,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6383,7 +6817,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6392,12 +6826,15 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6417,7 +6854,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6439,7 +6876,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6456,7 +6893,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6465,12 +6902,15 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6490,7 +6930,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6514,7 +6954,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6524,6 +6964,9 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6550,7 +6993,7 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6559,6 +7002,9 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6580,6 +7026,38 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field FloatValues", wireType) } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValues", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringValues = append(m.StringValues, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPublic(dAtA[iNdEx:]) @@ -6589,6 +7067,9 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6617,7 +7098,7 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6645,7 +7126,7 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6655,6 +7136,9 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6674,7 +7158,7 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6684,6 +7168,9 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6703,7 +7190,7 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6713,6 +7200,9 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6727,6 +7217,9 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6755,7 +7248,7 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6781,7 +7274,7 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6798,7 +7291,7 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6807,12 +7300,15 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -6832,7 +7328,7 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6851,6 +7347,9 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6879,7 +7378,7 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6907,7 +7406,7 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6917,6 +7416,9 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6936,7 +7438,7 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6945,6 +7447,9 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6962,6 +7467,9 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6990,7 +7498,7 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7018,7 +7526,7 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7038,7 +7546,7 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7047,6 +7555,9 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7064,6 +7575,9 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7092,7 +7606,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7120,7 +7634,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7130,6 +7644,9 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7149,7 +7666,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (int64(b) & 0x7F) << shift + m.Shard |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -7168,7 +7685,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7178,6 +7695,9 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7197,7 +7717,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7207,6 +7727,9 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7224,7 +7747,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7241,7 +7764,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7250,12 +7773,15 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int - for _, integer := range dAtA { + for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } @@ -7275,7 +7801,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7294,6 +7820,9 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPublic + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7310,6 +7839,7 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { func skipPublic(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -7341,10 +7871,8 @@ func skipPublic(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -7361,126 +7889,34 @@ func skipPublic(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPublic } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPublic - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPublic(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPublic + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPublic + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPublic = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPublic = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPublic = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPublic = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPublic = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("public.proto", fileDescriptor_public_48374b395a722341) } - -var fileDescriptor_public_48374b395a722341 = []byte{ - // 1065 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdb, 0x6e, 0x1c, 0x45, - 0x13, 0xfe, 0x7b, 0x67, 0xd6, 0xbb, 0x5b, 0x6b, 0xfb, 0x8f, 0x9a, 0x4d, 0x18, 0xa1, 0xc8, 0xac, - 0x5a, 0x11, 0x1a, 0x6e, 0x1c, 0xc5, 0x20, 0x94, 0x2b, 0x0e, 0x8e, 0x1d, 0x58, 0x45, 0x59, 0x85, - 0xb2, 0xb5, 0xdc, 0x21, 0x8d, 0xb3, 0x1d, 0x67, 0xa4, 0xd9, 0x99, 0x65, 0x0e, 0x4c, 0xfc, 0x1c, - 0xdc, 0x20, 0x9e, 0x80, 0x77, 0xe0, 0x05, 0xb8, 0x42, 0x3c, 0x02, 0x98, 0xc7, 0xe0, 0x06, 0x55, - 0xf5, 0xf4, 0xf6, 0xec, 0xfa, 0x00, 0x42, 0xdc, 0xf5, 0x57, 0xa7, 0xa9, 0xaa, 0xae, 0xfa, 0x7a, - 0x60, 0x7b, 0x59, 0x9d, 0x25, 0xf1, 0xcb, 0xfd, 0x65, 0x9e, 0x95, 0x99, 0xec, 0xc7, 0x69, 0xa9, - 0xf3, 0x34, 0x4a, 0x54, 0x01, 0x1e, 0x66, 0xb5, 0x0c, 0xa0, 0xf7, 0x24, 0x4b, 0xaa, 0x45, 0x5a, - 0x04, 0x62, 0xec, 0x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 0x00, 0xa4, 0x2d, 0x4c, 0x9c, 0x07, 0xd0, - 0x65, 0xc4, 0xd9, 0x5f, 0x0d, 0x64, 0x94, 0x37, 0x44, 0x9a, 0x42, 0x9f, 0x0f, 0xd4, 0xd8, 0x95, - 0x85, 0x68, 0x59, 0x90, 0x94, 0x9a, 0x75, 0x64, 0x4b, 0x63, 0x20, 0xef, 0xc1, 0x16, 0x66, 0xb5, - 0xab, 0xae, 0x41, 0xea, 0x6b, 0x80, 0xcf, 0xf3, 0xac, 0x5a, 0x9a, 0x06, 0x84, 0xd0, 0x65, 0xd4, - 0x64, 0x26, 0x5d, 0x66, 0xf6, 0xa3, 0x68, 0x0c, 0x6e, 0x6e, 0xe0, 0x49, 0xb5, 0xe0, 0x4f, 0x78, - 0x48, 0x47, 0x75, 0x00, 0xfd, 0x59, 0x94, 0xac, 0xb4, 0xb3, 0x28, 0xe1, 0x6c, 0x3d, 0xa4, 0xe3, - 0x7a, 0x14, 0xaf, 0x89, 0xa2, 0xbe, 0x82, 0x1d, 0x33, 0x9c, 0x34, 0x7a, 0x27, 0xba, 0xbc, 0x72, - 0x7b, 0xff, 0x6c, 0x64, 0xaf, 0xde, 0xe6, 0x8f, 0x02, 0x7c, 0xd2, 0x59, 0x95, 0x58, 0xa9, 0x68, - 0x78, 0x4e, 0x2f, 0x96, 0xba, 0x29, 0x87, 0xcf, 0x72, 0x0c, 0xc3, 0x93, 0x92, 0xe6, 0x79, 0x16, - 0x25, 0x95, 0x6e, 0x02, 0xb5, 0x45, 0xf2, 0x1d, 0xe8, 0x4f, 0xd2, 0xd2, 0xa8, 0x7d, 0x2e, 0x61, - 0x85, 0xe5, 0x7d, 0x18, 0x1c, 0x66, 0x59, 0x62, 0x94, 0xdd, 0xb1, 0x08, 0xfb, 0xe8, 0x04, 0x72, - 0x0f, 0xe0, 0x69, 0x92, 0x45, 0x8d, 0xef, 0xd6, 0x58, 0x84, 0x02, 0x5b, 0x12, 0xf5, 0x10, 0x7a, - 0x94, 0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7, 0xde, 0xff, 0xce, 0xb6, 0xf8, 0xef, 0xf6, 0x83, 0xbf, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xdd, 0x9e, 0xfe, 0xf7, 0xed, 0x0a, 0x00, 0x00, -} diff --git a/internal/public.proto b/internal/public.proto index a58c75e96..ed33a4cda 100644 --- a/internal/public.proto +++ b/internal/public.proto @@ -120,6 +120,7 @@ message ImportValueRequest { repeated string ColumnKeys = 7; repeated int64 Values = 6; repeated double FloatValues = 8; + repeated string StringValues = 9; } message TranslateKeysRequest { From 4d8f307c5e5df6de17141d08082b03a6e47fb0e7 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Sat, 4 Jan 2020 08:27:32 -0600 Subject: [PATCH 05/11] handle string values in ImportValueRequest sorting --- handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handler.go b/handler.go index cc3625c1a..0d2535884 100644 --- a/handler.go +++ b/handler.go @@ -132,6 +132,8 @@ func (ivr *ImportValueRequest) Swap(i, j int) { ivr.Values[i], ivr.Values[j] = ivr.Values[j], ivr.Values[i] } else if len(ivr.FloatValues) > 0 { ivr.FloatValues[i], ivr.FloatValues[j] = ivr.FloatValues[j], ivr.FloatValues[i] + } else if len(ivr.StringValues) > 0 { + ivr.StringValues[i], ivr.StringValues[j] = ivr.StringValues[j], ivr.StringValues[i] } } From 881d3bef06991f4590b696ef40e630ef4201b5ed Mon Sep 17 00:00:00 2001 From: Travis Date: Mon, 6 Jan 2020 23:19:38 -0600 Subject: [PATCH 06/11] Adjust the FieldOption logic to be in place prior to field.Open(). This commit changes the order of FieldOption application so that it's always set before field.Open() is called. This was required because field.Open() now uses some of the values from FieldOptions to determine if/when to use a particular translateStore. For example, when FieldOptions.ForeignIndex is set, the translateStore from the foreign index is retrieved during field.Open(). --- api.go | 11 +++---- ctl/import.go | 2 ++ executor.go | 12 -------- field.go | 68 +++++++++++++++++++++++++++++++++--------- field_internal_test.go | 2 +- index.go | 16 +++++----- 6 files changed, 68 insertions(+), 43 deletions(-) diff --git a/api.go b/api.go index a3fdc3b93..978f169f7 100644 --- a/api.go +++ b/api.go @@ -1084,13 +1084,10 @@ func (api *API) ImportValue(ctx context.Context, req *ImportValueRequest, opts . req.Shard = math.MaxUint64 } - // Translate values when the field has a ForeignIndex with keys. - if fidx := field.Options().ForeignIndex; fidx != "" { - foreignIndex := api.holder.Index(fidx) - if foreignIndex == nil { - return errors.Errorf("foreign index does not exist: %s", fidx) - } - uints, err := foreignIndex.translateStore.TranslateKeys(req.StringValues) + // Translate values when the field uses keys (for example, when + // the field has a ForeignIndex with keys). + if field.keys() { + uints, err := field.translateStore.TranslateKeys(req.StringValues) if err != nil { return errors.Wrap(err, "translating string values") } diff --git a/ctl/import.go b/ctl/import.go index 208eede07..32a49be49 100644 --- a/ctl/import.go +++ b/ctl/import.go @@ -108,6 +108,8 @@ func (cmd *ImportCommand) Run(ctx context.Context) error { cmd.FieldOptions.Type = pilosa.FieldTypeInt } else { cmd.FieldOptions.Type = pilosa.FieldTypeSet + cmd.FieldOptions.CacheType = pilosa.CacheTypeRanked + cmd.FieldOptions.CacheSize = pilosa.DefaultCacheSize } } err := cmd.ensureSchema(ctx) diff --git a/executor.go b/executor.go index a17897793..0b4d7d8e9 100644 --- a/executor.go +++ b/executor.go @@ -3623,18 +3623,6 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { if err := e.translateRowKey(c, field.translateStore, rowKey); err != nil { return errors.Wrap(err, "translating rowkey") } - } else if field.Options().ForeignIndex != "" { - // Get the foreign index. - fidx := field.Options().ForeignIndex - foreignIndex := e.Holder.Index(fidx) - if foreignIndex == nil { - return errors.Errorf("foreign index does not exist: %s", fidx) - } - if foreignIndex.Keys() { - if err := e.translateRowKey(c, foreignIndex.translateStore, rowKey); err != nil { - return errors.Wrap(err, "translating rowkey") - } - } } else { if isString(c.Args[rowKey]) { return errors.New("string 'row' value not allowed unless field 'keys' option enabled") diff --git a/field.go b/field.go index ffaacb39a..24249ee80 100644 --- a/field.go +++ b/field.go @@ -84,6 +84,15 @@ type Field struct { // Field options. options FieldOptions + // finalOptions is used with a final call to applyOptions. + // The initial call to applyOptions is made with options + // loaded from the meta file on disk (in the case when + // a field is being re-opened). If the field creator calls + // setOptions before calling Open(), then those options + // will be held in finalOptions, and applied instead of + // those from the meta file. + finalOptions *FieldOptions + bsiGroups []*bsiGroup // Shards with data on any node in the cluster, according to this node. @@ -94,6 +103,15 @@ type Field struct { snapshotQueue snapshotQueue // Instantiates new translation store on open. OpenTranslateStore OpenTranslateStoreFunc + + // Used for looking up a foreign index. + holder *Holder + + // Stores whether or not the field has keys enabled. + // This is most helpful for cases where the keys are + // based on a foreign index; this prevents having to + // call holder.index.Keys() every time. + usesKeys bool } // FieldOption is a functional option type for pilosa.fieldOptions. @@ -276,7 +294,7 @@ func newField(path, index, name string, opts FieldOption) (*Field, error) { broadcaster: NopBroadcaster, Stats: stats.NopStatsClient, - options: applyDefaultOptions(fo), + options: *applyDefaultOptions(&fo), remoteAvailableShards: roaring.NewBitmap(), @@ -473,7 +491,13 @@ func (f *Field) Open() error { return errors.Wrap(err, "loading available shards") } - // Apply the field options loaded from meta. + // If options were provided using setOptions(), then + // use those instead of the options from the meta file. + if f.finalOptions != nil { + f.options = *f.finalOptions + } + + // Apply the field options loaded from meta (or set via setOptions()). f.logger.Debugf("apply options for index/field: %s/%s", f.index, f.name) if err := f.applyOptions(f.options); err != nil { return errors.Wrap(err, "applying options") @@ -489,9 +513,22 @@ func (f *Field) Open() error { return errors.Wrap(err, "opening attrstore") } - // Instantiate & open translation store. - if f.translateStore, err = f.OpenTranslateStore(filepath.Join(f.path, "keys"), f.index, f.name); err != nil { - return errors.Wrap(err, "opening translate store") + // If the field has a foreign index, and that index uses keys, + // then use that index's translateStore instead. + if f.options.ForeignIndex != "" { + foreignIndex := f.holder.Index(f.options.ForeignIndex) + if foreignIndex == nil { + return errors.Errorf("foreign index does not exist: %s", f.options.ForeignIndex) + } else if foreignIndex.Keys() { + f.usesKeys = true + f.translateStore = foreignIndex.translateStore + } + } else { + // Instantiate & open translation store. + if f.translateStore, err = f.OpenTranslateStore(filepath.Join(f.path, "keys"), f.index, f.name); err != nil { + return errors.Wrap(err, "opening translate store") + } + f.usesKeys = f.options.Keys } return nil @@ -641,6 +678,11 @@ func (f *Field) saveMeta() error { return nil } +// setOptions saves options for final application during Open(). +func (f *Field) setOptions(opts *FieldOptions) { + f.finalOptions = applyDefaultOptions(opts) +} + // applyOptions configures the field based on opt. func (f *Field) applyOptions(opt FieldOptions) error { switch opt.Type { @@ -760,7 +802,7 @@ func (f *Field) Close() error { func (f *Field) keys() bool { f.mu.RLock() defer f.mu.RUnlock() - return f.options.Keys + return f.usesKeys } // bsiGroup returns a bsiGroup by name. @@ -1604,15 +1646,13 @@ type FieldOptions struct { ForeignIndex string `json:"foreignIndex"` } -// applyDefaultOptions returns a new FieldOptions object -// with default values if o does not contain a valid type. -func applyDefaultOptions(o FieldOptions) FieldOptions { +// applyDefaultOptions updates FieldOptions with the default +// values if o does not contain a valid type. +func applyDefaultOptions(o *FieldOptions) *FieldOptions { if o.Type == "" { - return FieldOptions{ - Type: DefaultFieldType, - CacheType: DefaultCacheType, - CacheSize: DefaultCacheSize, - } + o.Type = DefaultFieldType + o.CacheType = DefaultCacheType + o.CacheSize = DefaultCacheSize } return o } diff --git a/field_internal_test.go b/field_internal_test.go index 41cb5832b..fd8786246 100644 --- a/field_internal_test.go +++ b/field_internal_test.go @@ -516,7 +516,7 @@ func TestField_ApplyOptions(t *testing.T) { } { fld := &Field{} - fld.options = applyDefaultOptions(FieldOptions{}) + fld.options = *applyDefaultOptions(&FieldOptions{}) if err := fld.applyOptions(tt.opts); err != nil { t.Fatal(err) diff --git a/index.go b/index.go index a6a9e3070..ed05ca6bc 100644 --- a/index.go +++ b/index.go @@ -61,6 +61,7 @@ type Index struct { snapshotQueue snapshotQueue // Used for notifying holder when a field is added. + // Also passed to field for foreign-index lookup. holder *Holder // Instantiates new translation stores for fields. @@ -426,20 +427,17 @@ func (i *Index) createField(name string, opt FieldOptions) (*Field, error) { return nil, errors.Wrap(err, "initializing") } + // Pass holder through to the field for use in looking + // up a foreign index. + f.holder = i.holder + + f.setOptions(&opt) + // Open field. if err := f.Open(); err != nil { return nil, errors.Wrap(err, "opening") } - // Apply field options. - // This is already happening in f.Open() just before this, but in - // that case, the options being applied are those read from the meta - // file on disk. - if err := f.applyOptions(opt); err != nil { - f.Close() - return nil, errors.Wrap(err, "applying options") - } - if err := f.saveMeta(); err != nil { f.Close() return nil, errors.Wrap(err, "saving meta") From 35f9dfa3745c26183050c7d45e0e35381fa006fc Mon Sep 17 00:00:00 2001 From: Travis Date: Mon, 6 Jan 2020 23:40:48 -0600 Subject: [PATCH 07/11] remove write portion of extension data race --- server.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.go b/server.go index af5dd7b32..96b422cfe 100644 --- a/server.go +++ b/server.go @@ -446,8 +446,6 @@ func (s *Server) loadExtension(extInfo *ext.ExtensionInfo) error { bitmapOps := extInfo.BitmapOps bmOps, countOps, fieldOps, unknownOps := 0, 0, 0, 0 for i := range bitmapOps { - // title-case the name - bitmapOps[i].Name = strings.Title(bitmapOps[i].Name) typ := bitmapOps[i].Func.BitmapOpType() switch { case typ.Input == ext.OpInputBitmap && typ.Output == ext.OpOutputCount: From 742135dc10210c9dcb5fbfe278262b9f9fdb6d27 Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 8 Jan 2020 15:23:53 -0600 Subject: [PATCH 08/11] Get ForeignIndex string value when reading BSI field. In the `Inspect` function in `server/grpc.go`, getting the value of an `int` field with a foreign index to an index with `Keys()`, we need to return the string key value instead of the BSI int value for the field. This commit also changes the method `Field.keys()` to be exported as `Field.Keys()` so that it's accessible in the server package. --- api.go | 8 +++--- executor.go | 12 ++++----- field.go | 40 ++++++++++++++++++++++++++--- index.go | 4 +++ server/grpc.go | 69 +++++++++++++++++++++++++++++++++++--------------- 5 files changed, 100 insertions(+), 33 deletions(-) diff --git a/api.go b/api.go index 978f169f7..0fbc7ae7f 100644 --- a/api.go +++ b/api.go @@ -544,7 +544,7 @@ func (api *API) ExportCSV(ctx context.Context, indexName string, fieldName strin var colStr string var err error - if field.keys() { + if field.Keys() { if rowStr, err = field.translateStore.TranslateID(rowID); err != nil { return errors.Wrap(err, "translating row") } @@ -959,7 +959,7 @@ func (api *API) Import(ctx context.Context, req *ImportRequest, opts ...ImportOp // check to see if keys need translation. if !options.IgnoreKeyCheck { // Translate row keys. - if field.keys() { + if field.Keys() { if len(req.RowIDs) != 0 { return errors.New("row ids cannot be used because field uses string keys") } @@ -980,7 +980,7 @@ func (api *API) Import(ctx context.Context, req *ImportRequest, opts ...ImportOp // For translated data, map the columnIDs to shards. If // this node does not own the shard, forward to the node that does. - if index.Keys() || field.keys() { + if index.Keys() || field.Keys() { m := make(map[uint64][]Bit) for i, colID := range req.ColumnIDs { @@ -1086,7 +1086,7 @@ func (api *API) ImportValue(ctx context.Context, req *ImportValueRequest, opts . // Translate values when the field uses keys (for example, when // the field has a ForeignIndex with keys). - if field.keys() { + if field.Keys() { uints, err := field.translateStore.TranslateKeys(req.StringValues) if err != nil { return errors.Wrap(err, "translating string values") diff --git a/executor.go b/executor.go index 0b4d7d8e9..b6d62ca03 100644 --- a/executor.go +++ b/executor.go @@ -3619,7 +3619,7 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { } c.Args[rowKey] = rowID } - } else if field.keys() { + } else if field.Keys() { if err := e.translateRowKey(c, field.translateStore, rowKey); err != nil { return errors.Wrap(err, "translating rowkey") } @@ -3744,7 +3744,7 @@ func (e *executor) translateGroupByCall(index string, idx *Index, c *pql.Call) e for i, field := range fields { prev := previous[i] - if field.keys() { + if field.Keys() { prevStr, ok := prev.(string) if !ok { return errors.New("prev value must be a string when field 'keys' option enabled") @@ -3841,7 +3841,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if field == nil { return nil, fmt.Errorf("field %q not found", fieldName) } - if field.keys() { + if field.Keys() { key, err := field.translateStore.TranslateID(result.Pair.ID) if err != nil { return nil, err @@ -3863,7 +3863,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if field == nil { return nil, fmt.Errorf("field %q not found", fieldName) } - if field.keys() { + if field.Keys() { other := make([]Pair, len(result.Pairs)) for i := range result.Pairs { key, err := field.translateStore.TranslateID(result.Pairs[i].ID) @@ -3892,7 +3892,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if field == nil { return nil, ErrFieldNotFound } - if field.keys() { + if field.Keys() { key, err := field.translateStore.TranslateID(g.RowID) if err != nil { return nil, errors.Wrap(err, "translating row ID in Group") @@ -3921,7 +3921,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if field := idx.Field(fieldName); field == nil { return nil, ErrFieldNotFound - } else if field.keys() { + } else if field.Keys() { other.Keys = make([]string, len(result)) for i, id := range result { key, err := field.translateStore.TranslateID(id) diff --git a/field.go b/field.go index 24249ee80..800c998a0 100644 --- a/field.go +++ b/field.go @@ -798,8 +798,8 @@ func (f *Field) Close() error { return nil } -// keys returns true if the field uses string keys. -func (f *Field) keys() bool { +// Keys returns true if the field uses string keys. +func (f *Field) Keys() bool { f.mu.RLock() defer f.mu.RUnlock() return f.usesKeys @@ -1156,6 +1156,21 @@ func (f *Field) allTimeViewsSortedByQuantum() (me []*view) { return me } +// StringValue reads an integer field value for a column, and converts +// it to a string based on a foreign index string key. +func (f *Field) StringValue(columnID uint64) (value string, exists bool, err error) { + bsig := f.bsiGroup(f.name) + if bsig == nil { + return value, false, ErrBSIGroupNotFound + } + + val, exists, err := f.Value(columnID) + if exists { + value, err = f.translateStore.TranslateID(uint64(val)) + } + return value, exists, err +} + // FloatValue reads an integer field value for a column, and converts // it to a float based on the configured scale. func (f *Field) FloatValue(columnID uint64) (value float64, exists bool, err error) { @@ -1678,6 +1693,7 @@ func encodeFieldOptions(o *FieldOptions) *internal.FieldOptions { TimeQuantum: string(o.TimeQuantum), Keys: o.Keys, NoStandardView: o.NoStandardView, + ForeignIndex: o.ForeignIndex, } } @@ -1698,7 +1714,25 @@ func (o *FieldOptions) MarshalJSON() ([]byte, error) { o.CacheSize, o.Keys, }) - case FieldTypeInt, FieldTypeDecimal: + case FieldTypeInt: + return json.Marshal(struct { + Type string `json:"type"` + Base int64 `json:"base"` + BitDepth uint `json:"bitDepth"` + Min int64 `json:"min"` + Max int64 `json:"max"` + Keys bool `json:"keys"` + ForeignIndex string `json:"foreignIndex"` + }{ + o.Type, + o.Base, + o.BitDepth, + o.Min, + o.Max, + o.Keys, + o.ForeignIndex, + }) + case FieldTypeDecimal: return json.Marshal(struct { Type string `json:"type"` Base int64 `json:"base"` diff --git a/index.go b/index.go index ed05ca6bc..c0659f733 100644 --- a/index.go +++ b/index.go @@ -198,6 +198,10 @@ fileLoop: return errors.Wrapf(ErrName, "'%s'", fi.Name()) } + // Pass holder through to the field for use in looking + // up a foreign index. + fld.holder = i.holder + if err := fld.Open(); err != nil { return fmt.Errorf("open field: name=%s, err=%s", fld.Name(), err) } diff --git a/server/grpc.go b/server/grpc.go index a0030d6f5..6ffedfff3 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -80,12 +80,14 @@ func (h grpcHandler) QueryPQL(req *pb.QueryPQLRequest, stream pb.Pilosa_QueryPQL func fieldDataType(f *pilosa.Field) string { switch f.Type() { case "set", "mutex": - if f.Options().Keys { + if f.Keys() { return "[]string" - } else { - return "[]uint64" } + return "[]uint64" case "int": + if f.Keys() { + return "string" + } return "int64" case "decimal": return "float64" @@ -128,7 +130,7 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer } offset := req.Offset - if !index.Options().Keys { + if !index.Keys() { ints, ok := req.Columns.Type.(*pb.IdsOrKeys_Ids) if !ok { return errors.New("invalid int columns") @@ -243,15 +245,28 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer } case "int": - value, exists, err := field.Value(col) - if err != nil { - return errors.Wrap(err, "getting int field value for column") - } else if exists { - rowResp.Columns = append(rowResp.Columns, - &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_Int64Val{Int64Val: value}}) + if field.Keys() { + value, exists, err := field.StringValue(col) + if err != nil { + return errors.Wrap(err, "getting string field value for column") + } else if exists { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_StringVal{StringVal: value}}) + } else { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: nil}) + } } else { - rowResp.Columns = append(rowResp.Columns, - &pb.ColumnResponse{ColumnVal: nil}) + value, exists, err := field.Value(col) + if err != nil { + return errors.Wrap(err, "getting int field value for column") + } else if exists { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_Int64Val{Int64Val: value}}) + } else { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: nil}) + } } case "decimal": @@ -426,16 +441,30 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer return errors.Wrap(err, "translating column key") } - value, exists, err := field.Value(id) - if err != nil { - return errors.Wrap(err, "getting int field value for column") - } else if exists { - rowResp.Columns = append(rowResp.Columns, - &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_Int64Val{Int64Val: value}}) + if field.Keys() { + value, exists, err := field.StringValue(id) + if err != nil { + return errors.Wrap(err, "getting string field value for column") + } else if exists { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_StringVal{StringVal: value}}) + } else { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: nil}) + } } else { - rowResp.Columns = append(rowResp.Columns, - &pb.ColumnResponse{ColumnVal: nil}) + value, exists, err := field.Value(id) + if err != nil { + return errors.Wrap(err, "getting int field value for column") + } else if exists { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_Int64Val{Int64Val: value}}) + } else { + rowResp.Columns = append(rowResp.Columns, + &pb.ColumnResponse{ColumnVal: nil}) + } } + case "decimal": // Translate column key. id, err := index.TranslateStore().TranslateKey(col) From f79fde43e324e6eaf831217295546970ceb14590 Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 8 Jan 2020 15:46:42 -0600 Subject: [PATCH 09/11] exclude internal fields (i.e. _exists) from Inspect output --- server/grpc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/grpc.go b/server/grpc.go index 6ffedfff3..223c50eec 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -19,6 +19,7 @@ import ( "crypto/tls" "fmt" "net" + "strings" "github.com/pilosa/pilosa/v2" "github.com/pilosa/pilosa/v2/logger" @@ -111,6 +112,10 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer var fields []*pilosa.Field for _, field := range index.Fields() { + // exclude internal fields (starting with "_") + if strings.HasPrefix(field.Name(), "_") { + continue + } if len(req.FilterFields) > 0 { for _, filter := range req.FilterFields { if filter == field.Name() { From 3d3286a9ca4a299e8fe280778b994ac509a62ddc Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 8 Jan 2020 16:43:17 -0600 Subject: [PATCH 10/11] fix an issue caused by empty column list defaulting to IDs --- server/grpc.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server/grpc.go b/server/grpc.go index 223c50eec..60e7dcc29 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -326,10 +326,19 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer } } else { - keys, ok := req.Columns.Type.(*pb.IdsOrKeys_Keys) - if !ok { + var cols []string + + switch keys := req.Columns.Type.(type) { + case *pb.IdsOrKeys_Ids: + // The default behavior (in api/client/grpc.go) is to + // send an empty set of Ids even if the index supports + // keys, so in that case we just need to ignore it. + case *pb.IdsOrKeys_Keys: + cols = keys.Keys.Vals + default: return errToStatusError(errors.New("invalid key columns")) } + ci := []*pb.ColumnInfo{ {Name: "_id", Datatype: "string"}, } @@ -339,7 +348,6 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer // If Columns is empty, then get the _exists list (via All()), // from the index and loop over that instead. - cols := keys.Keys.Vals if len(cols) > 0 { // Apply limit/offset to the provided columns. if int(offset) >= len(cols) { From a6a2f84bd54bd2d40cc66b0013dc2737061e48f8 Mon Sep 17 00:00:00 2001 From: Travis Date: Thu, 9 Jan 2020 11:51:06 -0600 Subject: [PATCH 11/11] During Holder.Open, apply foreign index after all indexes open In the case where a field with a foreign index opens before the foreign index has opened (and is available as a reference in the holder), push the field into a queue to have its foreign index applied once all indexes have opened. --- executor.go | 11 ++-------- field.go | 43 +++++++++++++++++++++++++++--------- holder.go | 48 ++++++++++++++++++++++++++++++++++++++++ holder_test.go | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ pilosa.go | 2 ++ 5 files changed, 144 insertions(+), 19 deletions(-) diff --git a/executor.go b/executor.go index b6d62ca03..b8fa0b5d5 100644 --- a/executor.go +++ b/executor.go @@ -3802,15 +3802,8 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if fieldName := callArgString(call, "field"); fieldName != "" { field := idx.Field(fieldName) - if field != nil { - // Get the foreign index. - if fidx := field.Options().ForeignIndex; fidx != "" { - foreignIndex := e.Holder.Index(fidx) - if foreignIndex == nil { - return nil, errors.Errorf("foreign index does not exist: %s", fidx) - } - store = foreignIndex.translateStore - } + if field != nil && field.Keys() { + store = field.TranslateStore() } } diff --git a/field.go b/field.go index 800c998a0..884b45a7a 100644 --- a/field.go +++ b/field.go @@ -516,19 +516,13 @@ func (f *Field) Open() error { // If the field has a foreign index, and that index uses keys, // then use that index's translateStore instead. if f.options.ForeignIndex != "" { - foreignIndex := f.holder.Index(f.options.ForeignIndex) - if foreignIndex == nil { - return errors.Errorf("foreign index does not exist: %s", f.options.ForeignIndex) - } else if foreignIndex.Keys() { - f.usesKeys = true - f.translateStore = foreignIndex.translateStore + if err := f.holder.checkForeignIndex(f); err != nil { + return errors.Wrap(err, "checking foreign index") } } else { - // Instantiate & open translation store. - if f.translateStore, err = f.OpenTranslateStore(filepath.Join(f.path, "keys"), f.index, f.name); err != nil { - return errors.Wrap(err, "opening translate store") + if err := f.applyTranslateStore(); err != nil { + return errors.Wrap(err, "applying translate store") } - f.usesKeys = f.options.Keys } return nil @@ -541,6 +535,35 @@ func (f *Field) Open() error { return nil } +// applyTranslateStore opens the configured translate store. +func (f *Field) applyTranslateStore() error { + // Instantiate & open translation store. + var err error + f.translateStore, err = f.OpenTranslateStore(filepath.Join(f.path, "keys"), f.index, f.name) + if err != nil { + return errors.Wrap(err, "opening translate store") + } + f.usesKeys = f.options.Keys + return nil +} + +// applyForeignIndex sets the field's translateStore +// to that of a foreign index in the case where the +// foreign index uses keys. If the foreign index does +// not use keys, it falls back to applying the field's +// default translate store. +func (f *Field) applyForeignIndex() error { + foreignIndex := f.holder.Index(f.options.ForeignIndex) + if foreignIndex == nil { + return errors.Wrapf(ErrForeignIndexNotFound, "%s", f.options.ForeignIndex) + } else if foreignIndex.Keys() { + f.usesKeys = true + f.translateStore = foreignIndex.translateStore + return nil + } + return f.applyTranslateStore() +} + var fieldQueue = make(chan struct{}, 16) // openViews opens and initializes the views inside the field. diff --git a/holder.go b/holder.go index 5045bff4d..9cd93bd3e 100644 --- a/holder.go +++ b/holder.go @@ -84,6 +84,16 @@ type Holder struct { // Instantiates new translation stores for indexes & fields. OpenTranslateStore OpenTranslateStoreFunc // local store OpenTranslateReader OpenTranslateReaderFunc // replication + + // Queue of fields (having a foreign index) which have + // opened before their foreign index has opened. + foreignIndexFields []*Field + + // opening is set to true while Holder is opening. + // It's used to determine if foreign index application + // needs to be queued and completed after all indexes + // have opened. + opening bool } // lockedChan looks a little ridiculous admittedly, but exists for good reason. @@ -135,6 +145,9 @@ func NewHolder() *Holder { // Open initializes the root data directory for the holder. func (h *Holder) Open() error { + h.opening = true + defer func() { h.opening = false }() + // Reset closing in case Holder is being reopened. h.closing = make(chan struct{}) @@ -196,6 +209,14 @@ func (h *Holder) Open() error { h.indexes[index.Name()] = index h.mu.Unlock() } + + // If any fields were opened before their foreign index + // was opened, it's safe to process those now since all index + // opens have completed by this point. + if err := h.processForeignIndexFields(); err != nil { + return errors.Wrap(err, "processing foreign index fields") + } + h.Logger.Printf("open holder: complete") // Periodically flush cache. @@ -209,6 +230,33 @@ func (h *Holder) Open() error { return nil } +// checkForeignIndex is a check before applying a foreign +// index to a field; if the index is not yet available, +// (because holder is still opening and may not have opened +// the index yet), this method queues it up to be processed +// once all indexes have been opened. +func (h *Holder) checkForeignIndex(f *Field) error { + if h.opening { + if fi := h.Index(f.options.ForeignIndex); fi == nil { + h.foreignIndexFields = append(h.foreignIndexFields, f) + return nil + } + } + return f.applyForeignIndex() +} + +// processForeignIndexFields applies a foreign index to any +// fields which were opened before their foreign index. +func (h *Holder) processForeignIndexFields() error { + for _, f := range h.foreignIndexFields { + if err := f.applyForeignIndex(); err != nil { + return errors.Wrap(err, "applying foreign index") + } + } + h.foreignIndexFields = h.foreignIndexFields[:0] // reset + return nil +} + // Close closes all open fragments. func (h *Holder) Close() error { h.Stats.Close() diff --git a/holder_test.go b/holder_test.go index 09ec03d97..6d2c5f0c7 100644 --- a/holder_test.go +++ b/holder_test.go @@ -26,6 +26,7 @@ import ( "github.com/pilosa/pilosa/v2" "github.com/pilosa/pilosa/v2/test" + "github.com/pkg/errors" ) func TestHolder_Open(t *testing.T) { @@ -217,6 +218,64 @@ func TestHolder_Open(t *testing.T) { t.Fatalf("unexpected error: %s", err) } }) + + t.Run("ForeignIndex", func(t *testing.T) { + t.Run("ErrForeignIndexNotFound", func(t *testing.T) { + h := test.MustOpenHolder() + defer h.Close() + + if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + t.Fatal(err) + } else { + _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("nonexistent")) + if err == nil { + t.Fatalf("expected error: %s", pilosa.ErrForeignIndexNotFound) + } else if errors.Cause(err) != pilosa.ErrForeignIndexNotFound { + t.Fatalf("expected error: %s, but got: %s", pilosa.ErrForeignIndexNotFound, err) + } + } + }) + + // Foreign index zzz is opened after foo/bar. + t.Run("ForeignIndexNotOpenYet", func(t *testing.T) { + h := test.MustOpenHolder() + defer h.Close() + + if _, err := h.CreateIndex("zzz", pilosa.IndexOptions{}); err != nil { + t.Fatal(err) + } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + t.Fatal(err) + } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("zzz")); err != nil { + t.Fatal(err) + } else if err := h.Holder.Close(); err != nil { + t.Fatal(err) + } + + if err := h.Reopen(); err != nil { + t.Fatalf("unexpected error: %s", err) + } + }) + + // Foreign index aaa is opened before foo/bar. + t.Run("ForeignIndexIsOpen", func(t *testing.T) { + h := test.MustOpenHolder() + defer h.Close() + + if _, err := h.CreateIndex("aaa", pilosa.IndexOptions{}); err != nil { + t.Fatal(err) + } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + t.Fatal(err) + } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("aaa")); err != nil { + t.Fatal(err) + } else if err := h.Holder.Close(); err != nil { + t.Fatal(err) + } + + if err := h.Reopen(); err != nil { + t.Fatalf("unexpected error: %s", err) + } + }) + }) } func TestHolder_HasData(t *testing.T) { diff --git a/pilosa.go b/pilosa.go index 61f3cde53..3f1e8545b 100644 --- a/pilosa.go +++ b/pilosa.go @@ -29,6 +29,8 @@ var ( ErrIndexExists = errors.New("index already exists") ErrIndexNotFound = errors.New("index not found") + ErrForeignIndexNotFound = errors.New("foreign index not found") + // ErrFieldRequired is returned when no field is specified. ErrFieldRequired = errors.New("field required") ErrFieldExists = errors.New("field already exists")