diff --git a/api.go b/api.go index 0fbc7ae7f..1ffbc7df6 100644 --- a/api.go +++ b/api.go @@ -545,7 +545,8 @@ func (api *API) ExportCSV(ctx context.Context, indexName string, fieldName strin var err error if field.Keys() { - if rowStr, err = field.translateStore.TranslateID(rowID); err != nil { + // TODO: handle case: field.ForeignIndex + if rowStr, err = field.TranslateStore().TranslateID(rowID); err != nil { return errors.Wrap(err, "translating row") } } else { @@ -553,7 +554,9 @@ func (api *API) ExportCSV(ctx context.Context, indexName string, fieldName strin } if index.Keys() { - if colStr, err = index.translateStore.TranslateID(columnID); err != nil { + if store := index.TranslateStore(api.cluster.idPartition(indexName, columnID)); store == nil { + return errors.Wrap(err, "partition does not exist") + } else if colStr, err = store.TranslateID(columnID); err != nil { return errors.Wrap(err, "translating column") } } else { @@ -963,7 +966,7 @@ func (api *API) Import(ctx context.Context, req *ImportRequest, opts ...ImportOp if len(req.RowIDs) != 0 { return errors.New("row ids cannot be used because field uses string keys") } - if req.RowIDs, err = field.translateStore.TranslateKeys(req.RowKeys); err != nil { + if req.RowIDs, err = field.TranslateStore().TranslateKeys(req.RowKeys); err != nil { return errors.Wrap(err, "translating rows") } } @@ -973,7 +976,7 @@ func (api *API) Import(ctx context.Context, req *ImportRequest, opts ...ImportOp if len(req.ColumnIDs) != 0 { return errors.New("column ids cannot be used because index uses string keys") } - if req.ColumnIDs, err = index.translateStore.TranslateKeys(req.ColumnKeys); err != nil { + if req.ColumnIDs, err = api.cluster.translateIndexKeys(ctx, req.Index, req.ColumnKeys); err != nil { return errors.Wrap(err, "translating columns") } } @@ -1078,7 +1081,7 @@ func (api *API) ImportValue(ctx context.Context, req *ImportValueRequest, opts . if len(req.ColumnIDs) != 0 { return errors.New("column ids cannot be used because index uses string keys") } - if req.ColumnIDs, err = index.translateStore.TranslateKeys(req.ColumnKeys); err != nil { + if req.ColumnIDs, err = api.cluster.translateIndexKeys(ctx, req.Index, req.ColumnKeys); err != nil { return errors.Wrap(err, "translating columns") } req.Shard = math.MaxUint64 @@ -1087,12 +1090,14 @@ 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() { - uints, err := field.translateStore.TranslateKeys(req.StringValues) + // Perform translation. + uints, err := api.cluster.translateIndexKeys(ctx, field.ForeignIndex(), req.StringValues) if err != nil { - return errors.Wrap(err, "translating string values") + return err } - // Because the BSI field supports negative value, we have to - // convert the slice of uint64 keys to a slice of int64. + + // Because the BSI field supports negative values, we have to + // convert the uint64 keys to a slice of int64. ints := make([]int64, len(uints)) for i := range uints { ints[i] = int64(uints[i]) @@ -1384,14 +1389,75 @@ func (api *API) Info() serverInfo { } // GetTranslateEntryReader provides an entry reader for key translation logs starting at offset. -func (api *API) GetTranslateEntryReader(ctx context.Context, offsets TranslateOffsetMap) (TranslateEntryReader, error) { +func (api *API) GetTranslateEntryReader(ctx context.Context, offsets TranslateOffsetMap) (_ TranslateEntryReader, err error) { span, ctx := tracing.StartSpanFromContext(ctx, "API.GetTranslateEntryReader") defer span.Finish() - return api.holder.TranslateEntryReader(ctx, offsets) + + // Ensure all readers are cleaned up if any error. + var a []TranslateEntryReader + defer func() { + if err != nil { + for i := range a { + a[i].Close() + } + } + }() + + // Fetch all index partition readers. + for indexName, indexMap := range offsets { + index := api.holder.Index(indexName) + if index == nil { + return nil, ErrIndexNotFound + } + + for partitionID, offset := range indexMap.Partitions { + store := index.TranslateStore(partitionID) + if store == nil { + return nil, ErrTranslateStoreNotFound + } + + r, err := store.EntryReader(ctx, uint64(offset)) + if err != nil { + return nil, errors.Wrap(err, "index partition translate reader") + } + a = append(a, r) + } + } + + // Fetch all field readers. + for indexName, indexMap := range offsets { + index := api.holder.Index(indexName) + if index == nil { + return nil, ErrIndexNotFound + } + + for fieldName, offset := range indexMap.Fields { + field := index.Field(fieldName) + if field == nil { + return nil, ErrIndexNotFound + } + + r, err := field.TranslateStore().EntryReader(ctx, uint64(offset)) + if err != nil { + return nil, errors.Wrap(err, "field translate reader") + } + a = append(a, r) + } + } + + return NewMultiTranslateEntryReader(ctx, a), nil +} + +func (api *API) TranslateIndexKey(ctx context.Context, indexName string, key string) (uint64, error) { + return api.cluster.translateIndexKey(ctx, indexName, key) +} + +func (api *API) TranslateIndexIDs(ctx context.Context, indexName string, ids []uint64) ([]string, error) { + return api.cluster.translateIndexIDs(ctx, indexName, ids) } // TranslateKeys handles a TranslateKeyRequest. -func (api *API) TranslateKeys(r io.Reader) ([]byte, error) { +func (api *API) TranslateKeys(ctx context.Context, r io.Reader) (_ []byte, err error) { var req TranslateKeysRequest if buf, err := ioutil.ReadAll(r); err != nil { return nil, NewBadRequestError(errors.Wrap(err, "read translate keys request error")) @@ -1400,13 +1466,22 @@ func (api *API) TranslateKeys(r io.Reader) ([]byte, error) { } // Lookup store for either index or field and translate keys. - store, err := api.holder.TranslateStore(req.Index, req.Field) - if err != nil { - return nil, err - } - ids, err := store.TranslateKeys(req.Keys) - if err != nil { - return nil, err + var ids []uint64 + if req.Field == "" { + if ids, err = api.cluster.translateIndexKeys(ctx, req.Index, req.Keys); err != nil { + return nil, err + } + } else { + if field := api.holder.Field(req.Index, req.Field); field == nil { + return nil, ErrFieldNotFound + } else if fi := field.ForeignIndex(); fi != "" { + ids, err = api.cluster.translateIndexKeys(ctx, fi, req.Keys) + if err != nil { + return nil, err + } + } else if ids, err = field.TranslateStore().TranslateKeys(req.Keys); err != nil { + return nil, err + } } // Encode response. @@ -1417,6 +1492,42 @@ func (api *API) TranslateKeys(r io.Reader) ([]byte, error) { return buf, nil } +// TranslateIDs handles a TranslateIDRequest. +func (api *API) TranslateIDs(ctx context.Context, r io.Reader) (_ []byte, err error) { + var req TranslateIDsRequest + if buf, err := ioutil.ReadAll(r); err != nil { + return nil, NewBadRequestError(errors.Wrap(err, "read translate ids request error")) + } else if err := api.Serializer.Unmarshal(buf, &req); err != nil { + return nil, NewBadRequestError(errors.Wrap(err, "unmarshal translate ids request error")) + } + + // Lookup store for either index or field and translate ids. + var keys []string + if req.Field == "" { + if keys, err = api.cluster.translateIndexIDs(ctx, req.Index, req.IDs); err != nil { + return nil, err + } + } else { + if field := api.holder.Field(req.Index, req.Field); field == nil { + return nil, ErrFieldNotFound + } else if fi := field.ForeignIndex(); fi != "" { + keys, err = api.cluster.translateIndexIDs(ctx, fi, req.IDs) + if err != nil { + return nil, err + } + } else if keys, err = field.TranslateStore().TranslateIDs(req.IDs); err != nil { + return nil, err + } + } + + // Encode response. + buf, err := api.Serializer.Marshal(&TranslateIDsResponse{Keys: keys}) + if err != nil { + return nil, errors.Wrap(err, "translate ids response encoding error") + } + return buf, nil +} + // PrimaryReplicaNodeURL returns the URL of the cluster's primary replica. func (api *API) PrimaryReplicaNodeURL() url.URL { node := api.cluster.PrimaryReplicaNode() diff --git a/api_test.go b/api_test.go index 7e94ebee1..955f01f81 100644 --- a/api_test.go +++ b/api_test.go @@ -203,14 +203,15 @@ func TestAPI_Import(t *testing.T) { // Generate some keyed records. rowIDs := []uint64{} - colKeys := []string{} timestamps := []int64{} for i := 1; i <= 10; i++ { rowIDs = append(rowIDs, rowID) timestamps = append(timestamps, timestamp) - colKeys = append(colKeys, fmt.Sprintf("col%d", i)) } + // Keys are sharded so ordering is not guaranteed. + colKeys := []string{"col10", "col8", "col9", "col6", "col7", "col4", "col5", "col2", "col3", "col1"} + // 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.ImportRequest{ @@ -261,63 +262,6 @@ func TestAPI_Import(t *testing.T) { } }) - - t.Run("RowKeyColumnID", func(t *testing.T) { - ctx := context.Background() - index := "rkci" - field := "f" - - _, err := m0.API.CreateIndex(ctx, index, pilosa.IndexOptions{Keys: false}) - if err != nil { - t.Fatalf("creating index: %v", err) - } - _, err = m0.API.CreateField(ctx, index, field, pilosa.OptFieldTypeSet(pilosa.DefaultCacheType, 100), pilosa.OptFieldKeys()) - if err != nil { - t.Fatalf("creating field: %v", err) - } - - rowKey := "rowkey" - - // Generate some keyed records. - rowKeys := []string{rowKey, rowKey, rowKey} - colIDs := []uint64{1, 2, pilosa.ShardWidth + 1} - timestamps := []int64{0, 0, 0} - - // 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.ImportRequest{ - Index: index, - Field: field, - Shard: 0, - RowKeys: rowKeys, - ColumnIDs: colIDs, - Timestamps: timestamps, - } - if err := m0.API.Import(ctx, req); err != nil { - t.Fatal(err) - } - - pql := fmt.Sprintf("Row(%s=%s)", field, rowKey) - - // Query node0. - if res, err := m0.API.Query(ctx, &pilosa.QueryRequest{Index: index, Query: pql}); err != nil { - t.Fatal(err) - } else if columns := res.Results[0].(*pilosa.Row).Columns(); !reflect.DeepEqual(columns, colIDs) { - t.Fatalf("unexpected column ids: %+v", columns) - } - - // Query node1. - if err := test.RetryUntil(5*time.Second, func() error { - if res, err := m1.API.Query(ctx, &pilosa.QueryRequest{Index: index, Query: pql}); err != nil { - return err - } else if columns := res.Results[0].(*pilosa.Row).Columns(); !reflect.DeepEqual(columns, colIDs) { - return fmt.Errorf("unexpected column ids: %+v", columns) - } - return nil - }); err != nil { - t.Fatal(err) - } - }) } func TestAPI_ImportValue(t *testing.T) { @@ -356,12 +300,13 @@ func TestAPI_ImportValue(t *testing.T) { // Generate some keyed records. values := []int64{} - colKeys := []string{} for i := 1; i <= 10; i++ { values = append(values, int64(i)) - colKeys = append(colKeys, fmt.Sprintf("col%d", i)) } + // Column keys are sharded so their order is not guaranteed. + colKeys := []string{"col10", "col8", "col9", "col6", "col7", "col4", "col5", "col2", "col3", "col1"} + // 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{ diff --git a/boltdb/translate.go b/boltdb/translate.go index bca1e5f92..0c67e74bc 100644 --- a/boltdb/translate.go +++ b/boltdb/translate.go @@ -32,8 +32,8 @@ var ( ) // OpenTranslateStore opens and initializes a boltdb translation store. -func OpenTranslateStore(path, index, field string) (pilosa.TranslateStore, error) { - s := NewTranslateStore(index, field) +func OpenTranslateStore(path, index, field string, partitionID, partitionN int) (pilosa.TranslateStore, error) { + s := NewTranslateStore(index, field, partitionID, partitionN) s.Path = path if err := s.Open(); err != nil { return nil, err @@ -49,8 +49,10 @@ type TranslateStore struct { mu sync.RWMutex db *bolt.DB - index string - field string + index string + field string + partitionID int + partitionN int once sync.Once closing chan struct{} @@ -63,10 +65,12 @@ type TranslateStore struct { } // NewTranslateStore returns a new instance of TranslateStore. -func NewTranslateStore(index, field string) *TranslateStore { +func NewTranslateStore(index, field string, partitionID, partitionN int) *TranslateStore { return &TranslateStore{ index: index, field: field, + partitionID: partitionID, + partitionN: partitionN, closing: make(chan struct{}), writeNotify: make(chan struct{}), } @@ -108,6 +112,11 @@ func (s *TranslateStore) Close() (err error) { return nil } +// PartitionID returns the partition id the store was initialized with. +func (s *TranslateStore) PartitionID() int { + return s.partitionID +} + // ReadOnly returns true if the store is in read-only mode. func (s *TranslateStore) ReadOnly() bool { s.mu.RLock() @@ -158,9 +167,10 @@ func (s *TranslateStore) TranslateKey(key string) (id uint64, _ error) { bkt := tx.Bucket([]byte("keys")) if id = findIDByKey(bkt, key); id != 0 { return nil - } else if id, err = bkt.NextSequence(); err != nil { - return err - } else if err := bkt.Put([]byte(key), u64tob(id)); err != nil { + } + + id = pilosa.GenerateNextPartitionedID(s.index, maxID(tx), s.partitionID, s.partitionN) + if err := bkt.Put([]byte(key), u64tob(id)); err != nil { return err } else if err := tx.Bucket([]byte("ids")).Put(u64tob(id), []byte(key)); err != nil { return err @@ -220,9 +230,10 @@ func (s *TranslateStore) TranslateKeys(keys []string) (ids []uint64, _ error) { if ids[i] = findIDByKey(bkt, key); ids[i] != 0 { continue - } else if ids[i], err = bkt.NextSequence(); err != nil { - return err - } else if err := bkt.Put([]byte(key), u64tob(ids[i])); err != nil { + } + + ids[i] = pilosa.GenerateNextPartitionedID(s.index, maxID(tx), s.partitionID, s.partitionN) + if err := bkt.Put([]byte(key), u64tob(ids[i])); err != nil { return err } else if err := tx.Bucket([]byte("ids")).Put(u64tob(ids[i]), []byte(key)); err != nil { return err @@ -311,9 +322,7 @@ func (s *TranslateStore) notifyWrite() { // MaxID returns the highest id in the store. func (s *TranslateStore) MaxID() (max uint64, err error) { if err := s.db.View(func(tx *bolt.Tx) error { - if key, _ := tx.Bucket([]byte("ids")).Cursor().Last(); key != nil { - max = btou64(key) - } + max = maxID(tx) return nil }); err != nil { return 0, err @@ -321,6 +330,14 @@ func (s *TranslateStore) MaxID() (max uint64, err error) { return max, nil } +// MaxID returns the highest id in the store. +func maxID(tx *bolt.Tx) uint64 { + if key, _ := tx.Bucket([]byte("ids")).Cursor().Last(); key != nil { + return btou64(key) + } + return 0 +} + type TranslateEntryReader struct { ctx context.Context store *TranslateStore diff --git a/boltdb/translate_test.go b/boltdb/translate_test.go index 7c3d0e3d5..219885324 100644 --- a/boltdb/translate_test.go +++ b/boltdb/translate_test.go @@ -28,24 +28,24 @@ func TestTranslateStore_TranslateKey(t *testing.T) { s := MustOpenNewTranslateStore() defer MustCloseTranslateStore(s) - // Ensure initial key translates to ID 1. + // Ensure initial key translates to first ID for shard if id, err := s.TranslateKey("foo"); err != nil { t.Fatal(err) - } else if got, want := id, uint64(1); got != want { + } else if got, want := id, uint64(247463937); got != want { t.Fatalf("TranslateKey()=%d, want %d", got, want) } // Ensure next key autoincrements. if id, err := s.TranslateKey("bar"); err != nil { t.Fatal(err) - } else if got, want := id, uint64(2); got != want { + } else if got, want := id, uint64(247463938); got != want { t.Fatalf("TranslateKey()=%d, want %d", got, want) } // Ensure retranslating existing key returns original ID. if id, err := s.TranslateKey("foo"); err != nil { t.Fatal(err) - } else if got, want := id, uint64(1); got != want { + } else if got, want := id, uint64(247463937); got != want { t.Fatalf("TranslateKey()=%d, want %d", got, want) } } @@ -57,29 +57,29 @@ func TestTranslateStore_TranslateKeys(t *testing.T) { // Ensure initial keys translate to incrementing IDs. if ids, err := s.TranslateKeys([]string{"foo", "bar"}); err != nil { t.Fatal(err) - } else if got, want := ids[0], uint64(1); got != want { + } else if got, want := ids[0], uint64(247463937); got != want { t.Fatalf("TranslateKeys()[0]=%d, want %d", got, want) - } else if got, want := ids[1], uint64(2); got != want { + } else if got, want := ids[1], uint64(247463938); got != want { t.Fatalf("TranslateKeys()[1]=%d, want %d", got, want) } // Ensure retranslation returns original IDs. if ids, err := s.TranslateKeys([]string{"foo", "bar"}); err != nil { t.Fatal(err) - } else if got, want := ids[0], uint64(1); got != want { + } else if got, want := ids[0], uint64(247463937); got != want { t.Fatalf("TranslateKeys()[0]=%d, want %d", got, want) - } else if got, want := ids[1], uint64(2); got != want { + } else if got, want := ids[1], uint64(247463938); got != want { t.Fatalf("TranslateKeys()[1]=%d, want %d", got, want) } // Ensure retranslating with existing and non-existing keys returns correctly. if ids, err := s.TranslateKeys([]string{"foo", "baz", "bar"}); err != nil { t.Fatal(err) - } else if got, want := ids[0], uint64(1); got != want { + } else if got, want := ids[0], uint64(247463937); got != want { t.Fatalf("TranslateKeys()[0]=%d, want %d", got, want) - } else if got, want := ids[1], uint64(3); got != want { + } else if got, want := ids[1], uint64(247463939); got != want { t.Fatalf("TranslateKeys()[1]=%d, want %d", got, want) - } else if got, want := ids[2], uint64(2); got != want { + } else if got, want := ids[2], uint64(247463938); got != want { t.Fatalf("TranslateKeys()[2]=%d, want %d", got, want) } } @@ -89,20 +89,23 @@ func TestTranslateStore_TranslateID(t *testing.T) { defer MustCloseTranslateStore(s) // Setup initial keys. - if _, err := s.TranslateKey("foo"); err != nil { + id1, err := s.TranslateKey("foo") + if err != nil { t.Fatal(err) - } else if _, err := s.TranslateKey("bar"); err != nil { + } + id2, err := s.TranslateKey("bar") + if err != nil { t.Fatal(err) } // Ensure IDs can be translated back to keys. - if key, err := s.TranslateID(1); err != nil { + if key, err := s.TranslateID(id1); err != nil { t.Fatal(err) } else if got, want := key, "foo"; got != want { t.Fatalf("TranslateID()=%s, want %s", got, want) } - if key, err := s.TranslateID(2); err != nil { + if key, err := s.TranslateID(id2); err != nil { t.Fatal(err) } else if got, want := key, "bar"; got != want { t.Fatalf("TranslateID()=%s, want %s", got, want) @@ -114,12 +117,13 @@ func TestTranslateStore_TranslateIDs(t *testing.T) { defer MustCloseTranslateStore(s) // Setup initial keys. - if _, err := s.TranslateKeys([]string{"foo", "bar"}); err != nil { + ids, err := s.TranslateKeys([]string{"foo", "bar"}) + if err != nil { t.Fatal(err) } // Ensure IDs can be translated back to keys. - if keys, err := s.TranslateIDs([]uint64{1, 2, 3}); err != nil { + if keys, err := s.TranslateIDs([]uint64{ids[0], ids[1], 1}); err != nil { t.Fatal(err) } else if got, want := keys[0], "foo"; got != want { t.Fatalf("TranslateIDs()[0]=%s, want %s", got, want) @@ -151,7 +155,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { // Read first entry. if err := r.ReadEntry(&entry); err != nil { t.Fatal(err) - } else if got, want := entry.ID, uint64(1); got != want { + } else if got, want := entry.ID, uint64(247463937); got != want { t.Fatalf("ReadEntry() ID=%d, want %d", got, want) } else if got, want := entry.Key, "foo"; got != want { t.Fatalf("ReadEntry() Key=%s, want %s", got, want) @@ -160,7 +164,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { // Read next entry. if err := r.ReadEntry(&entry); err != nil { t.Fatal(err) - } else if got, want := entry.ID, uint64(2); got != want { + } else if got, want := entry.ID, uint64(247463938); got != want { t.Fatalf("ReadEntry() ID=%d, want %d", got, want) } else if got, want := entry.Key, "bar"; got != want { t.Fatalf("ReadEntry() Key=%s, want %s", got, want) @@ -174,7 +178,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { // Read newly created entry. if err := r.ReadEntry(&entry); err != nil { t.Fatal(err) - } else if got, want := entry.ID, uint64(3); got != want { + } else if got, want := entry.ID, uint64(247463939); got != want { t.Fatalf("ReadEntry() ID=%d, want %d", got, want) } else if got, want := entry.Key, "baz"; got != want { t.Fatalf("ReadEntry() Key=%s, want %s", got, want) @@ -211,7 +215,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { var entry pilosa.TranslateEntry if err := r.ReadEntry(&entry); err != nil { t.Fatal(err) - } else if got, want := entry.ID, uint64(1); got != want { + } else if got, want := entry.ID, uint64(247463937); got != want { t.Fatalf("ReadEntry() ID=%d, want %d", got, want) } else if got, want := entry.Key, "foo"; got != want { t.Fatalf("ReadEntry() Key=%s, want %s", got, want) @@ -302,7 +306,7 @@ func MustNewTranslateStore() *boltdb.TranslateStore { panic(err) } - s := boltdb.NewTranslateStore("I", "F") + s := boltdb.NewTranslateStore("I", "F", 0, pilosa.DefaultPartitionN) s.Path = f.Name() return s } diff --git a/client.go b/client.go index 03203b8a9..ffeb19b07 100644 --- a/client.go +++ b/client.go @@ -44,6 +44,8 @@ type FieldValue struct { // While I understand that putting the entire Client behind an interface might require this many methods, // I don't want to let it go unquestioned. type InternalClient interface { + InternalQueryClient + MaxShardByIndex(ctx context.Context) (map[string]uint64, error) Schema(ctx context.Context) ([]*IndexInfo, error) PostSchema(ctx context.Context, uri *URI, s *Schema, remote bool) error @@ -51,7 +53,6 @@ type InternalClient interface { FragmentNodes(ctx context.Context, index string, shard uint64) ([]*Node, error) Nodes(ctx context.Context) ([]*Node, error) Query(ctx context.Context, index string, queryRequest *QueryRequest) (*QueryResponse, error) - QueryNode(ctx context.Context, uri *URI, index string, queryRequest *QueryRequest) (*QueryResponse, error) Import(ctx context.Context, index, field string, shard uint64, bits []Bit, opts ...ImportOption) error ImportK(ctx context.Context, index, field string, bits []Bit, opts ...ImportOption) error EnsureIndex(ctx context.Context, name string, options IndexOptions) error @@ -78,6 +79,8 @@ type InternalClient interface { // InternalQueryClient is the internal interface for querying a node. type InternalQueryClient interface { QueryNode(ctx context.Context, uri *URI, index string, queryRequest *QueryRequest) (*QueryResponse, error) + TranslateKeysNode(ctx context.Context, uri *URI, index, field string, keys []string) ([]uint64, error) + TranslateIDsNode(ctx context.Context, uri *URI, index, field string, id []uint64) ([]string, error) } type nopInternalQueryClient struct{} @@ -86,6 +89,14 @@ func (n *nopInternalQueryClient) QueryNode(ctx context.Context, uri *URI, index return nil, nil } +func (n nopInternalQueryClient) TranslateKeysNode(ctx context.Context, uri *URI, index, field string, keys []string) ([]uint64, error) { + return nil, nil +} + +func (n nopInternalQueryClient) TranslateIDsNode(ctx context.Context, uri *URI, index, field string, ids []uint64) ([]string, error) { + return nil, nil +} + func newNopInternalQueryClient() *nopInternalQueryClient { return &nopInternalQueryClient{} } @@ -125,6 +136,12 @@ func (n nopInternalClient) Query(ctx context.Context, index string, queryRequest func (n nopInternalClient) QueryNode(ctx context.Context, uri *URI, index string, queryRequest *QueryRequest) (*QueryResponse, error) { return nil, nil } +func (n nopInternalClient) TranslateKeysNode(ctx context.Context, uri *URI, index, field string, keys []string) ([]uint64, error) { + return nil, nil +} +func (n nopInternalClient) TranslateIDsNode(ctx context.Context, uri *URI, index, field string, ids []uint64) ([]string, error) { + return nil, nil +} func (n nopInternalClient) Import(ctx context.Context, index, field string, shard uint64, bits []Bit, opts ...ImportOption) error { return nil } diff --git a/cluster.go b/cluster.go index e723de58e..140babc11 100644 --- a/cluster.go +++ b/cluster.go @@ -40,8 +40,8 @@ import ( ) const ( - // defaultPartitionN is the default number of partitions in a cluster. - defaultPartitionN = 256 + // DefaultPartitionN is the default number of partitions in a cluster. + DefaultPartitionN = 256 // ClusterState represents the state returned in the /status endpoint. ClusterStateStarting = "STARTING" @@ -235,13 +235,15 @@ type cluster struct { // nolint: maligned logger logger.Logger InternalClient InternalClient + + // OpenTranslateReader OpenTranslateReaderFunc } // newCluster returns a new instance of Cluster with defaults. func newCluster() *cluster { return &cluster{ Hasher: &jmphasher{}, - partitionN: defaultPartitionN, + partitionN: DefaultPartitionN, ReplicaN: 1, joiningLeavingNodes: make(chan nodeAction, 10), // buffered channel @@ -390,14 +392,6 @@ func (c *cluster) addNode(node *Node) error { return nil } - // If the cluster membership has changed, reset the primary for - // translate store replication. - if c.holder != nil { - if err := c.holder.setPrimaryTranslateStore(c.unprotectedPrimaryReplicaNode()); err != nil { - return err - } - } - // add to topology if c.Topology == nil { return fmt.Errorf("Cluster.Topology is nil") @@ -417,14 +411,6 @@ func (c *cluster) removeNode(nodeID string) error { // remove from cluster c.removeNodeBasicSorted(nodeID) - // If the cluster membership has changed, reset the primary for - // translate store replication. - if c.holder != nil { - if err := c.holder.setPrimaryTranslateStore(c.unprotectedPrimaryReplicaNode()); err != nil { - return err - } - } - // remove from topology if c.Topology == nil { return fmt.Errorf("Cluster.Topology is nil") @@ -867,8 +853,12 @@ func (c *cluster) fragSources(to *cluster, idx *Index) (map[string][]*ResizeSour return m, nil } -// partition returns the partition that a shard belongs to. -func (c *cluster) partition(index string, shard uint64) int { +// shardPartition returns the partition that a shard belongs to. +func (c *cluster) shardPartition(index string, shard uint64) int { + return shardPartition(index, shard, c.partitionN) +} + +func shardPartition(index string, shard uint64, partitionN int) int { var buf [8]byte binary.BigEndian.PutUint64(buf[:], shard) @@ -876,7 +866,25 @@ func (c *cluster) partition(index string, shard uint64) int { h := fnv.New64a() _, _ = h.Write([]byte(index)) _, _ = h.Write(buf[:]) - return int(h.Sum64() % uint64(c.partitionN)) + return int(h.Sum64() % uint64(partitionN)) +} + +// keyPartition returns the partition that a key belongs to. +func (c *cluster) keyPartition(index, key string) int { + return keyPartition(index, key, c.partitionN) +} + +func keyPartition(index, key string, partitionN int) int { + // Hash the bytes and mod by partition count. + h := fnv.New64a() + _, _ = h.Write([]byte(index)) + _, _ = h.Write([]byte(key)) + return int(h.Sum64() % uint64(partitionN)) +} + +// idPartition returns the partition that an id belongs to. +func (c *cluster) idPartition(index string, id uint64) int { + return shardPartition(index, id/ShardWidth, c.partitionN) } // ShardNodes returns a list of nodes that own a fragment. Safe for concurrent use. @@ -888,7 +896,19 @@ func (c *cluster) ShardNodes(index string, shard uint64) []*Node { // shardNodes returns a list of nodes that own a fragment. unprotected func (c *cluster) shardNodes(index string, shard uint64) []*Node { - return c.partitionNodes(c.partition(index, shard)) + return c.partitionNodes(c.shardPartition(index, shard)) +} + +// KeyNodes returns a list of nodes that own a fragment. Safe for concurrent use. +func (c *cluster) KeyNodes(index, key string) []*Node { + c.mu.RLock() + defer c.mu.RUnlock() + return c.keyNodes(index, key) +} + +// keyNodes returns a list of nodes that own a key. unprotected +func (c *cluster) keyNodes(index, key string) []*Node { + return c.partitionNodes(c.keyPartition(index, key)) } // ownsShard returns true if a host owns a fragment. @@ -900,7 +920,6 @@ func (c *cluster) ownsShard(nodeID string, index string, shard uint64) bool { // partitionNodes returns a list of nodes that own a partition. unprotected. func (c *cluster) partitionNodes(partitionID int) []*Node { - // Default replica count to between one and the number of nodes. // The replica count can be zero if there are no nodes. replicaN := c.ReplicaN @@ -922,11 +941,18 @@ func (c *cluster) partitionNodes(partitionID int) []*Node { return nodes } +// ownsPartition returns true if a host owns a partition. +func (c *cluster) ownsPartition(nodeID string, partition int) bool { + c.mu.RLock() + defer c.mu.RUnlock() + return Nodes(c.partitionNodes(partition)).ContainsID(nodeID) +} + // containsShards is like OwnsShards, but it includes replicas. func (c *cluster) containsShards(index string, availableShards *roaring.Bitmap, node *Node) []uint64 { var shards []uint64 availableShards.ForEach(func(i uint64) { - p := c.partition(index, i) + p := c.shardPartition(index, i) // Determine the nodes for partition. nodes := c.partitionNodes(p) for _, n := range nodes { @@ -2047,6 +2073,148 @@ func (c *cluster) setStatic(hosts []string) error { return nil } +func (c *cluster) translateIndexKey(ctx context.Context, indexName string, key string) (uint64, error) { + keyMap, err := c.translateIndexKeySet(ctx, indexName, map[string]struct{}{key: struct{}{}}) + if err != nil { + return 0, err + } + return keyMap[key], nil +} + +func (c *cluster) translateIndexKeys(ctx context.Context, indexName string, keys []string) ([]uint64, error) { + keySet := make(map[string]struct{}) + for _, key := range keys { + keySet[key] = struct{}{} + } + + keyMap, err := c.translateIndexKeySet(ctx, indexName, keySet) + if err != nil { + return nil, err + } + + ids := make([]uint64, len(keys)) + for i := range keys { + ids[i] = keyMap[keys[i]] + } + return ids, nil +} + +func (c *cluster) translateIndexKeySet(ctx context.Context, indexName string, keySet map[string]struct{}) (map[string]uint64, error) { + keyMap := make(map[string]uint64) + + idx := c.holder.Index(indexName) + if idx == nil { + return nil, ErrIndexNotFound + } + + // Split keys by partition. + keysByPartition := make(map[int][]string, c.partitionN) + for key := range keySet { + partitionID := c.keyPartition(indexName, key) + keysByPartition[partitionID] = append(keysByPartition[partitionID], key) + } + + // Translate keys by partition. + var g errgroup.Group + var mu sync.Mutex + for partitionID := range keysByPartition { + partitionID := partitionID + keys := keysByPartition[partitionID] + + g.Go(func() (err error) { + var ids []uint64 + if c.ownsPartition(c.Node.ID, partitionID) { + if ids, err = idx.TranslateStore(partitionID).TranslateKeys(keys); err != nil { + return err + } + } else { + nodes := c.partitionNodes(partitionID) + if ids, err = c.InternalClient.TranslateKeysNode(ctx, &nodes[0].URI, indexName, "", keys); err != nil { + return err + } + } + + mu.Lock() + defer mu.Unlock() + for i := range keys { + keyMap[keys[i]] = ids[i] + } + return nil + }) + } + if err := g.Wait(); err != nil { + return nil, err + } + return keyMap, nil +} + +func (c *cluster) translateIndexIDs(ctx context.Context, indexName string, ids []uint64) ([]string, error) { + idSet := make(map[uint64]struct{}) + for _, id := range ids { + idSet[id] = struct{}{} + } + + idMap, err := c.translateIndexIDSet(ctx, indexName, idSet) + if err != nil { + return nil, err + } + + keys := make([]string, len(ids)) + for i := range ids { + keys[i] = idMap[ids[i]] + } + return keys, nil +} + +func (c *cluster) translateIndexIDSet(ctx context.Context, indexName string, idSet map[uint64]struct{}) (map[uint64]string, error) { + idMap := make(map[uint64]string) + + index := c.holder.Index(indexName) + if index == nil { + return nil, ErrIndexNotFound + } + + // Split ids by partition. + idsByPartition := make(map[int][]uint64, c.partitionN) + for id := range idSet { + partitionID := c.idPartition(indexName, id) + idsByPartition[partitionID] = append(idsByPartition[partitionID], id) + } + + // Translate ids by partition. + var g errgroup.Group + var mu sync.Mutex + for partitionID := range idsByPartition { + partitionID := partitionID + ids := idsByPartition[partitionID] + + g.Go(func() (err error) { + var keys []string + if c.ownsPartition(c.Node.ID, partitionID) { + if keys, err = index.TranslateStore(partitionID).TranslateIDs(ids); err != nil { + return err + } + } else { + nodes := c.partitionNodes(partitionID) + if keys, err = c.InternalClient.TranslateIDsNode(ctx, &nodes[0].URI, indexName, "", ids); err != nil { + return err + } + } + + mu.Lock() + defer mu.Unlock() + for i := range ids { + idMap[ids[i]] = keys[i] + } + return nil + }) + } + if err := g.Wait(); err != nil { + return nil, err + } + return idMap, nil +} + // ClusterStatus describes the status of the cluster including its // state and node topology. type ClusterStatus struct { diff --git a/cluster_internal_test.go b/cluster_internal_test.go index fe519ed04..de87ad5ae 100644 --- a/cluster_internal_test.go +++ b/cluster_internal_test.go @@ -96,7 +96,7 @@ func newIndexWithTempPath(name string) *Index { if err != nil { panic(err) } - index, err := NewIndex(path, name) + index, err := NewIndex(path, name, DefaultPartitionN) if err != nil { panic(err) } @@ -352,7 +352,7 @@ func TestCluster_Partition(t *testing.T) { c := newCluster() c.partitionN = partitionN - partitionID := c.partition(index, shard) + partitionID := c.shardPartition(index, shard) if partitionID < 0 || partitionID >= partitionN { t.Errorf("partition out of range: shard=%d, p=%d, n=%d", shard, partitionID, partitionN) } diff --git a/ctl/import_test.go b/ctl/import_test.go index ec8ed7666..5c41a840c 100644 --- a/ctl/import_test.go +++ b/ctl/import_test.go @@ -25,6 +25,7 @@ import ( "reflect" "strings" "testing" + "time" "github.com/pilosa/pilosa/v2" "github.com/pilosa/pilosa/v2/test" @@ -299,20 +300,26 @@ func TestImportCommand_KeyReplication(t *testing.T) { // Verify that the data is available on both nodes. for _, host := range []string{host0, host1} { - qry := "Count(Row(f=foo0))" - resp, err := http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+host+"/index/i/query", strings.NewReader(qry))) - if err != nil { - t.Fatalf("Querying data for validation: %s", err) - } + if err := test.RetryUntil(2*time.Second, func() error { + qry := "Count(Row(f=foo0))" + resp, err := http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+host+"/index/i/query", strings.NewReader(qry))) + if err != nil { + return fmt.Errorf("Querying data for validation: %s", err) + } - // Read body and unmarshal response. - exp := `{"results":[100]}` + "\n" - if body, err := ioutil.ReadAll(resp.Body); err != nil { - t.Fatalf("reading: %s", err) - } else if !reflect.DeepEqual(body, []byte(exp)) { - t.Fatalf("expected: %s, but got: %s", exp, body) + // Read body and unmarshal response. + exp := `{"results":[100]}` + "\n" + if body, err := ioutil.ReadAll(resp.Body); err != nil { + return fmt.Errorf("reading: %s", err) + } else if !reflect.DeepEqual(body, []byte(exp)) { + return fmt.Errorf("expected: %s, but got: %s", exp, body) + } + return nil + }); err != nil { + t.Fatal(err) } } + } // Ensure that integer import with keys runs. diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index 4c4e566ff..be6ae3511 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -273,6 +273,22 @@ func (Serializer) Unmarshal(buf []byte, m pilosa.Message) error { } decodeTranslateKeysResponse(msg, mt) return nil + case *pilosa.TranslateIDsRequest: + msg := &internal.TranslateIDsRequest{} + err := proto.Unmarshal(buf, msg) + if err != nil { + return errors.Wrap(err, "unmarshaling TranslateIDsRequest") + } + decodeTranslateIDsRequest(msg, mt) + return nil + case *pilosa.TranslateIDsResponse: + msg := &internal.TranslateIDsResponse{} + err := proto.Unmarshal(buf, msg) + if err != nil { + return errors.Wrap(err, "unmarshaling TranslateIDsResponse") + } + decodeTranslateIDsResponse(msg, mt) + return nil default: panic(fmt.Sprintf("unhandled pilosa.Message of type %T: %#v", mt, m)) } @@ -338,6 +354,10 @@ func encodeToProto(m pilosa.Message) proto.Message { return encodeTranslateKeysRequest(mt) case *pilosa.TranslateKeysResponse: return encodeTranslateKeysResponse(mt) + case *pilosa.TranslateIDsRequest: + return encodeTranslateIDsRequest(mt) + case *pilosa.TranslateIDsResponse: + return encodeTranslateIDsResponse(mt) } return nil } @@ -760,17 +780,31 @@ func encodeRecalculateCaches(*pilosa.RecalculateCaches) *internal.RecalculateCac return &internal.RecalculateCaches{} } +func encodeTranslateKeysRequest(request *pilosa.TranslateKeysRequest) *internal.TranslateKeysRequest { + return &internal.TranslateKeysRequest{ + Index: request.Index, + Field: request.Field, + Keys: request.Keys, + } +} + func encodeTranslateKeysResponse(response *pilosa.TranslateKeysResponse) *internal.TranslateKeysResponse { return &internal.TranslateKeysResponse{ IDs: response.IDs, } } -func encodeTranslateKeysRequest(request *pilosa.TranslateKeysRequest) *internal.TranslateKeysRequest { - return &internal.TranslateKeysRequest{ +func encodeTranslateIDsRequest(request *pilosa.TranslateIDsRequest) *internal.TranslateIDsRequest { + return &internal.TranslateIDsRequest{ Index: request.Index, Field: request.Field, - Keys: request.Keys, + IDs: request.IDs, + } +} + +func encodeTranslateIDsResponse(response *pilosa.TranslateIDsResponse) *internal.TranslateIDsResponse { + return &internal.TranslateIDsResponse{ + Keys: response.Keys, } } @@ -1106,6 +1140,16 @@ func decodeTranslateKeysResponse(pb *internal.TranslateKeysResponse, m *pilosa.T m.IDs = pb.IDs } +func decodeTranslateIDsRequest(pb *internal.TranslateIDsRequest, m *pilosa.TranslateIDsRequest) { + m.Index = pb.Index + m.Field = pb.Field + m.IDs = pb.IDs +} + +func decodeTranslateIDsResponse(pb *internal.TranslateIDsResponse, m *pilosa.TranslateIDsResponse) { + m.Keys = pb.Keys +} + // QueryResult types. const ( queryResultTypeNil uint32 = iota diff --git a/executor.go b/executor.go index b8fa0b5d5..473df14b5 100644 --- a/executor.go +++ b/executor.go @@ -185,7 +185,7 @@ func (e *executor) Execute(ctx context.Context, index string, q *pql.Query, shar // Translate query keys to ids, if necessary. // No need to translate a remote call. if !opt.Remote { - if err := e.translateCalls(ctx, index, idx, q.Calls); err != nil { + if err := e.translateCalls(ctx, index, q.Calls); err != nil { return resp, err } else if err := validateQueryContext(ctx); err != nil { return resp, err @@ -230,12 +230,18 @@ func (e *executor) Execute(ctx context.Context, index string, q *pql.Query, shar // Translate column attributes, if necessary. if idx.Keys() { + idSet := make(map[uint64]struct{}) for _, col := range columnAttrSets { - v, err := idx.translateStore.TranslateID(col.ID) - if err != nil { - return resp, err - } - col.Key, col.ID = v, 0 + idSet[col.ID] = struct{}{} + } + + idMap, err := e.Cluster.translateIndexIDSet(ctx, index, idSet) + if err != nil { + return resp, errors.Wrap(err, "translating id set") + } + + for _, col := range columnAttrSets { + col.Key, col.ID = idMap[col.ID], 0 } } @@ -3520,69 +3526,118 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu } } -func (e *executor) translateCalls(ctx context.Context, index string, idx *Index, calls []*pql.Call) error { +func (e *executor) translateCalls(ctx context.Context, defaultIndexName string, calls []*pql.Call) (err error) { span, _ := tracing.StartSpanFromContext(ctx, "Executor.translateCalls") defer span.Finish() + // Generate a list of all used + keySets := make(map[string]map[string]struct{}) + keySets[defaultIndexName] = make(map[string]struct{}) for i := range calls { - // Possibly change to another index for translation, if this - // call crosses index boundaries. - newIdxName := calls[i].CallIndex() - var newIdx *Index - if newIdxName == "" || newIdxName == index { - newIdxName = index - newIdx = idx - } else { - newIdx = idx.holder.indexes[newIdxName] - if newIdx == nil { - return fmt.Errorf("unknown index %q specified in cross-index call", newIdxName) + if err := e.collectCallKeySets(ctx, defaultIndexName, calls[i], keySets); err != nil { + return err + } + } + + // Perform a separate batch translation for each separate index used. + keyMaps := make(map[string]map[string]uint64) + for indexName, keySet := range keySets { + idx := e.Holder.indexes[indexName] + if idx == nil { + return fmt.Errorf("cannot find index %q", indexName) + } + + if !idx.Keys() || len(keySets) == 0 { + continue + } + if keyMaps[indexName], err = e.Cluster.translateIndexKeySet(ctx, indexName, keySet); err != nil { + return err + } + } + + // Translate calls. + for i := range calls { + if err := e.translateCall(defaultIndexName, calls[i], keyMaps); err != nil { + return err + } + } + + return nil +} + +func (e *executor) collectCallKeySets(ctx context.Context, indexName string, c *pql.Call, m map[string]map[string]struct{}) error { + // Specifying an 'index' call overrides indexes on subsequent calls. + if s := c.CallIndex(); s != "" { + indexName = s + } + + if m[indexName] == nil { + m[indexName] = make(map[string]struct{}) + } + + // Collect key for this call. + colKey, rowKey, fieldName := c.TranslateInfo(columnLabel, rowLabel) + if c.Args[colKey] != nil && isString(c.Args[colKey]) { + if value := callArgString(c, colKey); value != "" { + m[indexName][value] = struct{}{} + } + } + + // Collect foreign index keys. + if fieldName != "" { + idx := e.Holder.indexes[indexName] + if field := idx.Field(fieldName); field != nil && field.ForeignIndex() != "" { + foreignIndexName := field.ForeignIndex() + if m[foreignIndexName] == nil { + m[foreignIndexName] = make(map[string]struct{}) + } + + if c.Args[rowKey] != nil && isCondition(c.Args[rowKey]) { + cond := c.Args[rowKey].(*pql.Condition) + if isString(cond.Value) { + m[foreignIndexName][cond.Value.(string)] = struct{}{} + } + } else if value := callArgString(c, rowKey); value != "" { + m[foreignIndexName][value] = struct{}{} } } - if err := e.translateCall(newIdxName, newIdx, calls[i]); err != nil { + } + + // Recursively collect argument calls. + for _, arg := range c.Args { + if arg, ok := arg.(*pql.Call); ok { + if err := e.collectCallKeySets(ctx, indexName, arg, m); err != nil { + return errors.Wrap(err, "collecting group by call index name") + } + } + } + + // Recursively collect child calls. + for _, child := range c.Children { + if err := e.collectCallKeySets(ctx, indexName, child, m); err != nil { return err } } return nil } -func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { - var colKey, rowKey, fieldName string - switch c.Name { - case "Set", "Clear", "Row", "Range", "SetColumnAttrs", "ClearRow": - // Positional args in new PQL syntax require special handling here. - colKey = "_" + columnLabel - fieldName, _ = c.FieldArg() - rowKey = fieldName - case "SetRowAttrs": - // Positional args in new PQL syntax require special handling here. - rowKey = "_" + rowLabel - fieldName = callArgString(c, "_field") - case "Rows": - fieldName = callArgString(c, "_field") - rowKey = "previous" - colKey = "column" - case "GroupBy": - return errors.Wrap(e.translateGroupByCall(index, idx, c), "translating GroupBy") - case "IncludesColumn": - colKey = "column" - default: - colKey = "col" - fieldName = callArgString(c, "field") - rowKey = "row" +func (e *executor) translateCall(indexName string, c *pql.Call, keyMaps map[string]map[string]uint64) (err error) { + // Specifying an 'index' arg applies to all nested calls. + if s := c.CallIndex(); s != "" { + indexName = s } + keyMap := keyMaps[indexName] // Translate column key. + colKey, rowKey, fieldName := c.TranslateInfo(columnLabel, rowLabel) + idx := e.Holder.indexes[indexName] if idx.Keys() { if c.Args[colKey] != nil && !isString(c.Args[colKey]) { if !isValidID(c.Args[colKey]) { return errors.Errorf("column value must be a string or non-negative integer, but got: %v of %[1]T", c.Args[colKey]) } } else if value := callArgString(c, colKey); value != "" { - id, err := idx.translateStore.TranslateKey(value) - if err != nil { - return err - } - c.Args[colKey] = id + c.Args[colKey] = keyMap[value] } } else { if isString(c.Args[colKey]) { @@ -3620,8 +3675,47 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { c.Args[rowKey] = rowID } } else if field.Keys() { - if err := e.translateRowKey(c, field.translateStore, rowKey); err != nil { - return errors.Wrap(err, "translating rowkey") + foreignIndexName := field.ForeignIndex() + 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: + var id uint64 + if foreignIndexName != "" { + id = keyMaps[foreignIndexName][cond.Value.(string)] + } else { + if id, err = field.TranslateStore().TranslateKey(cond.Value.(string)); 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 != "" { + var id uint64 + if foreignIndexName != "" { + id = keyMaps[foreignIndexName][value] + } else { + if id, err = field.TranslateStore().TranslateKey(value); err != nil { + return err + } + } + c.Args[rowKey] = id } } else { if isString(c.Args[rowKey]) { @@ -3632,135 +3726,65 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error { // Translate child calls. for _, child := range c.Children { - // Possibly change to another index for translation, if this - // call crosses index boundaries. - newIdxName := child.CallIndex() - var newIdx *Index - if newIdxName == "" || newIdxName == index { - newIdxName = index - newIdx = idx - } else { - newIdx = idx.holder.indexes[newIdxName] - if newIdx == nil { - return fmt.Errorf("unknown index %q specified in cross-index call", newIdxName) - } - } - if err := e.translateCall(newIdxName, newIdx, child); err != nil { + if err := e.translateCall(indexName, child, keyMaps); err != nil { return err } } - return nil -} + // Translate call args. + for _, arg := range c.Args { + if arg, ok := arg.(*pql.Call); ok { + if err := e.translateCall(indexName, arg, keyMaps); err != nil { + return errors.Wrap(err, "translating arg") + } + } + } -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)) + // GroupBy-specific call translation. + if c.Name == "GroupBy" { + prev, ok := c.Args["previous"] + if !ok { + return nil // nothing else to be translated + } + previous, ok := prev.([]interface{}) + if !ok { + return errors.Errorf("'previous' argument must be list, but got %T", prev) + } + if len(c.Children) != len(previous) { + return errors.Errorf("mismatched lengths for previous: %d and children: %d in %s", len(previous), len(c.Children), c) + } + + fields := make([]*Field, len(c.Children)) + for i, child := range c.Children { + fieldname := callArgString(child, "_field") + field := idx.Field(fieldname) + if field == nil { + return errors.Wrapf(ErrFieldNotFound, "getting field '%s' from '%s'", fieldname, child) + } + fields[i] = field + } + + for i, field := range fields { + prev := previous[i] + if field.Keys() { + prevStr, ok := prev.(string) + if !ok { + return errors.New("prev value must be a string when field 'keys' option enabled") + } + // TODO: does this need to take field.ForeignIndex() into consideration? + id, err := field.TranslateStore().TranslateKey(prevStr) if err != nil { - return errors.Wrap(err, "translating key") + return errors.Wrapf(err, "translating row key '%s'", prevStr) } - c.Args[rowKey] = &pql.Condition{ - Op: cond.Op, - Value: id, + previous[i] = id + } else { + if prevStr, ok := prev.(string); ok { + return errors.Errorf("got string row val '%s' in 'previous' for field %s which doesn't use string keys", prevStr, field.Name()) } - 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 + "'") } - for _, child := range c.Children { - if err := e.translateCall(index, idx, child); err != nil { - return errors.Wrapf(err, "translating %s", child) - } - } - - if filter, ok, err := c.CallArg("filter"); ok { - if err != nil { - return errors.Wrap(err, "getting filter call") - } - err = e.translateCall(index, idx, filter) - if err != nil { - return errors.Wrap(err, "translating filter call") - } - } - - if aggregate, ok, err := c.CallArg("aggregate"); ok { - if err != nil { - return errors.Wrap(err, "getting aggregate call") - } - err = e.translateCall(index, idx, aggregate) - if err != nil { - return errors.Wrap(err, "translating aggregate call") - } - } - - prev, ok := c.Args["previous"] - if !ok { - return nil // nothing else to be translated - } - previous, ok := prev.([]interface{}) - if !ok { - return errors.Errorf("'previous' argument must be list, but got %T", prev) - } - if len(c.Children) != len(previous) { - return errors.Errorf("mismatched lengths for previous: %d and children: %d in %s", len(previous), len(c.Children), c) - } - - fields := make([]*Field, len(c.Children)) - for i, child := range c.Children { - fieldname := callArgString(child, "_field") - field := idx.Field(fieldname) - if field == nil { - return errors.Wrapf(ErrFieldNotFound, "getting field '%s' from '%s'", fieldname, child) - } - fields[i] = field - } - - for i, field := range fields { - prev := previous[i] - if field.Keys() { - prevStr, ok := prev.(string) - if !ok { - return errors.New("prev value must be a string when field 'keys' option enabled") - } - id, err := field.translateStore.TranslateKey(prevStr) - if err != nil { - return errors.Wrapf(err, "translating row key '%s'", prevStr) - } - previous[i] = id - } else { - if prevStr, ok := prev.(string); ok { - return errors.Errorf("got string row val '%s' in 'previous' for field %s which doesn't use string keys", prevStr, field.Name()) - } - } - - } return nil } @@ -3768,8 +3792,22 @@ func (e *executor) translateResults(ctx context.Context, index string, idx *Inde span, _ := tracing.StartSpanFromContext(ctx, "Executor.translateResults") defer span.Finish() + idMap := make(map[uint64]string) + if idx.Keys() { + // Collect all index ids. + idSet := make(map[uint64]struct{}) + for i := range calls { + if err := e.collectResultIDs(index, idx, calls[i], results[i], idSet); err != nil { + return err + } + } + if idMap, err = e.Cluster.translateIndexIDSet(ctx, index, idSet); err != nil { + return err + } + } + for i := range results { - results[i], err = e.translateResult(index, idx, calls[i], results[i]) + results[i], err = e.translateResult(index, idx, calls[i], results[i], idMap) if err != nil { return err } @@ -3777,18 +3815,30 @@ func (e *executor) translateResults(ctx context.Context, index string, idx *Inde return nil } -func (e *executor) translateResult(index string, idx *Index, call *pql.Call, result interface{}) (interface{}, error) { +func (e *executor) collectResultIDs(index string, idx *Index, call *pql.Call, result interface{}, idSet map[uint64]struct{}) error { + row, ok := result.(*Row) + if !ok { + return nil + } else if !idx.Keys() { + return nil + } + + for _, segment := range row.Segments() { + for _, col := range segment.Columns() { + idSet[col] = struct{}{} + } + } + return nil +} + +func (e *executor) translateResult(index string, idx *Index, call *pql.Call, result interface{}, idSet map[uint64]string) (interface{}, error) { switch result := result.(type) { case *Row: if idx.Keys() { other := &Row{Attrs: result.Attrs} for _, segment := range result.Segments() { for _, col := range segment.Columns() { - key, err := idx.translateStore.TranslateID(col) - if err != nil { - return nil, err - } - other.Keys = append(other.Keys, key) + other.Keys = append(other.Keys, idSet[col]) } } return other, nil @@ -3798,34 +3848,36 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res // 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 + sr, err := func() (*SignedRow, error) { + fieldName := callArgString(call, "field") + if fieldName == "" { + return nil, nil + } - if fieldName := callArgString(call, "field"); fieldName != "" { field := idx.Field(fieldName) - if field != nil && field.Keys() { - store = field.TranslateStore() + if field == nil { + return nil, nil } - } - // 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 field.Keys() { + rslt := result.Pos + other := &Row{Attrs: rslt.Attrs} + for _, segment := range rslt.Segments() { + keys, err := e.Cluster.translateIndexIDs(context.Background(), field.ForeignIndex(), segment.Columns()) if err != nil { - return nil, err + return nil, errors.Wrap(err, "translating index ids") } - other.Keys = append(other.Keys, key) + other.Keys = append(other.Keys, keys...) } + return &SignedRow{Pos: other}, nil } - return SignedRow{Pos: other}, nil + + return nil, nil + }() + if err != nil { + return nil, err + } else if sr != nil { + return *sr, nil } case PairField: @@ -3835,7 +3887,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res return nil, fmt.Errorf("field %q not found", fieldName) } if field.Keys() { - key, err := field.translateStore.TranslateID(result.Pair.ID) + key, err := field.TranslateStore().TranslateID(result.Pair.ID) if err != nil { return nil, err } @@ -3859,7 +3911,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res if field.Keys() { other := make([]Pair, len(result.Pairs)) for i := range result.Pairs { - key, err := field.translateStore.TranslateID(result.Pairs[i].ID) + key, err := field.TranslateStore().TranslateID(result.Pairs[i].ID) if err != nil { return nil, err } @@ -3886,7 +3938,8 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res return nil, ErrFieldNotFound } if field.Keys() { - key, err := field.translateStore.TranslateID(g.RowID) + // TODO: does this need to take field.ForeignIndex() into consideration? + key, err := field.TranslateStore().TranslateID(g.RowID) if err != nil { return nil, errors.Wrap(err, "translating row ID in Group") } @@ -3917,7 +3970,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res } else if field.Keys() { other.Keys = make([]string, len(result)) for i, id := range result { - key, err := field.translateStore.TranslateID(id) + key, err := field.TranslateStore().TranslateID(id) if err != nil { return nil, errors.Wrap(err, "translating row ID") } diff --git a/executor_internal_test.go b/executor_internal_test.go index c74018a01..8f2a5eafd 100644 --- a/executor_internal_test.go +++ b/executor_internal_test.go @@ -25,8 +25,13 @@ import ( ) func TestExecutor_TranslateGroupByCall(t *testing.T) { + holder := NewHolder(DefaultPartitionN) + + cluster := NewTestCluster(1) + e := &executor{ - Holder: NewHolder(), + Holder: holder, + Cluster: cluster, } e.Holder.Path, _ = ioutil.TempDir(*TempDir, "") err := e.Holder.Open() @@ -51,7 +56,7 @@ func TestExecutor_TranslateGroupByCall(t *testing.T) { t.Fatalf("parsing query: %v", err) } c := query.Calls[0] - err = e.translateGroupByCall("i", idx, c) + err = e.translateCall("i", c, make(map[string]map[string]uint64)) if err != nil { t.Fatalf("translating call: %v", err) } @@ -115,7 +120,7 @@ func TestExecutor_TranslateGroupByCall(t *testing.T) { t.Fatalf("parsing query: %v", err) } c := query.Calls[0] - err = e.translateGroupByCall("i", idx, c) + err = e.translateCall("i", c, make(map[string]map[string]uint64)) if err == nil { t.Fatalf("expected error, but translated call is '%s", c) } diff --git a/executor_test.go b/executor_test.go index 9af38856f..7586da42f 100644 --- a/executor_test.go +++ b/executor_test.go @@ -99,7 +99,7 @@ func TestExecutor_Execute_Row(t *testing.T) { readQueries := []string{`Row(f=1)`} responses := runCallTest(t, writeQuery, readQueries, &pilosa.IndexOptions{Keys: true}) - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"one-hundred", "two-hundred"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"two-hundred", "one-hundred"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -127,7 +127,7 @@ func TestExecutor_Execute_Row(t *testing.T) { &pilosa.IndexOptions{Keys: true}, pilosa.OptFieldKeys()) if diff := cmp.Diff(responses[0].Results, []interface{}{ - &pilosa.Row{Keys: []string{"foo", "bat"}, Attrs: map[string]interface{}{}}, + &pilosa.Row{Keys: []string{"bat", "foo"}, Attrs: map[string]interface{}{}}, }, cmpopts.IgnoreUnexported(pilosa.Row{})); diff != "" { t.Fatal(diff) } @@ -324,7 +324,7 @@ func TestExecutor_Execute_Union(t *testing.T) { readQueries := []string{`Union(Row(f=10), Row(f=11))`} responses := runCallTest(t, writeQuery, readQueries, &pilosa.IndexOptions{Keys: true}) - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"one", "one-hundred", "two-hundred", "two"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"one", "two-hundred", "one-hundred", "two"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -357,7 +357,7 @@ func TestExecutor_Execute_Union(t *testing.T) { responses := runCallTest(t, writeQuery, readQueries, &pilosa.IndexOptions{Keys: true}, pilosa.OptFieldKeys()) - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"one", "one-hundred", "two-hundred", "two"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"one", "two-hundred", "one-hundred", "two"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -1766,13 +1766,13 @@ func TestExecutor_Execute_Row_Range(t *testing.T) { pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"))) t.Run("Standard", func(t *testing.T) { - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"two", "three", "four", "five", "six", "seven"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "two", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) t.Run("Clear", func(t *testing.T) { - if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "four", "five", "six", "seven"}) { + if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -1836,13 +1836,13 @@ func TestExecutor_Execute_Row_Range(t *testing.T) { pilosa.OptFieldKeys()) t.Run("Standard", func(t *testing.T) { - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"two", "three", "four", "five", "six", "seven"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "two", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) t.Run("Clear", func(t *testing.T) { - if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "four", "five", "six", "seven"}) { + if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -1950,13 +1950,13 @@ func TestExecutor_Execute_Range_Deprecated(t *testing.T) { pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"))) t.Run("Standard", func(t *testing.T) { - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"two", "three", "four", "five", "six", "seven"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "two", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) t.Run("Clear", func(t *testing.T) { - if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "four", "five", "six", "seven"}) { + if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -2020,13 +2020,13 @@ func TestExecutor_Execute_Range_Deprecated(t *testing.T) { pilosa.OptFieldKeys()) t.Run("Standard", func(t *testing.T) { - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"two", "three", "four", "five", "six", "seven"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "two", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) t.Run("Clear", func(t *testing.T) { - if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "four", "five", "six", "seven"}) { + if keys := responses[2].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"four", "six", "seven", "five", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -2861,7 +2861,7 @@ func TestExecutor_Execute_Not(t *testing.T) { TrackExistence: true, Keys: true, }) - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "sw1"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"sw1", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -2892,7 +2892,7 @@ func TestExecutor_Execute_Not(t *testing.T) { TrackExistence: true, Keys: true, }, pilosa.OptFieldKeys()) - if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"three", "sw1"}) { + if keys := responses[0].Results[0].(*pilosa.Row).Keys; !reflect.DeepEqual(keys, []string{"sw1", "three"}) { t.Fatalf("unexpected keys: %+v", keys) } }) @@ -3016,12 +3016,12 @@ func TestExecutor_Execute_All(t *testing.T) { expCols []string expCnt uint64 }{ - {qry: "All()", expCols: req.ColumnKeys, expCnt: uint64(bitCount)}, - {qry: "All(limit=1)", expCols: req.ColumnKeys[:1], expCnt: 1}, - {qry: "All(limit=4)", expCols: req.ColumnKeys, expCnt: 4}, - {qry: "All(limit=5)", expCols: req.ColumnKeys, expCnt: 4}, - {qry: "All(limit=1, offset=1)", expCols: req.ColumnKeys[1:2], expCnt: 1}, - {qry: "All(limit=4, offset=1)", expCols: req.ColumnKeys[1:], expCnt: 3}, + {qry: "All()", expCols: []string{"c1", "c0", "c3", "c2"}, expCnt: uint64(bitCount)}, + {qry: "All(limit=1)", expCols: []string{"c1"}, expCnt: 1}, + {qry: "All(limit=4)", expCols: []string{"c1", "c0", "c3", "c2"}, expCnt: 4}, + {qry: "All(limit=5)", expCols: []string{"c1", "c0", "c3", "c2"}, expCnt: 4}, + {qry: "All(limit=1, offset=1)", expCols: []string{"c0"}, expCnt: 1}, + {qry: "All(limit=4, offset=1)", expCols: []string{"c0", "c3", "c2"}, expCnt: 3}, {qry: "All(limit=4, offset=5)", expCols: nil, expCnt: 0}, } for i, test := range tests { @@ -3034,7 +3034,7 @@ func TestExecutor_Execute_All(t *testing.T) { if len(cols) > 1000 || len(test.expCols) > 1000 { t.Fatalf("test %d, unexpected columns, got: len(%d), but expected: len(%d)", i, len(cols), len(test.expCols)) } else { - t.Fatalf("test %d, unexpected columns, got: %T, but expected: %T", i, cols, test.expCols) + t.Fatalf("test %d, unexpected columns, got: %#v, but expected: %#v", i, cols, test.expCols) } } } @@ -3712,7 +3712,7 @@ func TestExecutor_GroupByStrings(t *testing.T) { Query: tst.query, }) if err != nil { - t.Fatalf("got an error %v", err) + t.Fatal(err) } results := r.Results[0].([]pilosa.GroupCount) test.CheckGroupBy(t, tst.expected, results) @@ -3898,7 +3898,7 @@ func TestExecutor_ForeignIndex(t *testing.T) { `) 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"}) { + if !sameStringSlice(distinct.Pos.Keys, []string{"one", "two", "twenty-one"}) { t.Fatalf("unexpected keys: %v", distinct.Pos.Keys) } @@ -3918,6 +3918,31 @@ func TestExecutor_ForeignIndex(t *testing.T) { } } +// sameStringSlice is a helper function which compares two string +// slices without enforcing order. +func sameStringSlice(x, y []string) bool { + if len(x) != len(y) { + return false + } + // create a map of string -> int + diff := make(map[string]int, len(x)) + for _, _x := range x { + // 0 value for int is 0, so just increment a counter for the string + diff[_x]++ + } + for _, _y := range y { + // If the string _y is not in diff bail out early + if _, ok := diff[_y]; !ok { + return false + } + diff[_y] -= 1 + if diff[_y] == 0 { + delete(diff, _y) + } + } + return len(diff) == 0 +} + 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 884b45a7a..618a3815d 100644 --- a/field.go +++ b/field.go @@ -75,9 +75,6 @@ type Field struct { // Row attribute storage and cache rowAttrStore AttrStore - // Key/ID translation store. - translateStore TranslateStore - broadcaster broadcaster Stats stats.StatsClient @@ -101,7 +98,10 @@ type Field struct { logger logger.Logger snapshotQueue snapshotQueue - // Instantiates new translation store on open. + + translateStore TranslateStore + + // Instantiates new translation stores OpenTranslateStore OpenTranslateStoreFunc // Used for looking up a foreign index. @@ -314,12 +314,19 @@ func (f *Field) Index() string { return f.index } // Path returns the path the field was initialized with. func (f *Field) Path() string { return f.path } +// TranslateStorePath returns the translation database path for the field. +func (f *Field) TranslateStorePath() string { + return filepath.Join(f.path, "keys") +} + +// TranslateStore returns the field's translation store. +func (f *Field) TranslateStore() TranslateStore { + return f.translateStore +} + // RowAttrStore returns the attribute storage. func (f *Field) RowAttrStore() AttrStore { return f.rowAttrStore } -// TranslateStore returns the underlying translation store for the field. -func (f *Field) TranslateStore() TranslateStore { return f.translateStore } - // AvailableShards returns a bitmap of shards that contain data. func (f *Field) AvailableShards() *roaring.Bitmap { f.mu.RLock() @@ -513,16 +520,17 @@ func (f *Field) Open() error { return errors.Wrap(err, "opening attrstore") } - // If the field has a foreign index, and that index uses keys, - // then use that index's translateStore instead. + // Apply the field-specific translateStore. + if err := f.applyTranslateStore(); err != nil { + return errors.Wrap(err, "applying translate store") + } + + // If the field has a foreign index, make sure the index + // exists. if f.options.ForeignIndex != "" { if err := f.holder.checkForeignIndex(f); err != nil { return errors.Wrap(err, "checking foreign index") } - } else { - if err := f.applyTranslateStore(); err != nil { - return errors.Wrap(err, "applying translate store") - } } return nil @@ -539,29 +547,43 @@ func (f *Field) Open() error { 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) + f.translateStore, err = f.OpenTranslateStore(f.TranslateStorePath(), f.index, f.name, -1, -1) if err != nil { - return errors.Wrap(err, "opening translate store") + return errors.Wrap(err, "opening field translate store") } f.usesKeys = f.options.Keys + + // In the case where the field has a foreign index, set + // the usesKeys value accordingly. + if foreignIndexName := f.ForeignIndex(); foreignIndexName != "" { + if foreignIndex := f.holder.indexes[foreignIndexName]; foreignIndex != nil { + f.usesKeys = foreignIndex.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. +// applyForeignIndex used to set the field's translateStore to +// that of the foreign index, but since moving to partitioned +// translate stores on indexes, that doesn't happen anymore. +// So now all this method does is check that the foreign index +// actually exists. If we decided this was unnecessary (which +// it kind of is), we could remove the field.holder and all +// the logic which does this check on holder open after all +// indexes have opened. 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() + f.usesKeys = foreignIndex.Keys() + return nil +} + +// ForeignIndex returns the foreign index name attached to the field. +// Returns blank string if no foreign index exists. +func (f *Field) ForeignIndex() string { + return f.options.ForeignIndex } var fieldQueue = make(chan struct{}, 16) @@ -804,6 +826,13 @@ func (f *Field) Close() error { _ = f.rowAttrStore.Close() } + // Close field translation store. + if f.translateStore != nil { + if err := f.translateStore.Close(); err != nil { + return err + } + } + // Close all views. for _, view := range f.viewMap { if err := view.close(); err != nil { @@ -812,12 +841,6 @@ func (f *Field) Close() error { } f.viewMap = make(map[string]*view) - if f.translateStore != nil { - if err := f.translateStore.Close(); err != nil { - return err - } - } - return nil } @@ -1583,18 +1606,20 @@ func (f *Field) importValue(columnIDs []uint64, values []int64, options *ImportO requiredDepth = v } // Increase bit depth if required. - if requiredDepth > bsig.BitDepth { - if err := func() error { - f.mu.Lock() - defer f.mu.Unlock() + if err := func() error { + f.mu.Lock() + defer f.mu.Unlock() + bitDepth := bsig.BitDepth + if requiredDepth > bitDepth { bsig.BitDepth = requiredDepth f.options.BitDepth = requiredDepth return f.saveMeta() - }(); err != nil { - return errors.Wrap(err, "increasing bsi bit depth") + } else { + requiredDepth = bitDepth } - } else { - requiredDepth = bsig.BitDepth + return nil + }(); err != nil { + return errors.Wrap(err, "increasing bsi bit depth") } // Import into each fragment. diff --git a/field_internal_test.go b/field_internal_test.go index fd8786246..feea5501c 100644 --- a/field_internal_test.go +++ b/field_internal_test.go @@ -529,3 +529,50 @@ func TestField_ApplyOptions(t *testing.T) { } } } + +// Ensure that importValue handles requiredDepth correctly. +// This test sets the same column value to 1, then 8, then 1. +// A previous bug was incorrectly determining bitDepth based +// on the values in the import, and not taking existing values +// into consideration. This would cause an import of 1/8/1 +// to result in a value of 9 instead of 1. +func TestBSIGroup_importValue(t *testing.T) { + f := MustOpenField(OptFieldTypeInt(-100, 200)) + + options := &ImportOptions{} + for i, tt := range []struct { + columnIDs []uint64 + values []int64 + checkVal int64 + expCols []uint64 + }{ + { + []uint64{100}, + []int64{1}, + 1, + []uint64{100}, + }, + { + []uint64{100}, + []int64{8}, + 8, + []uint64{100}, + }, + { + []uint64{100}, + []int64{1}, + 1, + []uint64{100}, + }, + } { + if err := f.importValue(tt.columnIDs, tt.values, options); err != nil { + t.Fatalf("test %d, importing values: %s", i, err.Error()) + } + + if row, err := f.Range(f.name, pql.EQ, tt.checkVal); err != nil { + t.Fatalf("test %d, getting range: %s", i, err.Error()) + } else if !reflect.DeepEqual(row.Columns(), tt.expCols) { + t.Fatalf("test %d, expected columns: %v, but got: %v", i, tt.expCols, row.Columns()) + } + } +} diff --git a/handler.go b/handler.go index 0d2535884..e89791268 100644 --- a/handler.go +++ b/handler.go @@ -226,3 +226,17 @@ type TranslateKeysRequest struct { type TranslateKeysResponse struct { IDs []uint64 } + +// TranslateIDsRequest describes the structure of a request +// for a batch of id translations. +type TranslateIDsRequest struct { + Index string + Field string + IDs []uint64 +} + +// TranslateIDsResponse is the structured response of a id +// translation request. +type TranslateIDsResponse struct { + Keys []string +} diff --git a/holder.go b/holder.go index 9cd93bd3e..63ea13896 100644 --- a/holder.go +++ b/holder.go @@ -33,6 +33,7 @@ import ( "github.com/pilosa/pilosa/v2/tracing" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" + "golang.org/x/sync/errgroup" ) const ( @@ -50,6 +51,9 @@ const ( type Holder struct { mu sync.RWMutex + // Partition count used by translation. + partitionN int + // Indexes by name. indexes map[string]*Index @@ -77,13 +81,9 @@ type Holder struct { snapshotQueue snapshotQueue - // Manages replication from the primary node. - primaryTranslateNode *Node - translateStoreReplicator *holderTranslateStoreReplicator - - // Instantiates new translation stores for indexes & fields. - OpenTranslateStore OpenTranslateStoreFunc // local store - OpenTranslateReader OpenTranslateReaderFunc // replication + // Instantiates new translation stores + OpenTranslateStore OpenTranslateStoreFunc + OpenTranslateReader OpenTranslateReaderFunc // Queue of fields (having a foreign index) which have // opened before their foreign index has opened. @@ -123,10 +123,11 @@ func (lc *lockedChan) Recv() { } // NewHolder returns a new instance of Holder. -func NewHolder() *Holder { +func NewHolder(partitionN int) *Holder { return &Holder{ - indexes: make(map[string]*Index), - closing: make(chan struct{}), + partitionN: partitionN, + indexes: make(map[string]*Index), + closing: make(chan struct{}), opened: lockedChan{ch: make(chan struct{})}, @@ -138,8 +139,6 @@ func NewHolder() *Holder { cacheFlushInterval: defaultCacheFlushInterval, Logger: logger.NopLogger, - - OpenTranslateStore: OpenInMemTranslateStore, } } @@ -280,13 +279,6 @@ func (h *Holder) Close() error { h.opened.ch = make(chan struct{}) h.opened.mu.Unlock() - h.mu.Lock() - if h.translateStoreReplicator != nil { - h.translateStoreReplicator.Close() - h.translateStoreReplicator = nil - } - h.mu.Unlock() - return nil } @@ -500,14 +492,11 @@ func (h *Holder) createIndex(name string, opt IndexOptions) (*Index, error) { // Update options. h.indexes[index.Name()] = index - // Restart replication. - go h.refreshTranslateStoreReplicator() - return index, nil } func (h *Holder) newIndex(path, name string) (*Index, error) { - index, err := NewIndex(path, name) + index, err := NewIndex(path, name, h.partitionN) if err != nil { return nil, err } @@ -518,7 +507,6 @@ func (h *Holder) newIndex(path, name string) (*Index, error) { index.columnAttrs = h.NewAttrStore(filepath.Join(index.path, ".data")) index.snapshotQueue = h.snapshotQueue index.holder = h - index.OpenTranslateStore = h.OpenTranslateStore return index, nil } @@ -715,243 +703,6 @@ func (h *Holder) logStartup() error { return nil } -// TranslateStore returns store for the given index or field. -func (h *Holder) TranslateStore(index, field string) (TranslateStore, error) { - if field == "" { - idx := h.Index(index) - if idx == nil { - return nil, ErrIndexNotFound - } - return idx.TranslateStore(), nil - } - - f := h.Field(index, field) - if f == nil { - return nil, ErrFieldNotFound - } - return f.TranslateStore(), nil -} - -// TranslateOffsetMap returns a map of offsets for all indexes & fields. -func (h *Holder) TranslateOffsetMap() (TranslateOffsetMap, error) { - m := make(TranslateOffsetMap) - for _, idx := range h.Indexes() { - id, err := idx.TranslateStore().MaxID() - if err != nil { - return nil, err - } - m.SetIndexOffset(idx.Name(), id+1) - - for _, field := range idx.Fields() { - id, err := field.TranslateStore().MaxID() - if err != nil { - return nil, err - } - m.SetFieldOffset(idx.Name(), field.Name(), id+1) - } - } - return m, nil -} - -func (h *Holder) setTranslateStoreReadOnly(v bool) { - for _, idx := range h.Indexes() { - idx.TranslateStore().SetReadOnly(v) - for _, field := range idx.Fields() { - field.TranslateStore().SetReadOnly(v) - } - } -} - -func (h *Holder) setPrimaryTranslateStore(node *Node) error { - if node != nil && h.OpenTranslateReader == nil { - return nil - } - h.mu.Lock() - h.primaryTranslateNode = node.Clone() - h.mu.Unlock() - - go h.refreshTranslateStoreReplicator() - return nil -} - -func (h *Holder) refreshTranslateStoreReplicator() { - h.mu.RLock() - node := h.primaryTranslateNode - h.mu.RUnlock() - - var nodeURL string - if node != nil { - u := node.URI.URL() - nodeURL = u.String() - } - - // Stop existing replication, if running. - h.mu.Lock() - if h.translateStoreReplicator != nil { - h.translateStoreReplicator.Close() - h.translateStoreReplicator = nil - } - h.mu.Unlock() - - // Set all stores read only mode based on if we have a primary. - h.setTranslateStoreReadOnly(node != nil) - - // Start replication monitor, if needed. - h.mu.Lock() - defer h.mu.Unlock() - if nodeURL != "" { - h.translateStoreReplicator = newHolderTranslateStoreReplicator(h, nodeURL) - h.translateStoreReplicator.logger = h.Logger - if err := h.translateStoreReplicator.Open(); err != nil { - h.Logger.Printf("cannot open translate store replicator: %s", err) - } - } -} - -// TranslateEntryReader returns a reader that merges all index & field reader -// that are specified in the offsets map. -func (h *Holder) TranslateEntryReader(ctx context.Context, offsets TranslateOffsetMap) (_ TranslateEntryReader, err error) { - // Ensure all readers are cleaned up if any error. - var a []TranslateEntryReader - defer func() { - if err != nil { - for i := range a { - a[i].Close() - } - } - }() - - // Fetch all readers. - for indexName, m := range offsets { - for fieldName, offset := range m { - var store TranslateStore - - idx := h.Index(indexName) - if idx == nil { - return nil, ErrIndexNotFound - } - - // Fetch from index or field store. - if fieldName == "" { - store = idx.TranslateStore() - } else { - f := idx.Field(fieldName) - if f == nil { - return nil, ErrFieldNotFound - } - store = f.TranslateStore() - } - - // Generate reader and append to multireader. - r, err := store.EntryReader(ctx, uint64(offset)) - if err != nil { - return nil, errors.Wrap(err, "translate reader") - } - a = append(a, r) - } - } - - return NewMultiTranslateEntryReader(ctx, a), nil -} - -// holderTranslateStoreReplicator manages the replication of translation store -// data from a primary store to the local replica. Continually tries to -// reconnect on disconnect. -type holderTranslateStoreReplicator struct { - ctx context.Context - cancel func() - wg sync.WaitGroup - - holder *Holder - nodeURL string - - logger logger.Logger -} - -func newHolderTranslateStoreReplicator(h *Holder, nodeURL string) *holderTranslateStoreReplicator { - r := &holderTranslateStoreReplicator{ - holder: h, - nodeURL: nodeURL, - logger: logger.NopLogger, - } - r.ctx, r.cancel = context.WithCancel(context.Background()) - return r -} - -// Open starts the background monitoring goroutine. -func (r *holderTranslateStoreReplicator) Open() error { - r.wg.Add(1) - go func() { defer r.wg.Done(); r.monitor() }() - return nil -} - -// Close stops the replicator. -func (r *holderTranslateStoreReplicator) Close() error { - r.cancel() - return nil -} - -// monitor runs in a background goroutine and continually tries to connect and -// stream translate changes from the primary store. -func (r *holderTranslateStoreReplicator) monitor() { - for { - select { - case <-r.ctx.Done(): - return - default: - if err := r.replicate(); err != nil { - r.logger.Printf("cannot replicate: nodeURL=%s err=%s", r.nodeURL, err) - } - time.Sleep(1 * time.Second) - } - } -} - -func (r *holderTranslateStoreReplicator) replicate() error { - // Determine the offsets of every index & field store. - offsets, err := r.holder.TranslateOffsetMap() - if err != nil { - return err - } else if len(offsets) == 0 { - return nil - } - - // Begin streaming from remote primary. - rd, err := r.holder.OpenTranslateReader(r.ctx, r.nodeURL, offsets) - if err != nil { - return err - } - defer rd.Close() - - for { - var entry TranslateEntry - if err := rd.ReadEntry(&entry); err != nil { - return err - } - - // Find appropriate store. - var store TranslateStore - if entry.Field == "" { - idx := r.holder.Index(entry.Index) - if idx == nil { - return ErrIndexNotFound - } - store = idx.TranslateStore() - } else { - f := r.holder.Field(entry.Index, entry.Field) - if f == nil { - return ErrFieldNotFound - } - store = f.TranslateStore() - } - - // Apply replication to store. - if err := store.ForceSet(entry.ID, entry.Key); err != nil { - return err - } - } -} - // holderSyncer is an active anti-entropy tool that compares the local holder // with a remote holder based on block checksums and resolves differences. type holderSyncer struct { @@ -962,6 +713,9 @@ type holderSyncer struct { Node *Node Cluster *cluster + // Translation sync handling. + readers []TranslateEntryReader + // Stats Stats stats.StatsClient @@ -1175,6 +929,200 @@ func (s *holderSyncer) syncFragment(index, field, view string, shard uint64) err return nil } +// ResetTranslationSync reinitializes streaming sync of translation data. +func (s *holderSyncer) ResetTranslationSync() error { + // Stop existing streams. + if err := s.stopTranslationSync(); err != nil { + return errors.Wrap(err, "stop translation sync") + } + + // Set read-only flag for all translation stores. + s.setTranslateReadOnlyFlags() + + // Connect to each node that has a primary for which we are a replica. + if err := s.initializeIndexTranslateReplication(); err != nil { + return errors.Wrap(err, "initialize index translate replication") + } + + // Connect to coordinator to stream field data. + if err := s.initializeFieldTranslateReplication(); err != nil { + return errors.Wrap(err, "initialize field translate replication") + } + return nil +} + +// stopTranslationSync closes and waits for all outstanding translation readers +// to complete. This should be called before reconnecting to the cluster in case +// of a cluster resize or schema change. +func (s *holderSyncer) stopTranslationSync() error { + var g errgroup.Group + for i := range s.readers { + rd := s.readers[i] + g.Go(func() error { + return rd.Close() + }) + } + return g.Wait() +} + +// setTranslateReadOnlyFlags updates all translation stores to enabled or disable +// writing new translation keys. Index stores are writable if the node owns the +// partition. Field stores are writable if the node is the coordinator. +func (s *holderSyncer) setTranslateReadOnlyFlags() { + isCoordinator := s.Cluster.isCoordinator() + + for _, index := range s.Holder.Indexes() { + for partitionID := 0; partitionID < s.Cluster.partitionN; partitionID++ { + ownsPartition := s.Cluster.ownsPartition(s.Node.ID, partitionID) + index.TranslateStore(partitionID).SetReadOnly(!ownsPartition) + } + + for _, field := range index.Fields() { + field.TranslateStore().SetReadOnly(!isCoordinator) + } + } +} + +// initializeIndexTranslateReplication connects to each node that is the +// primary for a partition that we are a replica of. +func (s *holderSyncer) initializeIndexTranslateReplication() error { + for _, node := range s.Cluster.Nodes() { + // Skip local node. + if node.ID == s.Node.ID { + continue + } + + // Build a map of partition offsets to stream from. + m := make(TranslateOffsetMap) + for _, index := range s.Holder.Indexes() { + if !index.Keys() { + continue + } + + for partitionID := 0; partitionID < s.Cluster.partitionN; partitionID++ { + partitionNodes := s.Cluster.partitionNodes(partitionID) + isPrimary := partitionNodes[0].ID == node.ID // remote is primary? + isReplica := Nodes(partitionNodes[1:]).ContainsID(s.Node.ID) // local is replica? + if !isPrimary || !isReplica { + continue + } + + store := index.TranslateStore(partitionID) + offset, err := store.MaxID() + if err != nil { + return errors.Wrapf(err, "cannot determine max id for %q", index.Name()) + } + m.SetIndexPartitionOffset(index.Name(), partitionID, offset) + } + } + + // Skip if no replication required. + if len(m) == 0 { + continue + } + + // Connect to remote not and begin streaming. + rd, err := s.Holder.OpenTranslateReader(context.Background(), node.URI.String(), m) + if err != nil { + return err + } + s.readers = append(s.readers, rd) + + go func() { defer rd.Close(); s.readIndexTranslateReader(rd) }() + } + + return nil +} + +// initializeFieldTranslateReplication connects the coordinator to stream field data. +func (s *holderSyncer) initializeFieldTranslateReplication() error { + // Skip if coordinator. + if s.Cluster.Node.IsCoordinator { + return nil + } + + // Build a map of partition offsets to stream from. + m := make(TranslateOffsetMap) + for _, index := range s.Holder.Indexes() { + if !index.Keys() { + continue + } + for _, field := range index.Fields() { + store := field.TranslateStore() + offset, err := store.MaxID() + if err != nil { + return errors.Wrapf(err, "cannot determine max id for %q/%q", index.Name(), field.Name()) + } + m.SetFieldOffset(index.Name(), field.Name(), offset) + } + } + + // Skip if no replication required. + if len(m) == 0 { + return nil + } + + // Connect to coordinator and begin streaming. + coordinator := s.Cluster.coordinatorNode() + rd, err := s.Holder.OpenTranslateReader(context.Background(), coordinator.URI.String(), m) + if err != nil { + return err + } + s.readers = append(s.readers, rd) + + go func() { defer rd.Close(); s.readFieldTranslateReader(rd) }() + + return nil +} + +func (s *holderSyncer) readIndexTranslateReader(rd TranslateEntryReader) { + for { + var entry TranslateEntry + if err := rd.ReadEntry(&entry); err != nil { + s.Holder.Logger.Printf("cannot read index translate entry: %s", err) + return + } + + // Find appropriate store. + idx := s.Holder.Index(entry.Index) + if idx == nil { + s.Holder.Logger.Printf("index not found: %q", entry.Index) + return + } + + // Apply replication to store. + store := idx.TranslateStore(s.Cluster.keyPartition(entry.Index, entry.Key)) + if err := store.ForceSet(entry.ID, entry.Key); err != nil { + s.Holder.Logger.Printf("cannot force set index translation data: %d=%q", entry.ID, entry.Key) + return + } + } +} + +func (s *holderSyncer) readFieldTranslateReader(rd TranslateEntryReader) { + for { + var entry TranslateEntry + if err := rd.ReadEntry(&entry); err != nil { + s.Holder.Logger.Printf("cannot read field translate entry: %s", err) + return + } + + // Find appropriate store. + f := s.Holder.Field(entry.Index, entry.Field) + if f == nil { + s.Holder.Logger.Printf("field not found: %q/%q", entry.Index, entry.Field) + return + } + + // Apply replication to store. + store := f.TranslateStore() + if err := store.ForceSet(entry.ID, entry.Key); err != nil { + s.Holder.Logger.Printf("cannot force set field translation data: %d=%q", entry.ID, entry.Key) + return + } + } +} + // holderCleaner removes fragments and data files that are no longer used. type holderCleaner struct { Node *Node diff --git a/holder_internal_test.go b/holder_internal_test.go index 062b3e808..afee39c6c 100644 --- a/holder_internal_test.go +++ b/holder_internal_test.go @@ -39,7 +39,7 @@ func (h *tHolder) Close() error { // Note that the holder must be Closed first. func (h *tHolder) Reopen() error { path, logger := h.Path, h.Holder.Logger - h.Holder = NewHolder() + h.Holder = NewHolder(DefaultPartitionN) h.Holder.Path = path h.Holder.Logger = logger return h.Holder.Open() @@ -51,7 +51,7 @@ func newHolder() *tHolder { panic(err) } - h := &tHolder{Holder: NewHolder()} + h := &tHolder{Holder: NewHolder(DefaultPartitionN)} h.Path = path return h } @@ -302,7 +302,7 @@ func TestHolderCleaner_CleanHolder(t *testing.T) { // Ensure holder can reopen. func TestHolderCleaner_Reopen(t *testing.T) { - h := NewHolder() + h := NewHolder(DefaultPartitionN) h.Path = "path" err := h.Open() if err != nil { diff --git a/http/client.go b/http/client.go index 1c5de0197..769d18d46 100644 --- a/http/client.go +++ b/http/client.go @@ -1124,6 +1124,106 @@ func (c *InternalClient) SendMessage(ctx context.Context, uri *pilosa.URI, msg [ return errors.Wrap(resp.Body.Close(), "closing response body") } +// TranslateKeysNode sends a key translation request to a specific node. +func (c *InternalClient) TranslateKeysNode(ctx context.Context, uri *pilosa.URI, index, field string, keys []string) ([]uint64, error) { + span, ctx := tracing.StartSpanFromContext(ctx, "TranslateKeysNode") + defer span.Finish() + + if index == "" { + return nil, pilosa.ErrIndexRequired + } + + buf, err := c.serializer.Marshal(&pilosa.TranslateKeysRequest{ + Index: index, + Field: field, + Keys: keys, + }) + if err != nil { + return nil, errors.Wrap(err, "marshaling TranslateKeysRequest") + } + + // Create HTTP request. + u := uri.Path("/internal/translate/keys") + req, err := http.NewRequest("POST", u, bytes.NewReader(buf)) + if err != nil { + return nil, errors.Wrap(err, "creating request") + } + + req.Header.Set("Content-Length", strconv.Itoa(len(buf))) + req.Header.Set("Content-Type", "application/x-protobuf") + req.Header.Set("Accept", "application/x-protobuf") + req.Header.Set("User-Agent", "pilosa/"+pilosa.Version) + + // Execute request against the host. + resp, err := c.executeRequest(req.WithContext(ctx)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + // Read body and unmarshal response. + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, errors.Wrap(err, "reading") + } + + tkresp := &pilosa.TranslateKeysResponse{} + if err := c.serializer.Unmarshal(body, tkresp); err != nil { + return nil, fmt.Errorf("unmarshal response: %s", err) + } + return tkresp.IDs, nil +} + +// TranslateIDsNode sends an id translation request to a specific node. +func (c *InternalClient) TranslateIDsNode(ctx context.Context, uri *pilosa.URI, index, field string, ids []uint64) ([]string, error) { + span, ctx := tracing.StartSpanFromContext(ctx, "TranslateIDsNode") + defer span.Finish() + + if index == "" { + return nil, pilosa.ErrIndexRequired + } + + buf, err := c.serializer.Marshal(&pilosa.TranslateIDsRequest{ + Index: index, + Field: field, + IDs: ids, + }) + if err != nil { + return nil, errors.Wrap(err, "marshaling TranslateIDsRequest") + } + + // Create HTTP request. + u := uri.Path("/internal/translate/ids") + req, err := http.NewRequest("POST", u, bytes.NewReader(buf)) + if err != nil { + return nil, errors.Wrap(err, "creating request") + } + + req.Header.Set("Content-Length", strconv.Itoa(len(buf))) + req.Header.Set("Content-Type", "application/x-protobuf") + req.Header.Set("Accept", "application/x-protobuf") + req.Header.Set("User-Agent", "pilosa/"+pilosa.Version) + + // Execute request against the host. + resp, err := c.executeRequest(req.WithContext(ctx)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + // Read body and unmarshal response. + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, errors.Wrap(err, "reading") + } + + tkresp := &pilosa.TranslateIDsResponse{} + if err := c.serializer.Unmarshal(body, tkresp); err != nil { + return nil, fmt.Errorf("unmarshal response: %s", err) + } + return tkresp.Keys, nil +} + // executeRequest executes the given request and checks the Response. For // responses with non-2XX status, the body is read and closed, and an error is // returned. If the error is nil, the caller must ensure that the response body diff --git a/http/client_test.go b/http/client_test.go index 077a11ff4..9405c0230 100644 --- a/http/client_test.go +++ b/http/client_test.go @@ -294,22 +294,29 @@ func TestClient_Export(t *testing.T) { buf := bytes.NewBuffer(nil) bw := bufio.NewWriter(buf) - // Send export request. - if err := c.ExportCSV(context.Background(), "keyed", "unkeyedf", 0, bw); err != nil { - t.Fatal(err) + // Send export request for every partition. + for i := 0; i < pilosa.DefaultPartitionN; i++ { + if err := c.ExportCSV(context.Background(), "keyed", "unkeyedf", uint64(i), bw); err != nil { + t.Fatal(err) + } } got := buf.String() - // Expected output. - exp := "" - for _, bit := range data { - exp += fmt.Sprintf("%d,%s\n", bit.RowID, bit.ColumnKey) - } + // Expected output is not sorted because of key sharding. + exp := "" + + "2,col200\n" + + "2,col201\n" + + "2,col202\n" + + "2,col203\n" + + "1,col103\n" + + "1,col102\n" + + "1,col101\n" + + "1,col100\n" // Verify data. if got != exp { - t.Fatalf("unexpected export data: %s", got) + t.Fatalf("unexpected export data: %q, expected %q", got, exp) } }) @@ -329,21 +336,28 @@ func TestClient_Export(t *testing.T) { bw := bufio.NewWriter(buf) // Send export request. - if err := c.ExportCSV(context.Background(), "keyed", "keyedf", 0, bw); err != nil { - t.Fatal(err) + for i := 0; i < pilosa.DefaultPartitionN; i++ { + if err := c.ExportCSV(context.Background(), "keyed", "keyedf", uint64(i), bw); err != nil { + t.Fatal(err) + } } got := buf.String() - // Expected output. - exp := "" - for _, bit := range data { - exp += fmt.Sprintf("%s,%s\n", bit.RowKey, bit.ColumnKey) - } + // Expected output is unsorted because of key sharding. + exp := "" + + "row2,col200\n" + + "row2,col201\n" + + "row2,col202\n" + + "row2,col203\n" + + "row1,col103\n" + + "row1,col102\n" + + "row1,col101\n" + + "row1,col100\n" // Verify data. if got != exp { - t.Fatalf("unexpected export data: %s", got) + t.Fatalf("unexpected export data: %q, expected %q", got, exp) } }) } diff --git a/http/handler.go b/http/handler.go index 1ea09cd09..2da97a809 100644 --- a/http/handler.go +++ b/http/handler.go @@ -309,6 +309,7 @@ func newRouter(handler *Handler) *mux.Router { router.HandleFunc("/internal/index/{index}/attr/diff", handler.handlePostIndexAttrDiff).Methods("POST").Name("PostIndexAttrDiff") router.HandleFunc("/internal/translate/data", handler.handlePostTranslateData).Methods("POST").Name("PostTranslateData") router.HandleFunc("/internal/translate/keys", handler.handlePostTranslateKeys).Methods("POST").Name("PostTranslateKeys") + router.HandleFunc("/internal/translate/ids", handler.handlePostTranslateIDs).Methods("POST").Name("PostTranslateIDs") router.HandleFunc("/internal/index/{index}/field/{field}/attr/diff", handler.handlePostFieldAttrDiff).Methods("POST").Name("PostFieldAttrDiff") router.HandleFunc("/internal/index/{index}/field/{field}/remote-available-shards/{shardID}", handler.handleDeleteRemoteAvailableShard).Methods("DELETE") router.HandleFunc("/internal/nodes", handler.handleGetNodes).Methods("GET").Name("GetNodes") @@ -1766,11 +1767,35 @@ func (h *Handler) handlePostTranslateKeys(w http.ResponseWriter, r *http.Request return } - buf, err := h.api.TranslateKeys(r.Body) + buf, err := h.api.TranslateKeys(r.Context(), r.Body) if err != nil { http.Error(w, fmt.Sprintf("translate keys: %v", err), http.StatusInternalServerError) } + // Write response. + _, err = w.Write(buf) + if err != nil { + h.logger.Printf("writing translate keys response: %v", err) + return + } +} + +func (h *Handler) handlePostTranslateIDs(w http.ResponseWriter, r *http.Request) { + // Verify that request is only communicating over protobufs. + if r.Header.Get("Content-Type") != "application/x-protobuf" { + http.Error(w, "Unsupported media type", http.StatusUnsupportedMediaType) + return + } else if r.Header.Get("Accept") != "application/x-protobuf" { + http.Error(w, "Not acceptable", http.StatusNotAcceptable) + return + } + + buf, err := h.api.TranslateIDs(r.Context(), r.Body) + if err != nil { + http.Error(w, fmt.Sprintf("translate ids: %v", err), http.StatusInternalServerError) + return + } + // Write response. _, err = w.Write(buf) if err != nil { diff --git a/index.go b/index.go index c0659f733..bc6293b1b 100644 --- a/index.go +++ b/index.go @@ -21,6 +21,7 @@ import ( "os" "path/filepath" "sort" + "strconv" "sync" "time" @@ -44,6 +45,9 @@ type Index struct { trackExistence bool existenceFld *Field + // Partitions used by translation. + partitionN int + // Fields by name. fields map[string]*Field @@ -52,33 +56,34 @@ type Index struct { // Column attribute storage and cache. columnAttrs AttrStore - translateStore TranslateStore - broadcaster broadcaster Stats stats.StatsClient logger logger.Logger snapshotQueue snapshotQueue - // Used for notifying holder when a field is added. - // Also passed to field for foreign-index lookup. + // Passed to field for foreign-index lookup. holder *Holder - // Instantiates new translation stores for fields. + // Per-partition translation stores + translateStores map[int]TranslateStore + + // Instantiates new translation stores OpenTranslateStore OpenTranslateStoreFunc } // NewIndex returns a new instance of Index. -func NewIndex(path, name string) (*Index, error) { +func NewIndex(path, name string, partitionN int) (*Index, error) { err := validateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") } return &Index{ - path: path, - name: name, - fields: make(map[string]*Field), + path: path, + name: name, + partitionN: partitionN, + fields: make(map[string]*Field), newAttrStore: newNopAttrStore, columnAttrs: nopStore, @@ -88,6 +93,8 @@ func NewIndex(path, name string) (*Index, error) { logger: logger.NopLogger, trackExistence: true, + translateStores: make(map[int]TranslateStore), + OpenTranslateStore: OpenInMemTranslateStore, }, nil } @@ -98,15 +105,22 @@ func (i *Index) Name() string { return i.name } // Path returns the path the index was initialized with. func (i *Index) Path() string { return i.path } +// TranslateStorePath returns the translation database path for a partition. +func (i *Index) TranslateStorePath(partitionID int) string { + return filepath.Join(i.path, "keys", strconv.Itoa(partitionID)) +} + +// TranslateStore returns the translation store for a given partition. +func (i *Index) TranslateStore(partitionID int) TranslateStore { + return i.translateStores[partitionID] +} + // Keys returns true if the index uses string keys. func (i *Index) Keys() bool { return i.keys } // ColumnAttrStore returns the storage for column attributes. func (i *Index) ColumnAttrStore() AttrStore { return i.columnAttrs } -// TranslateStore returns the underlying translation store for the index. -func (i *Index) TranslateStore() TranslateStore { return i.translateStore } - // Options returns all options for this index. func (i *Index) Options() IndexOptions { i.mu.RLock() @@ -150,9 +164,13 @@ func (i *Index) Open() (err error) { return errors.Wrap(err, "opening attrstore") } - // Instantiate & open translation store. - if i.translateStore, err = i.OpenTranslateStore(filepath.Join(i.path, "keys"), i.name, ""); err != nil { - return errors.Wrap(err, "opening translate store") + i.logger.Debugf("open translate store for index: %s", i.name) + for partitionID := 0; partitionID < i.partitionN; partitionID++ { + store, err := i.OpenTranslateStore(i.TranslateStorePath(partitionID), i.name, "", partitionID, i.partitionN) + if err != nil { + return errors.Wrap(err, "opening index translate store") + } + i.translateStores[partitionID] = store } return nil @@ -276,6 +294,14 @@ func (i *Index) Close() error { // Close the attribute store. i.columnAttrs.Close() + // Close partitioned translation stores. + for _, store := range i.translateStores { + if err := store.Close(); err != nil { + return errors.Wrap(err, "closing translation store") + } + } + i.translateStores = make(map[int]TranslateStore) + // Close all fields. for _, f := range i.fields { if err := f.Close(); err != nil { @@ -284,12 +310,6 @@ func (i *Index) Close() error { } i.fields = make(map[string]*Field) - if i.translateStore != nil { - if err := i.translateStore.Close(); err != nil { - return err - } - } - return nil } @@ -450,11 +470,6 @@ func (i *Index) createField(name string, opt FieldOptions) (*Field, error) { // Add to index's field lookup. i.fields[name] = f - // Update replication, if needed. - if i.holder != nil { - go i.holder.refreshTranslateStoreReplicator() - } - return f, nil } diff --git a/index_internal_test.go b/index_internal_test.go index dc0296049..026607da4 100644 --- a/index_internal_test.go +++ b/index_internal_test.go @@ -25,7 +25,7 @@ func mustOpenIndex(opt IndexOptions) *Index { if err != nil { panic(err) } - index, err := NewIndex(path, "i") + index, err := NewIndex(path, "i", DefaultPartitionN) if err != nil { panic(err) } diff --git a/index_test.go b/index_test.go index 13084e322..77736331c 100644 --- a/index_test.go +++ b/index_test.go @@ -217,7 +217,7 @@ func TestIndex_InvalidName(t *testing.T) { if err != nil { panic(err) } - index, err := pilosa.NewIndex(path, "ABC") + index, err := pilosa.NewIndex(path, "ABC", pilosa.DefaultPartitionN) if err == nil { t.Fatalf("should have gotten an error on index name with caps") } diff --git a/internal/private.pb.go b/internal/private.pb.go index df22cdc09..f64f9b5b7 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -3,13 +3,11 @@ package internal -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -20,7 +18,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type IndexMeta struct { Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` @@ -34,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_d2a91b51c7bdc125, []int{0} + return fileDescriptor_private_54a82f4803638cdd, []int{0} } func (m *IndexMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -44,15 +42,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *IndexMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexMeta.Merge(m, src) +func (dst *IndexMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexMeta.Merge(dst, src) } func (m *IndexMeta) XXX_Size() int { return m.Size() @@ -99,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_d2a91b51c7bdc125, []int{1} + return fileDescriptor_private_54a82f4803638cdd, []int{1} } func (m *FieldOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -109,15 +107,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *FieldOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldOptions.Merge(m, src) +func (dst *FieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(dst, src) } func (m *FieldOptions) XXX_Size() int { return m.Size() @@ -223,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_d2a91b51c7bdc125, []int{2} + return fileDescriptor_private_54a82f4803638cdd, []int{2} } func (m *ImportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -233,15 +231,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportResponse.Merge(m, src) +func (dst *ImportResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportResponse.Merge(dst, src) } func (m *ImportResponse) XXX_Size() int { return m.Size() @@ -274,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_d2a91b51c7bdc125, []int{3} + return fileDescriptor_private_54a82f4803638cdd, []int{3} } func (m *BlockDataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -284,15 +282,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BlockDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockDataRequest.Merge(m, src) +func (dst *BlockDataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockDataRequest.Merge(dst, src) } func (m *BlockDataRequest) XXX_Size() int { return m.Size() @@ -339,8 +337,8 @@ func (m *BlockDataRequest) GetBlock() uint64 { } type BlockDataResponse struct { - 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"` + RowIDs []uint64 `protobuf:"varint,1,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,2,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -350,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_d2a91b51c7bdc125, []int{4} + return fileDescriptor_private_54a82f4803638cdd, []int{4} } func (m *BlockDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,15 +358,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BlockDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockDataResponse.Merge(m, src) +func (dst *BlockDataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockDataResponse.Merge(dst, src) } func (m *BlockDataResponse) XXX_Size() int { return m.Size() @@ -394,7 +392,7 @@ func (m *BlockDataResponse) GetColumnIDs() []uint64 { } type Cache struct { - IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs,proto3" json:"IDs,omitempty"` + IDs []uint64 `protobuf:"varint,1,rep,packed,name=IDs" json:"IDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -404,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_d2a91b51c7bdc125, []int{5} + return fileDescriptor_private_54a82f4803638cdd, []int{5} } func (m *Cache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,15 +412,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Cache) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cache.Merge(m, src) +func (dst *Cache) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cache.Merge(dst, src) } func (m *Cache) XXX_Size() int { return m.Size() @@ -441,7 +439,7 @@ func (m *Cache) GetIDs() []uint64 { } type MaxShards struct { - 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"` + Standard map[string]uint64 `protobuf:"bytes,1,rep,name=Standard" json:"Standard,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -451,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_d2a91b51c7bdc125, []int{6} + return fileDescriptor_private_54a82f4803638cdd, []int{6} } func (m *MaxShards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -461,15 +459,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *MaxShards) XXX_Merge(src proto.Message) { - xxx_messageInfo_MaxShards.Merge(m, src) +func (dst *MaxShards) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaxShards.Merge(dst, src) } func (m *MaxShards) XXX_Size() int { return m.Size() @@ -500,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_d2a91b51c7bdc125, []int{7} + return fileDescriptor_private_54a82f4803638cdd, []int{7} } func (m *CreateShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -510,15 +508,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CreateShardMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateShardMessage.Merge(m, src) +func (dst *CreateShardMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateShardMessage.Merge(dst, src) } func (m *CreateShardMessage) XXX_Size() int { return m.Size() @@ -561,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_d2a91b51c7bdc125, []int{8} + return fileDescriptor_private_54a82f4803638cdd, []int{8} } func (m *DeleteIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -571,15 +569,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DeleteIndexMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexMessage.Merge(m, src) +func (dst *DeleteIndexMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteIndexMessage.Merge(dst, src) } func (m *DeleteIndexMessage) XXX_Size() int { return m.Size() @@ -599,7 +597,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,proto3" json:"Meta,omitempty"` + Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -609,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_d2a91b51c7bdc125, []int{9} + return fileDescriptor_private_54a82f4803638cdd, []int{9} } func (m *CreateIndexMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -619,15 +617,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CreateIndexMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexMessage.Merge(m, src) +func (dst *CreateIndexMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateIndexMessage.Merge(dst, src) } func (m *CreateIndexMessage) XXX_Size() int { return m.Size() @@ -655,7 +653,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,proto3" json:"Meta,omitempty"` + Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta" json:"Meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -665,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_d2a91b51c7bdc125, []int{10} + return fileDescriptor_private_54a82f4803638cdd, []int{10} } func (m *CreateFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -675,15 +673,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CreateFieldMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateFieldMessage.Merge(m, src) +func (dst *CreateFieldMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateFieldMessage.Merge(dst, src) } func (m *CreateFieldMessage) XXX_Size() int { return m.Size() @@ -727,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_d2a91b51c7bdc125, []int{11} + return fileDescriptor_private_54a82f4803638cdd, []int{11} } func (m *DeleteFieldMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -737,15 +735,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DeleteFieldMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteFieldMessage.Merge(m, src) +func (dst *DeleteFieldMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteFieldMessage.Merge(dst, src) } func (m *DeleteFieldMessage) XXX_Size() int { return m.Size() @@ -783,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_d2a91b51c7bdc125, []int{12} + return fileDescriptor_private_54a82f4803638cdd, []int{12} } func (m *DeleteAvailableShardMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -793,15 +791,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DeleteAvailableShardMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAvailableShardMessage.Merge(m, src) +func (dst *DeleteAvailableShardMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAvailableShardMessage.Merge(dst, src) } func (m *DeleteAvailableShardMessage) XXX_Size() int { return m.Size() @@ -835,8 +833,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,proto3" json:"Meta,omitempty"` - Views []string `protobuf:"bytes,3,rep,name=Views,proto3" json:"Views,omitempty"` + Meta *FieldOptions `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"` + Views []string `protobuf:"bytes,3,rep,name=Views" json:"Views,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -846,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_d2a91b51c7bdc125, []int{13} + return fileDescriptor_private_54a82f4803638cdd, []int{13} } func (m *Field) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -856,15 +854,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Field) XXX_Merge(src proto.Message) { - xxx_messageInfo_Field.Merge(m, src) +func (dst *Field) XXX_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(dst, src) } func (m *Field) XXX_Size() int { return m.Size() @@ -897,7 +895,7 @@ func (m *Field) GetViews() []string { } type Schema struct { - Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes,proto3" json:"Indexes,omitempty"` + Indexes []*Index `protobuf:"bytes,1,rep,name=Indexes" json:"Indexes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -907,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_d2a91b51c7bdc125, []int{14} + return fileDescriptor_private_54a82f4803638cdd, []int{14} } func (m *Schema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,15 +915,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Schema) XXX_Merge(src proto.Message) { - xxx_messageInfo_Schema.Merge(m, src) +func (dst *Schema) XXX_Merge(src proto.Message) { + xxx_messageInfo_Schema.Merge(dst, src) } func (m *Schema) XXX_Size() int { return m.Size() @@ -945,7 +943,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,proto3" json:"Fields,omitempty"` + Fields []*Field `protobuf:"bytes,4,rep,name=Fields" json:"Fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -955,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_d2a91b51c7bdc125, []int{15} + return fileDescriptor_private_54a82f4803638cdd, []int{15} } func (m *Index) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -965,15 +963,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(m, src) +func (dst *Index) XXX_Merge(src proto.Message) { + xxx_messageInfo_Index.Merge(dst, src) } func (m *Index) XXX_Size() int { return m.Size() @@ -1011,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_d2a91b51c7bdc125, []int{16} + return fileDescriptor_private_54a82f4803638cdd, []int{16} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1021,15 +1019,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *URI) XXX_Merge(src proto.Message) { - xxx_messageInfo_URI.Merge(m, src) +func (dst *URI) XXX_Merge(src proto.Message) { + xxx_messageInfo_URI.Merge(dst, src) } func (m *URI) XXX_Size() int { return m.Size() @@ -1063,7 +1061,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,proto3" json:"URI,omitempty"` + URI *URI `protobuf:"bytes,2,opt,name=URI" json:"URI,omitempty"` IsCoordinator bool `protobuf:"varint,3,opt,name=IsCoordinator,proto3" json:"IsCoordinator,omitempty"` State string `protobuf:"bytes,4,opt,name=State,proto3" json:"State,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1075,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_d2a91b51c7bdc125, []int{17} + return fileDescriptor_private_54a82f4803638cdd, []int{17} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,15 +1083,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) } func (m *Node) XXX_Size() int { return m.Size() @@ -1144,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_d2a91b51c7bdc125, []int{18} + return fileDescriptor_private_54a82f4803638cdd, []int{18} } func (m *NodeStateMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1154,15 +1152,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *NodeStateMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStateMessage.Merge(m, src) +func (dst *NodeStateMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeStateMessage.Merge(dst, src) } func (m *NodeStateMessage) XXX_Size() int { return m.Size() @@ -1189,7 +1187,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,proto3" json:"Node,omitempty"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1199,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_d2a91b51c7bdc125, []int{19} + return fileDescriptor_private_54a82f4803638cdd, []int{19} } func (m *NodeEventMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1209,15 +1207,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *NodeEventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeEventMessage.Merge(m, src) +func (dst *NodeEventMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeEventMessage.Merge(dst, src) } func (m *NodeEventMessage) XXX_Size() int { return m.Size() @@ -1243,9 +1241,9 @@ func (m *NodeEventMessage) GetNode() *Node { } type NodeStatus struct { - 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"` + Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` + Schema *Schema `protobuf:"bytes,3,opt,name=Schema" json:"Schema,omitempty"` + Indexes []*IndexStatus `protobuf:"bytes,4,rep,name=Indexes" json:"Indexes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1255,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_d2a91b51c7bdc125, []int{20} + return fileDescriptor_private_54a82f4803638cdd, []int{20} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1265,15 +1263,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(m, src) +func (dst *NodeStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeStatus.Merge(dst, src) } func (m *NodeStatus) XXX_Size() int { return m.Size() @@ -1307,7 +1305,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,proto3" json:"Fields,omitempty"` + Fields []*FieldStatus `protobuf:"bytes,2,rep,name=Fields" json:"Fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1317,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_d2a91b51c7bdc125, []int{21} + return fileDescriptor_private_54a82f4803638cdd, []int{21} } func (m *IndexStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1327,15 +1325,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *IndexStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexStatus.Merge(m, src) +func (dst *IndexStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexStatus.Merge(dst, src) } func (m *IndexStatus) XXX_Size() int { return m.Size() @@ -1362,7 +1360,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,proto3" json:"AvailableShards,omitempty"` + AvailableShards []uint64 `protobuf:"varint,2,rep,packed,name=AvailableShards" json:"AvailableShards,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1372,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_d2a91b51c7bdc125, []int{22} + return fileDescriptor_private_54a82f4803638cdd, []int{22} } func (m *FieldStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1382,15 +1380,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *FieldStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldStatus.Merge(m, src) +func (dst *FieldStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldStatus.Merge(dst, src) } func (m *FieldStatus) XXX_Size() int { return m.Size() @@ -1418,7 +1416,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,proto3" json:"Nodes,omitempty"` + Nodes []*Node `protobuf:"bytes,3,rep,name=Nodes" json:"Nodes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1428,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_d2a91b51c7bdc125, []int{23} + return fileDescriptor_private_54a82f4803638cdd, []int{23} } func (m *ClusterStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1438,15 +1436,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ClusterStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterStatus.Merge(m, src) +func (dst *ClusterStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterStatus.Merge(dst, src) } func (m *ClusterStatus) XXX_Size() int { return m.Size() @@ -1492,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_d2a91b51c7bdc125, []int{24} + return fileDescriptor_private_54a82f4803638cdd, []int{24} } func (m *BSIGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1502,15 +1500,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BSIGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_BSIGroup.Merge(m, src) +func (dst *BSIGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_BSIGroup.Merge(dst, src) } func (m *BSIGroup) XXX_Size() int { return m.Size() @@ -1562,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_d2a91b51c7bdc125, []int{25} + return fileDescriptor_private_54a82f4803638cdd, []int{25} } func (m *CreateViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1572,15 +1570,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CreateViewMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateViewMessage.Merge(m, src) +func (dst *CreateViewMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateViewMessage.Merge(dst, src) } func (m *CreateViewMessage) XXX_Size() int { return m.Size() @@ -1625,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_d2a91b51c7bdc125, []int{26} + return fileDescriptor_private_54a82f4803638cdd, []int{26} } func (m *DeleteViewMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1635,15 +1633,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DeleteViewMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteViewMessage.Merge(m, src) +func (dst *DeleteViewMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteViewMessage.Merge(dst, src) } func (m *DeleteViewMessage) XXX_Size() int { return m.Size() @@ -1677,11 +1675,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,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"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` + Coordinator *Node `protobuf:"bytes,3,opt,name=Coordinator" json:"Coordinator,omitempty"` + Sources []*ResizeSource `protobuf:"bytes,4,rep,name=Sources" json:"Sources,omitempty"` + NodeStatus *NodeStatus `protobuf:"bytes,7,opt,name=NodeStatus" json:"NodeStatus,omitempty"` + ClusterStatus *ClusterStatus `protobuf:"bytes,6,opt,name=ClusterStatus" json:"ClusterStatus,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1691,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_d2a91b51c7bdc125, []int{27} + return fileDescriptor_private_54a82f4803638cdd, []int{27} } func (m *ResizeInstruction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1701,15 +1699,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ResizeInstruction) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeInstruction.Merge(m, src) +func (dst *ResizeInstruction) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResizeInstruction.Merge(dst, src) } func (m *ResizeInstruction) XXX_Size() int { return m.Size() @@ -1763,7 +1761,7 @@ func (m *ResizeInstruction) GetClusterStatus() *ClusterStatus { } type ResizeSource struct { - Node *Node `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"` + Node *Node `protobuf:"bytes,1,opt,name=Node" json:"Node,omitempty"` Index string `protobuf:"bytes,2,opt,name=Index,proto3" json:"Index,omitempty"` Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` View string `protobuf:"bytes,4,opt,name=View,proto3" json:"View,omitempty"` @@ -1777,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_d2a91b51c7bdc125, []int{28} + return fileDescriptor_private_54a82f4803638cdd, []int{28} } func (m *ResizeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1787,15 +1785,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ResizeSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeSource.Merge(m, src) +func (dst *ResizeSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResizeSource.Merge(dst, src) } func (m *ResizeSource) XXX_Size() int { return m.Size() @@ -1843,7 +1841,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,proto3" json:"Node,omitempty"` + Node *Node `protobuf:"bytes,2,opt,name=Node" json:"Node,omitempty"` Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1854,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_d2a91b51c7bdc125, []int{29} + return fileDescriptor_private_54a82f4803638cdd, []int{29} } func (m *ResizeInstructionComplete) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1864,15 +1862,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ResizeInstructionComplete) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeInstructionComplete.Merge(m, src) +func (dst *ResizeInstructionComplete) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResizeInstructionComplete.Merge(dst, src) } func (m *ResizeInstructionComplete) XXX_Size() int { return m.Size() @@ -1905,7 +1903,7 @@ func (m *ResizeInstructionComplete) GetError() string { } type SetCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New,proto3" json:"New,omitempty"` + New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1915,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_d2a91b51c7bdc125, []int{30} + return fileDescriptor_private_54a82f4803638cdd, []int{30} } func (m *SetCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1925,15 +1923,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SetCoordinatorMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCoordinatorMessage.Merge(m, src) +func (dst *SetCoordinatorMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetCoordinatorMessage.Merge(dst, src) } func (m *SetCoordinatorMessage) XXX_Size() int { return m.Size() @@ -1952,7 +1950,7 @@ func (m *SetCoordinatorMessage) GetNew() *Node { } type UpdateCoordinatorMessage struct { - New *Node `protobuf:"bytes,1,opt,name=New,proto3" json:"New,omitempty"` + New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1962,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_d2a91b51c7bdc125, []int{31} + return fileDescriptor_private_54a82f4803638cdd, []int{31} } func (m *UpdateCoordinatorMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1972,15 +1970,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateCoordinatorMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateCoordinatorMessage.Merge(m, src) +func (dst *UpdateCoordinatorMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateCoordinatorMessage.Merge(dst, src) } func (m *UpdateCoordinatorMessage) XXX_Size() int { return m.Size() @@ -2000,7 +1998,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,proto3" json:"NodeIDs,omitempty"` + NodeIDs []string `protobuf:"bytes,2,rep,name=NodeIDs" json:"NodeIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2010,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_d2a91b51c7bdc125, []int{32} + return fileDescriptor_private_54a82f4803638cdd, []int{32} } func (m *Topology) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2020,15 +2018,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Topology) XXX_Merge(src proto.Message) { - xxx_messageInfo_Topology.Merge(m, src) +func (dst *Topology) XXX_Merge(src proto.Message) { + xxx_messageInfo_Topology.Merge(dst, src) } func (m *Topology) XXX_Size() int { return m.Size() @@ -2063,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_d2a91b51c7bdc125, []int{33} + return fileDescriptor_private_54a82f4803638cdd, []int{33} } func (m *RecalculateCaches) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2073,15 +2071,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RecalculateCaches) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecalculateCaches.Merge(m, src) +func (dst *RecalculateCaches) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecalculateCaches.Merge(dst, src) } func (m *RecalculateCaches) XXX_Size() int { return m.Size() @@ -2129,92 +2127,10 @@ 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, 0xd4, - 0xdc, 0x33, 0x84, 0x46, 0xb1, 0x32, 0x81, 0x6b, 0x50, 0x24, 0x74, 0x34, 0x18, 0xab, 0x49, 0x24, - 0x9e, 0xd1, 0xe3, 0x7d, 0x9e, 0x8e, 0x30, 0xfb, 0x3e, 0x33, 0x84, 0x46, 0xd1, 0x12, 0x56, 0xcc, - 0x67, 0x86, 0xa0, 0x21, 0x5c, 0xae, 0xd8, 0xb7, 0x6e, 0x5e, 0x87, 0x1a, 0x93, 0x47, 0x61, 0x3f, - 0x0b, 0x9c, 0x8e, 0xd7, 0xf5, 0x99, 0xa5, 0xb0, 0xb4, 0x32, 0x9e, 0x8e, 0x13, 0xcd, 0x72, 0x91, - 0x55, 0x02, 0xf4, 0x06, 0xac, 0x60, 0x9d, 0x75, 0x94, 0xa5, 0xac, 0x3e, 0xd2, 0x1f, 0x1d, 0x68, - 0xec, 0xf0, 0x63, 0x74, 0x24, 0x23, 0x0f, 0xa0, 0x9e, 0x57, 0x04, 0x2f, 0x35, 0xef, 0xbd, 0xbb, - 0x99, 0xb7, 0xf2, 0x66, 0x71, 0x6d, 0x33, 0xbf, 0xb3, 0x9d, 0xa8, 0x74, 0xc6, 0x0a, 0x91, 0x9b, - 0x9f, 0x41, 0x6b, 0x8e, 0xa5, 0xed, 0x1d, 0x88, 0x59, 0x9e, 0xd5, 0x03, 0x31, 0xd3, 0xb1, 0x1e, - 0xf2, 0x78, 0x2a, 0x30, 0x57, 0x3e, 0x33, 0xc4, 0xa7, 0xee, 0xc7, 0x0e, 0x7d, 0x0e, 0x64, 0x2b, - 0x15, 0x5c, 0x09, 0x34, 0xb2, 0x23, 0xb2, 0x8c, 0xbf, 0x14, 0x67, 0x65, 0xdc, 0xab, 0x66, 0xbc, - 0xc8, 0xae, 0x5b, 0xc9, 0x2e, 0xbd, 0x03, 0xa4, 0x2f, 0x62, 0xa1, 0x84, 0x9d, 0xc3, 0x7f, 0xd0, - 0x4b, 0x07, 0xb9, 0x0f, 0x67, 0xdf, 0x25, 0xb7, 0xc1, 0xd7, 0x43, 0x8d, 0xc6, 0x9a, 0xf7, 0xae, - 0x94, 0x79, 0x2a, 0xe6, 0x9d, 0xe1, 0x05, 0x1a, 0xe7, 0x4a, 0xd1, 0xcb, 0x73, 0x06, 0x36, 0xd7, - 0x4a, 0x77, 0xac, 0x29, 0x0f, 0x4d, 0x5d, 0x2f, 0x4d, 0x55, 0x17, 0x82, 0xb5, 0xf6, 0x30, 0x0f, - 0xf7, 0xa2, 0xd6, 0xe8, 0x10, 0xde, 0x32, 0x1a, 0xbe, 0x38, 0xe4, 0x51, 0xcc, 0x5f, 0xc4, 0xff, - 0xaa, 0x22, 0x73, 0x8e, 0x07, 0xb0, 0x8a, 0xb2, 0x61, 0xdf, 0xf6, 0x76, 0x4e, 0xd2, 0xef, 0xa0, - 0x1c, 0x93, 0x5d, 0x3e, 0x16, 0x56, 0x1b, 0x9e, 0x8b, 0x78, 0xdd, 0xb3, 0xe3, 0xd5, 0x86, 0xf5, - 0x68, 0xe9, 0xa5, 0xea, 0x69, 0xc3, 0x48, 0xd0, 0xfb, 0x50, 0x1b, 0x0c, 0xf7, 0xc5, 0x98, 0x93, - 0xf7, 0x61, 0x15, 0x3d, 0x14, 0x99, 0xed, 0xe8, 0x4b, 0x0b, 0x95, 0x62, 0x39, 0x9f, 0xf6, 0x6d, - 0x64, 0x4b, 0x7d, 0xba, 0x0d, 0x35, 0xb4, 0x9e, 0x05, 0xfe, 0xa2, 0x1a, 0xc4, 0x99, 0x65, 0xd3, - 0x6d, 0xf0, 0x9e, 0xb1, 0x50, 0x4f, 0x2a, 0x7a, 0x90, 0x6b, 0xb1, 0x94, 0xd6, 0xfd, 0xa5, 0xcc, - 0x94, 0xcd, 0x13, 0x9e, 0x35, 0xf6, 0x54, 0xa6, 0x0a, 0x73, 0xd4, 0x62, 0x78, 0xa6, 0x19, 0xf8, - 0xbb, 0x72, 0x24, 0xc8, 0x3a, 0xb8, 0x61, 0xdf, 0xea, 0x70, 0xc3, 0x3e, 0x79, 0x07, 0xd5, 0xdb, - 0xd4, 0xb4, 0x4a, 0x27, 0x9e, 0xb1, 0x90, 0xa1, 0xe1, 0x5b, 0xd0, 0x0a, 0xb3, 0x2d, 0x29, 0xd3, - 0x51, 0x94, 0x70, 0x25, 0x53, 0xfb, 0xb5, 0x99, 0x07, 0x71, 0x56, 0x14, 0x57, 0xe6, 0x3b, 0xd0, - 0x60, 0x86, 0xa0, 0x0f, 0xa1, 0xad, 0x8d, 0x22, 0x91, 0xd7, 0xfb, 0x3a, 0xd4, 0x34, 0x56, 0x38, - 0x61, 0xa9, 0x52, 0x83, 0x5b, 0xd5, 0xf0, 0xb5, 0xd1, 0xb0, 0x7d, 0x28, 0x12, 0x55, 0xe9, 0x18, - 0xa4, 0x51, 0x41, 0x8b, 0x19, 0x82, 0x50, 0x13, 0xa0, 0x8d, 0x64, 0xbd, 0x8c, 0x44, 0xa3, 0x0c, - 0x79, 0xf4, 0x67, 0x07, 0x20, 0x77, 0x68, 0x9a, 0x15, 0x22, 0xce, 0xeb, 0x45, 0x48, 0x37, 0xaf, - 0xbc, 0x9d, 0x96, 0x76, 0x79, 0xcb, 0xe0, 0x2c, 0xef, 0x8c, 0x0f, 0xcb, 0xce, 0x30, 0x25, 0xbd, - 0xb6, 0xd0, 0x19, 0xc6, 0x6a, 0xd9, 0x1f, 0x4f, 0xa1, 0x59, 0xc1, 0x97, 0x76, 0xc9, 0x07, 0x45, - 0x97, 0xb8, 0x8b, 0x2a, 0x11, 0xb7, 0x2a, 0xf3, 0x5e, 0x79, 0x02, 0xcd, 0x0a, 0xbc, 0x54, 0x63, - 0x17, 0x2e, 0xcd, 0xcf, 0x61, 0xbe, 0xdf, 0x17, 0x61, 0x1a, 0x41, 0x6b, 0x2b, 0x9e, 0x66, 0x4a, - 0xa4, 0x56, 0x9d, 0xfe, 0x28, 0x18, 0xa0, 0x28, 0x5e, 0x09, 0x2c, 0xaf, 0x1f, 0xb9, 0x05, 0x2b, - 0x3a, 0x8d, 0x66, 0x9c, 0x4e, 0xe7, 0xd8, 0x30, 0xe9, 0x73, 0xa8, 0xf7, 0x06, 0xe1, 0xe3, 0x54, - 0x4e, 0x27, 0x4b, 0x9d, 0xce, 0xdf, 0x26, 0x6e, 0xe5, 0x6d, 0x62, 0x5f, 0x0f, 0xde, 0xa9, 0xd7, - 0x83, 0x5f, 0xbc, 0x1e, 0xe8, 0x00, 0x2e, 0x9b, 0x55, 0xa9, 0xa7, 0xf8, 0x22, 0x0b, 0x27, 0xff, - 0xe8, 0x7a, 0xe5, 0x47, 0x57, 0x2b, 0x35, 0xfb, 0xec, 0xff, 0x54, 0xfa, 0xab, 0x0b, 0x97, 0x99, - 0xc8, 0xa2, 0x57, 0x22, 0x4c, 0x32, 0x95, 0x4e, 0x87, 0x7a, 0x27, 0x69, 0xf9, 0xaf, 0xe4, 0x0b, - 0x9b, 0x6d, 0x8f, 0x19, 0xe2, 0x3c, 0x9d, 0x4e, 0xee, 0x42, 0x73, 0x71, 0x66, 0x4f, 0x5f, 0xad, - 0x5e, 0x21, 0x77, 0x61, 0x75, 0x20, 0xa7, 0xe9, 0xb0, 0x68, 0xdf, 0xca, 0x9e, 0x34, 0x9e, 0x19, - 0x36, 0xcb, 0xaf, 0x91, 0x8f, 0xaa, 0xc3, 0x14, 0xac, 0xa2, 0x89, 0xab, 0xf3, 0x26, 0x6c, 0x7f, - 0x56, 0x87, 0xee, 0xc1, 0x42, 0x5b, 0x05, 0x35, 0x14, 0x7c, 0xb3, 0x14, 0x9c, 0x63, 0xb3, 0xf9, - 0xdb, 0xf4, 0x27, 0x07, 0xd6, 0xaa, 0xee, 0x9c, 0x6b, 0x88, 0x8b, 0xea, 0xb8, 0x67, 0x7f, 0xf5, - 0xf3, 0xea, 0xf8, 0xcb, 0xde, 0x59, 0x2b, 0xd5, 0x97, 0xc0, 0x01, 0xdc, 0x38, 0x55, 0xb2, 0x2d, - 0x39, 0x9e, 0xe8, 0xde, 0xf8, 0x0f, 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.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2222,46 +2138,40 @@ func (m *IndexMeta) Marshal() (dAtA []byte, err error) { } func (m *IndexMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IndexMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TrackExistence { - i-- - if m.TrackExistence { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } if m.Keys { - i-- + dAtA[i] = 0x18 + i++ if m.Keys { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x18 + i++ } - return len(dAtA) - i, nil + if m.TrackExistence { + dAtA[i] = 0x20 + i++ + if m.TrackExistence { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *FieldOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2269,106 +2179,96 @@ func (m *FieldOptions) Marshal() (dAtA []byte, err error) { } func (m *FieldOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FieldOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.CacheType) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.CacheType))) + i += copy(dAtA[i:], m.CacheType) } - 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 m.CacheSize != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.CacheSize)) } - if m.Scale != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Scale)) - i-- - dAtA[i] = 0x78 + 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.BitDepth != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.BitDepth)) - i-- - dAtA[i] = 0x70 + 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.Base != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Base)) - i-- - dAtA[i] = 0x68 + if m.Min != 0 { + dAtA[i] = 0x48 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) } - if m.NoStandardView { - i-- - if m.NoStandardView { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 + if m.Max != 0 { + dAtA[i] = 0x50 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) } if m.Keys { - i-- + dAtA[i] = 0x58 + i++ if m.Keys { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x58 + i++ } - if m.Max != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) - i-- - dAtA[i] = 0x50 + if m.NoStandardView { + dAtA[i] = 0x60 + i++ + if m.NoStandardView { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - if m.Min != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) - i-- - dAtA[i] = 0x48 + if m.Base != 0 { + dAtA[i] = 0x68 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Base)) } - 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.BitDepth != 0 { + dAtA[i] = 0x70 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.BitDepth)) } - 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 + if m.Scale != 0 { + dAtA[i] = 0x78 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Scale)) } - if m.CacheSize != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.CacheSize)) - i-- - dAtA[i] = 0x20 + 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.CacheType) > 0 { - i -= len(m.CacheType) - copy(dAtA[i:], m.CacheType) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.CacheType))) - i-- - dAtA[i] = 0x1a + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *ImportResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2376,33 +2276,26 @@ func (m *ImportResponse) Marshal() (dAtA []byte, err error) { } func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Err))) + i += copy(dAtA[i:], m.Err) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2410,57 +2303,48 @@ func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { } func (m *BlockDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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] = 0x2a - } - if m.Shard != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) - i-- - dAtA[i] = 0x20 - } - if m.Block != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Block)) - i-- - dAtA[i] = 0x18 + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if m.Block != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Block)) } - return len(dAtA) - i, nil + if m.Shard != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + } + if len(m.View) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) + i += copy(dAtA[i:], m.View) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2468,23 +2352,14 @@ func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { } func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - 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) + if len(m.RowIDs) > 0 { + dAtA2 := make([]byte, len(m.RowIDs)*10) var j1 int - for _, num := range m.ColumnIDs { + for _, num := range m.RowIDs { for num >= 1<<7 { dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2493,16 +2368,15 @@ func (m *BlockDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) + dAtA[i] = 0xa + i++ i = encodeVarintPrivate(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x12 + i += copy(dAtA[i:], dAtA2[:j1]) } - if len(m.RowIDs) > 0 { - dAtA4 := make([]byte, len(m.RowIDs)*10) + if len(m.ColumnIDs) > 0 { + dAtA4 := make([]byte, len(m.ColumnIDs)*10) var j3 int - for _, num := range m.RowIDs { + for _, num := range m.ColumnIDs { for num >= 1<<7 { dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2511,19 +2385,21 @@ func (m *BlockDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA4[j3] = uint8(num) j3++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) + dAtA[i] = 0x12 + i++ i = encodeVarintPrivate(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0xa + i += copy(dAtA[i:], dAtA4[:j3]) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Cache) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2531,19 +2407,10 @@ func (m *Cache) Marshal() (dAtA []byte, err error) { } func (m *Cache) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Cache) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 @@ -2556,19 +2423,21 @@ func (m *Cache) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA6[j5] = uint8(num) j5++ } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintPrivate(dAtA, i, uint64(j5)) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintPrivate(dAtA, i, uint64(j5)) + i += copy(dAtA[i:], dAtA6[:j5]) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *MaxShards) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2576,43 +2445,36 @@ func (m *MaxShards) Marshal() (dAtA []byte, err error) { } func (m *MaxShards) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MaxShards) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 { + for k, _ := range m.Standard { + dAtA[i] = 0xa + i++ v := m.Standard[k] - baseI := i - i = encodeVarintPrivate(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], 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-- - dAtA[i] = 0xa - i = encodeVarintPrivate(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(v)) } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *CreateShardMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2620,45 +2482,37 @@ func (m *CreateShardMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateShardMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateShardMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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] = 0x1a + 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 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) } - 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 + if len(m.Field) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *DeleteIndexMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2666,33 +2520,26 @@ func (m *DeleteIndexMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteIndexMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i += copy(dAtA[i:], m.Index) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *CreateIndexMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2700,45 +2547,36 @@ func (m *CreateIndexMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateIndexMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size())) + n7, err := m.Meta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2746,52 +2584,42 @@ func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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] = 0x1a + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + 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 + } + i += n8 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2799,40 +2627,32 @@ func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *DeleteAvailableShardMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2840,45 +2660,37 @@ func (m *DeleteAvailableShardMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteAvailableShardMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteAvailableShardMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ShardID != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.ShardID)) - i-- - dAtA[i] = 0x18 + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if m.ShardID != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.ShardID)) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Field) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2886,54 +2698,51 @@ func (m *Field) Marshal() (dAtA []byte, err error) { } func (m *Field) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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-- { - i -= len(m.Views[iNdEx]) - copy(dAtA[i:], m.Views[iNdEx]) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Views[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + 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 { - { - 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 + 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 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 + if len(m.Views) > 0 { + for _, s := range m.Views { + 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) + } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Schema) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2941,40 +2750,32 @@ func (m *Schema) Marshal() (dAtA []byte, err error) { } func (m *Schema) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 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-- + 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 + } + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Index) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2982,47 +2783,38 @@ func (m *Index) Marshal() (dAtA []byte, err error) { } func (m *Index) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.Fields) > 0 { - 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-- + 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 + } + i += n } } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *URI) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3030,45 +2822,37 @@ func (m *URI) Marshal() (dAtA []byte, err error) { } func (m *URI) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *URI) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Port != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x18 + 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 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Host))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Host))) + i += copy(dAtA[i:], m.Host) } - 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 + if m.Port != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Port)) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Node) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3076,62 +2860,52 @@ func (m *Node) Marshal() (dAtA []byte, err error) { } func (m *Node) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) } - 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.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 m.IsCoordinator { - i-- + dAtA[i] = 0x18 + i++ if m.IsCoordinator { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x18 + i++ } - 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 len(m.State) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) + i += copy(dAtA[i:], m.State) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *NodeStateMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3139,40 +2913,32 @@ func (m *NodeStateMessage) Marshal() (dAtA []byte, err error) { } func (m *NodeStateMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeStateMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.NodeID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.NodeID))) + i += copy(dAtA[i:], m.NodeID) } 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) + i += copy(dAtA[i:], m.State) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *NodeEventMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3180,43 +2946,35 @@ func (m *NodeEventMessage) Marshal() (dAtA []byte, err error) { } func (m *NodeEventMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeEventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Event != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Event)) } 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size())) + n11, err := m.Node.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 } - if m.Event != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Event)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *NodeStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3224,64 +2982,52 @@ func (m *NodeStatus) Marshal() (dAtA []byte, err error) { } func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 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 + 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 { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPrivate(dAtA, i, uint64(size)) - } - i-- 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.Node != nil { - { - size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if len(m.Indexes) > 0 { + for _, msg := range m.Indexes { + dAtA[i] = 0x22 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintPrivate(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *IndexStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3289,47 +3035,38 @@ func (m *IndexStatus) Marshal() (dAtA []byte, err error) { } func (m *IndexStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IndexStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.Fields) > 0 { - 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-- + 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 + } + i += n } } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *FieldStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3337,18 +3074,15 @@ func (m *FieldStatus) Marshal() (dAtA []byte, err error) { } func (m *FieldStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FieldStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.AvailableShards) > 0 { dAtA15 := make([]byte, len(m.AvailableShards)*10) @@ -3362,26 +3096,21 @@ func (m *FieldStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA15[j14] = uint8(num) j14++ } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintPrivate(dAtA, i, uint64(j14)) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(j14)) + i += copy(dAtA[i:], dAtA15[:j14]) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *ClusterStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3389,54 +3118,44 @@ func (m *ClusterStatus) Marshal() (dAtA []byte, err error) { } func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Nodes) > 0 { - 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-- - dAtA[i] = 0x1a - } + 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 { - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.State))) + i += copy(dAtA[i:], m.State) } - 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 + 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 + } + i += n + } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BSIGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3444,50 +3163,42 @@ func (m *BSIGroup) Marshal() (dAtA []byte, err error) { } func (m *BSIGroup) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BSIGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Max != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) - i-- - dAtA[i] = 0x20 - } - if m.Min != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) - i-- - dAtA[i] = 0x18 + 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 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) } - 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 + if m.Min != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Min)) } - return len(dAtA) - i, nil + if m.Max != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Max)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *CreateViewMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3495,47 +3206,38 @@ func (m *CreateViewMessage) Marshal() (dAtA []byte, err error) { } func (m *CreateViewMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateViewMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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] = 0x1a + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if len(m.View) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) + i += copy(dAtA[i:], m.View) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *DeleteViewMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3543,47 +3245,38 @@ func (m *DeleteViewMessage) Marshal() (dAtA []byte, err error) { } func (m *DeleteViewMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteViewMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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] = 0x1a + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if len(m.View) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.View))) + i += copy(dAtA[i:], m.View) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ResizeInstruction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3591,93 +3284,77 @@ func (m *ResizeInstruction) Marshal() (dAtA []byte, err error) { } func (m *ResizeInstruction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResizeInstruction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NodeStatus != nil { - { - size, err := m.NodeStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - 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 - } - 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 - } - } - 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-- - dAtA[i] = 0x1a + if m.JobID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) } if m.Node != nil { - { - size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + 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 err != nil { return 0, err } - i -= size - i = encodeVarintPrivate(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x12 } - if m.JobID != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) - i-- - dAtA[i] = 0x8 + if m.ClusterStatus != nil { + 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 + } + i += n18 } - return len(dAtA) - i, nil + 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 + } + i += n19 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ResizeSource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3685,64 +3362,53 @@ func (m *ResizeSource) Marshal() (dAtA []byte, err error) { } func (m *ResizeSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResizeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Shard != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) - i-- - dAtA[i] = 0x28 - } - 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 - } - 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 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 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index))) + i += copy(dAtA[i:], m.Index) } - 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 + if len(m.Field) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - return len(dAtA) - i, nil + 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.Shard != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.Shard)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ResizeInstructionComplete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3750,50 +3416,41 @@ func (m *ResizeInstructionComplete) Marshal() (dAtA []byte, err error) { } func (m *ResizeInstructionComplete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResizeInstructionComplete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x1a + if m.JobID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) } 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 + 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.JobID != 0 { - i = encodeVarintPrivate(dAtA, i, uint64(m.JobID)) - i-- - dAtA[i] = 0x8 + if len(m.Error) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Error))) + i += copy(dAtA[i:], m.Error) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *SetCoordinatorMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3801,38 +3458,30 @@ func (m *SetCoordinatorMessage) Marshal() (dAtA []byte, err error) { } func (m *SetCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SetCoordinatorMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size())) + n22, err := m.New.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *UpdateCoordinatorMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3840,38 +3489,30 @@ func (m *UpdateCoordinatorMessage) Marshal() (dAtA []byte, err error) { } func (m *UpdateCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateCoordinatorMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } 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 + i++ + i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size())) + n23, err := m.New.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Topology) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3879,42 +3520,41 @@ func (m *Topology) Marshal() (dAtA []byte, err error) { } func (m *Topology) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Topology) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.NodeIDs) > 0 { - 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-- + for _, s := range m.NodeIDs { 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 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *RecalculateCaches) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3922,32 +3562,24 @@ func (m *RecalculateCaches) Marshal() (dAtA []byte, err error) { } func (m *RecalculateCaches) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecalculateCaches) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return 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 base + return offset + 1 } func (m *IndexMeta) Size() (n int) { if m == nil { @@ -4740,7 +4372,14 @@ func (m *RecalculateCaches) Size() (n int) { } func sovPrivate(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozPrivate(x uint64) (n int) { return sovPrivate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -4760,7 +4399,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 } @@ -4788,7 +4427,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 } @@ -4808,7 +4447,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 } @@ -4823,9 +4462,6 @@ 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 } @@ -4854,7 +4490,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 } @@ -4882,7 +4518,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 } @@ -4892,9 +4528,6 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4914,7 +4547,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 } @@ -4933,7 +4566,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 } @@ -4943,9 +4576,6 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4965,7 +4595,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 } @@ -4975,9 +4605,6 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4997,7 +4624,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 } @@ -5016,7 +4643,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 } @@ -5035,7 +4662,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 } @@ -5055,7 +4682,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 } @@ -5075,7 +4702,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 } @@ -5094,7 +4721,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 } @@ -5113,7 +4740,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 } @@ -5132,7 +4759,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 } @@ -5142,9 +4769,6 @@ func (m *FieldOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5159,9 +4783,6 @@ 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 } @@ -5190,7 +4811,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 } @@ -5218,7 +4839,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 } @@ -5228,9 +4849,6 @@ func (m *ImportResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5245,9 +4863,6 @@ 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 } @@ -5276,7 +4891,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 } @@ -5304,7 +4919,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 } @@ -5314,9 +4929,6 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5336,7 +4948,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 } @@ -5346,9 +4958,6 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5368,7 +4977,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 } @@ -5387,7 +4996,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 } @@ -5406,7 +5015,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 } @@ -5416,9 +5025,6 @@ func (m *BlockDataRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5433,9 +5039,6 @@ 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 } @@ -5464,7 +5067,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 } @@ -5490,7 +5093,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 } @@ -5507,7 +5110,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 } @@ -5516,15 +5119,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -5544,7 +5144,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 } @@ -5566,7 +5166,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 } @@ -5583,7 +5183,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 } @@ -5592,15 +5192,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -5620,7 +5217,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 } @@ -5639,9 +5236,6 @@ 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 } @@ -5670,7 +5264,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 } @@ -5696,7 +5290,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 } @@ -5713,7 +5307,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 } @@ -5722,15 +5316,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -5750,7 +5341,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 } @@ -5769,9 +5360,6 @@ 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 } @@ -5800,7 +5388,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 } @@ -5828,7 +5416,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 } @@ -5837,9 +5425,6 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5860,7 +5445,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 } @@ -5877,7 +5462,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 } @@ -5887,9 +5472,6 @@ func (m *MaxShards) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthPrivate - } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -5905,7 +5487,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 } @@ -5936,9 +5518,6 @@ 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 } @@ -5967,7 +5546,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 } @@ -5995,7 +5574,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 } @@ -6005,9 +5584,6 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6027,7 +5603,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 } @@ -6046,7 +5622,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 } @@ -6056,9 +5632,6 @@ func (m *CreateShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6073,9 +5646,6 @@ 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 } @@ -6104,7 +5674,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 } @@ -6132,7 +5702,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 } @@ -6142,9 +5712,6 @@ func (m *DeleteIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6159,9 +5726,6 @@ 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 } @@ -6190,7 +5754,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 } @@ -6218,7 +5782,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 } @@ -6228,9 +5792,6 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6250,7 +5811,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 } @@ -6259,9 +5820,6 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6281,9 +5839,6 @@ 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 } @@ -6312,7 +5867,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 } @@ -6340,7 +5895,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 } @@ -6350,9 +5905,6 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6372,7 +5924,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 } @@ -6382,9 +5934,6 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6404,7 +5953,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 } @@ -6413,9 +5962,6 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6435,9 +5981,6 @@ 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 } @@ -6466,7 +6009,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 } @@ -6494,7 +6037,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 } @@ -6504,9 +6047,6 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6526,7 +6066,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 } @@ -6536,9 +6076,6 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6553,9 +6090,6 @@ 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 } @@ -6584,7 +6118,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 } @@ -6612,7 +6146,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 } @@ -6622,9 +6156,6 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6644,7 +6175,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 } @@ -6654,9 +6185,6 @@ func (m *DeleteAvailableShardMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6676,7 +6204,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 } @@ -6690,9 +6218,6 @@ 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 } @@ -6721,7 +6246,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 } @@ -6749,7 +6274,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 } @@ -6759,9 +6284,6 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6781,7 +6303,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 } @@ -6790,9 +6312,6 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6817,7 +6336,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 } @@ -6827,9 +6346,6 @@ func (m *Field) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6844,9 +6360,6 @@ 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 } @@ -6875,7 +6388,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 } @@ -6903,7 +6416,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 } @@ -6912,9 +6425,6 @@ func (m *Schema) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6932,9 +6442,6 @@ 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 } @@ -6963,7 +6470,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 } @@ -6991,7 +6498,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 } @@ -7001,9 +6508,6 @@ func (m *Index) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7023,7 +6527,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 } @@ -7032,9 +6536,6 @@ func (m *Index) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7052,9 +6553,6 @@ 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 } @@ -7083,7 +6581,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 } @@ -7111,7 +6609,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 } @@ -7121,9 +6619,6 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7143,7 +6638,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 } @@ -7153,9 +6648,6 @@ func (m *URI) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7175,7 +6667,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 } @@ -7189,9 +6681,6 @@ 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 } @@ -7220,7 +6709,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 } @@ -7248,7 +6737,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 } @@ -7258,9 +6747,6 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7280,7 +6766,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 } @@ -7289,9 +6775,6 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7316,7 +6799,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 } @@ -7336,7 +6819,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 } @@ -7346,9 +6829,6 @@ func (m *Node) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7363,9 +6843,6 @@ 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 } @@ -7394,7 +6871,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 } @@ -7422,7 +6899,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 } @@ -7432,9 +6909,6 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7454,7 +6928,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 } @@ -7464,9 +6938,6 @@ func (m *NodeStateMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7481,9 +6952,6 @@ 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 } @@ -7512,7 +6980,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 } @@ -7540,7 +7008,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 } @@ -7559,7 +7027,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 } @@ -7568,9 +7036,6 @@ func (m *NodeEventMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7590,9 +7055,6 @@ 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 } @@ -7621,7 +7083,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 } @@ -7649,7 +7111,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 } @@ -7658,9 +7120,6 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7685,7 +7144,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 } @@ -7694,9 +7153,6 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7721,7 +7177,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 } @@ -7730,9 +7186,6 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7750,9 +7203,6 @@ 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 } @@ -7781,7 +7231,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 } @@ -7809,7 +7259,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 } @@ -7819,9 +7269,6 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7841,7 +7288,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 } @@ -7850,9 +7297,6 @@ func (m *IndexStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7870,9 +7314,6 @@ 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 } @@ -7901,7 +7342,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 } @@ -7929,7 +7370,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 } @@ -7939,9 +7380,6 @@ func (m *FieldStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7959,7 +7397,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 } @@ -7976,7 +7414,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 } @@ -7985,15 +7423,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -8013,7 +7448,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 } @@ -8032,9 +7467,6 @@ 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 } @@ -8063,7 +7495,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 } @@ -8091,7 +7523,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 } @@ -8101,9 +7533,6 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8123,7 +7552,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 } @@ -8133,9 +7562,6 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8155,7 +7581,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 } @@ -8164,9 +7590,6 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8184,9 +7607,6 @@ 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 } @@ -8215,7 +7635,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 } @@ -8243,7 +7663,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 } @@ -8253,9 +7673,6 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8275,7 +7692,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 } @@ -8285,9 +7702,6 @@ func (m *BSIGroup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8307,7 +7721,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 } @@ -8326,7 +7740,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 } @@ -8340,9 +7754,6 @@ 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 } @@ -8371,7 +7782,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 } @@ -8399,7 +7810,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 } @@ -8409,9 +7820,6 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8431,7 +7839,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 } @@ -8441,9 +7849,6 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8463,7 +7868,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 } @@ -8473,9 +7878,6 @@ func (m *CreateViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8490,9 +7892,6 @@ 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 } @@ -8521,7 +7920,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 } @@ -8549,7 +7948,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 } @@ -8559,9 +7958,6 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8581,7 +7977,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 } @@ -8591,9 +7987,6 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8613,7 +8006,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 } @@ -8623,9 +8016,6 @@ func (m *DeleteViewMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8640,9 +8030,6 @@ 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 } @@ -8671,7 +8058,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 } @@ -8699,7 +8086,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 } @@ -8718,7 +8105,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 } @@ -8727,9 +8114,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8754,7 +8138,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 } @@ -8763,9 +8147,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8790,7 +8171,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 } @@ -8799,9 +8180,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8824,7 +8202,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 } @@ -8833,9 +8211,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8860,7 +8235,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 } @@ -8869,9 +8244,6 @@ func (m *ResizeInstruction) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8891,9 +8263,6 @@ 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 } @@ -8922,7 +8291,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 } @@ -8950,7 +8319,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 } @@ -8959,9 +8328,6 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8986,7 +8352,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 } @@ -8996,9 +8362,6 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9018,7 +8381,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 } @@ -9028,9 +8391,6 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9050,7 +8410,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 } @@ -9060,9 +8420,6 @@ func (m *ResizeSource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9082,7 +8439,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 } @@ -9096,9 +8453,6 @@ 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 } @@ -9127,7 +8481,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 } @@ -9155,7 +8509,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 } @@ -9174,7 +8528,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 } @@ -9183,9 +8537,6 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9210,7 +8561,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 } @@ -9220,9 +8571,6 @@ func (m *ResizeInstructionComplete) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9237,9 +8585,6 @@ 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 } @@ -9268,7 +8613,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 } @@ -9296,7 +8641,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 } @@ -9305,9 +8650,6 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9327,9 +8669,6 @@ 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 } @@ -9358,7 +8697,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 } @@ -9386,7 +8725,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 } @@ -9395,9 +8734,6 @@ func (m *UpdateCoordinatorMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9417,9 +8753,6 @@ 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 } @@ -9448,7 +8781,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 } @@ -9476,7 +8809,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 } @@ -9486,9 +8819,6 @@ func (m *Topology) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9508,7 +8838,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 } @@ -9518,9 +8848,6 @@ func (m *Topology) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPrivate } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPrivate - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9535,9 +8862,6 @@ 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 } @@ -9566,7 +8890,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 } @@ -9589,9 +8913,6 @@ 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 } @@ -9608,7 +8929,6 @@ 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 { @@ -9640,8 +8960,10 @@ 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 { @@ -9658,34 +8980,134 @@ func skipPrivate(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthPrivate } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPrivate + 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 } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil 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 - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthPrivate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPrivate = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthPrivate = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPrivate = fmt.Errorf("proto: integer overflow") ) + +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, 0x14, 0xe1, 0xd9, 0x6b, 0x82, 0xb3, 0x1d, 0xc6, 0x7e, 0xad, + 0x65, 0xb5, 0x1d, 0xaa, 0x8e, 0xc8, 0x61, 0x67, 0x3e, 0x18, 0x0e, 0x3b, 0xcb, 0x4b, 0xac, 0x4f, + 0x97, 0xb8, 0x23, 0x7a, 0x92, 0xc5, 0x03, 0x96, 0x0c, 0xf6, 0x43, 0x7e, 0xea, 0x2f, 0xe9, 0x12, + 0xa7, 0xb9, 0xca, 0xb6, 0xc3, 0x52, 0xee, 0x37, 0xd0, 0x1d, 0x9e, 0xbd, 0x7b, 0x50, 0xed, 0x84, + 0xb2, 0xcb, 0x47, 0xf2, 0xc8, 0x5f, 0x6e, 0x59, 0x6d, 0x97, 0xe6, 0xb4, 0x77, 0x1b, 0x16, 0x7a, + 0x7d, 0x16, 0x71, 0x7f, 0x05, 0x0d, 0x34, 0xe1, 0x11, 0x58, 0x7a, 0x2e, 0x12, 0x1e, 0x1e, 0xc6, + 0xd8, 0x78, 0xbf, 0x89, 0x15, 0x4c, 0xf1, 0x08, 0x81, 0xe5, 0x60, 0x38, 0x12, 0x89, 0xa4, 0x3c, + 0x1d, 0x89, 0x38, 0xc5, 0xda, 0xb6, 0x92, 0xc4, 0xb7, 0x50, 0x59, 0x1d, 0xc9, 0x4f, 0xd0, 0xec, + 0x44, 0xa2, 0x7f, 0xdc, 0x65, 0x92, 0x51, 0xfe, 0xe3, 0x98, 0xa7, 0x52, 0x45, 0xd4, 0x4e, 0xb5, + 0x9e, 0x26, 0x14, 0x17, 0x91, 0xf1, 0x6d, 0xcd, 0x45, 0x42, 0x71, 0xd1, 0x1e, 0xb1, 0x71, 0xa9, + 0x26, 0x30, 0xe7, 0x23, 0x96, 0x0c, 0x10, 0x13, 0x97, 0x6a, 0x42, 0x55, 0x8e, 0x7d, 0xd1, 0x40, + 0xe0, 0x99, 0x04, 0xb0, 0x5a, 0x8a, 0x6f, 0xd2, 0x5c, 0x83, 0x0a, 0x15, 0xa7, 0x41, 0x37, 0xf5, + 0xad, 0x96, 0xd3, 0x76, 0xa9, 0xa1, 0x10, 0x6e, 0x11, 0x8d, 0x87, 0xb1, 0x12, 0xd9, 0x28, 0x2a, + 0x18, 0xe4, 0x2e, 0x2c, 0x20, 0xf6, 0xaa, 0xca, 0xc2, 0x56, 0x1d, 0xc9, 0xcf, 0x16, 0xd4, 0xb6, + 0xd9, 0x19, 0xa6, 0x91, 0x7a, 0x4f, 0xa1, 0x9a, 0x21, 0x82, 0x4a, 0xf5, 0xc7, 0xef, 0x6f, 0x64, + 0xa3, 0xbc, 0x91, 0xab, 0x6d, 0x64, 0x3a, 0x5b, 0xb1, 0x4c, 0x26, 0x34, 0x37, 0xb9, 0xf7, 0x05, + 0x34, 0xa6, 0x44, 0x2a, 0xde, 0x31, 0x9f, 0x64, 0x5d, 0x3d, 0xe6, 0x13, 0x55, 0xff, 0x09, 0x8b, + 0xc6, 0x1c, 0x7b, 0xe5, 0x52, 0x4d, 0x7c, 0x6e, 0x7f, 0x6a, 0x91, 0x7d, 0xf0, 0x36, 0x13, 0xce, + 0x24, 0xc7, 0x20, 0xdb, 0x3c, 0x4d, 0xd9, 0x21, 0xbf, 0xbc, 0xe3, 0xba, 0x8b, 0x76, 0xb9, 0x8b, + 0x39, 0x0e, 0x4e, 0x09, 0x07, 0xf2, 0x10, 0xbc, 0x2e, 0x8f, 0xb8, 0xe4, 0x66, 0x0f, 0xff, 0xc3, + 0x2f, 0xe9, 0x65, 0x39, 0x5c, 0xad, 0xeb, 0x3d, 0x00, 0x57, 0x2d, 0x35, 0xa6, 0x50, 0x7f, 0x7c, + 0xab, 0xe8, 0x53, 0xbe, 0xef, 0x14, 0x15, 0x48, 0x94, 0x39, 0xc5, 0x7c, 0xae, 0x2c, 0x6c, 0xce, + 0x28, 0x3d, 0x34, 0xa1, 0x1c, 0x0c, 0xb5, 0x56, 0x84, 0x2a, 0x5f, 0x08, 0x26, 0xda, 0xb3, 0xac, + 0xdc, 0x9b, 0x46, 0x23, 0x7d, 0x78, 0x47, 0x7b, 0xf8, 0xea, 0x84, 0x85, 0x11, 0x3b, 0x88, 0xae, + 0x89, 0xc8, 0x9c, 0xc4, 0x7d, 0x58, 0x44, 0xdb, 0xa0, 0x6b, 0xb6, 0x20, 0x23, 0xc9, 0x0f, 0x46, + 0x5f, 0x8d, 0xfe, 0x0e, 0x1b, 0x72, 0xe3, 0x0d, 0xcf, 0x79, 0xbd, 0xf6, 0xd5, 0xf5, 0xaa, 0xc0, + 0x6a, 0x5d, 0xd4, 0xa5, 0xea, 0xa8, 0xc0, 0x48, 0x90, 0x27, 0x50, 0xe9, 0xf5, 0x8f, 0xf8, 0x90, + 0x79, 0x1f, 0xc2, 0x22, 0x66, 0xc8, 0x53, 0x33, 0xd1, 0x2b, 0x33, 0x48, 0xd1, 0x4c, 0x4e, 0xba, + 0xa6, 0xb2, 0xb9, 0x39, 0x3d, 0x80, 0x0a, 0x46, 0x4f, 0x7d, 0x77, 0xd6, 0x0d, 0xf2, 0xa9, 0x11, + 0x93, 0x2d, 0x70, 0xf6, 0x68, 0xa0, 0x36, 0x15, 0x33, 0xc8, 0xbc, 0x18, 0x4a, 0xf9, 0xfe, 0x5a, + 0xa4, 0xd2, 0xf4, 0x09, 0xcf, 0x8a, 0xf7, 0x4a, 0x24, 0x12, 0x7b, 0xd4, 0xa0, 0x78, 0x26, 0x29, + 0xb8, 0x3b, 0x62, 0xc0, 0xbd, 0x65, 0xb0, 0x83, 0xae, 0xf1, 0x61, 0x07, 0x5d, 0xef, 0x3d, 0x74, + 0x6f, 0x5a, 0xd3, 0x28, 0x92, 0xd8, 0xa3, 0x01, 0xc5, 0xc0, 0xf7, 0xa1, 0x11, 0xa4, 0x9b, 0x42, + 0x24, 0x83, 0x30, 0x66, 0x52, 0x24, 0xe6, 0x6b, 0x33, 0xcd, 0xc4, 0x0d, 0x92, 0x4c, 0xea, 0x6f, + 0x43, 0x8d, 0x6a, 0x82, 0x3c, 0x83, 0xa6, 0x0a, 0x8a, 0x44, 0x86, 0xf7, 0x1a, 0x54, 0x14, 0x2f, + 0x4f, 0xc2, 0x50, 0x85, 0x07, 0xbb, 0xec, 0xe1, 0x5b, 0xed, 0x61, 0xeb, 0x84, 0xc7, 0xb2, 0x34, + 0x31, 0x48, 0xa3, 0x83, 0x06, 0xd5, 0x84, 0x47, 0x74, 0x81, 0xa6, 0x92, 0xe5, 0xa2, 0x12, 0xc5, + 0xa5, 0x28, 0x23, 0xbf, 0x5a, 0x00, 0x59, 0x42, 0xe3, 0x34, 0x37, 0xb1, 0x2e, 0x37, 0xf1, 0xda, + 0x19, 0xf2, 0x66, 0x5b, 0x9a, 0x85, 0x96, 0xe6, 0xd3, 0x6c, 0x32, 0x3e, 0x2e, 0x26, 0x43, 0x43, + 0x7a, 0x67, 0x66, 0x32, 0x74, 0xd4, 0x62, 0x3e, 0x5e, 0x41, 0xbd, 0xc4, 0x9f, 0x3b, 0x25, 0x1f, + 0xe5, 0x53, 0x62, 0xcf, 0xba, 0x44, 0xbe, 0x71, 0x99, 0xcd, 0xca, 0x4b, 0xa8, 0x97, 0xd8, 0x73, + 0x3d, 0xb6, 0x61, 0x65, 0x7a, 0x0f, 0xb3, 0xfb, 0x7d, 0x96, 0x4d, 0x42, 0x68, 0x6c, 0x46, 0xe3, + 0x54, 0xf2, 0xc4, 0xb8, 0x53, 0x1f, 0x05, 0xcd, 0xc8, 0xc1, 0x2b, 0x18, 0xf3, 0xf1, 0xf3, 0xee, + 0xc3, 0x82, 0x6a, 0xa3, 0x5e, 0xa7, 0x8b, 0x3d, 0xd6, 0x42, 0xb2, 0x0f, 0xd5, 0x4e, 0x2f, 0x78, + 0x91, 0x88, 0xf1, 0x68, 0x6e, 0xd2, 0xd9, 0xeb, 0xc1, 0xbe, 0xf8, 0x7a, 0x70, 0x2e, 0xbc, 0x1e, + 0xdc, 0xfc, 0xf5, 0x40, 0x7a, 0xb0, 0xaa, 0xaf, 0x4a, 0xb5, 0xc5, 0x37, 0xb9, 0x70, 0xb2, 0x0f, + 0xa9, 0x53, 0xfa, 0x90, 0xf6, 0x60, 0x55, 0xdf, 0x67, 0x6f, 0xd2, 0xe9, 0xef, 0x36, 0xac, 0x52, + 0x9e, 0x86, 0xaf, 0x79, 0x10, 0xa7, 0x32, 0x19, 0xf7, 0xd5, 0x9d, 0xa4, 0xec, 0xbf, 0x11, 0x07, + 0xa6, 0xdb, 0x0e, 0xd5, 0xc4, 0x75, 0x26, 0xdd, 0x7b, 0x04, 0xf5, 0xd9, 0x9d, 0xbd, 0xa8, 0x5a, + 0x56, 0xf1, 0x1e, 0xc1, 0x62, 0x4f, 0x8c, 0x93, 0x7e, 0x3e, 0xbe, 0xa5, 0x7b, 0x52, 0x67, 0xa6, + 0xc5, 0x34, 0x53, 0xf3, 0x9e, 0xce, 0x0c, 0x88, 0x5f, 0xc1, 0x28, 0x6f, 0x17, 0x76, 0x53, 0x62, + 0x3a, 0x33, 0x4e, 0x9f, 0x94, 0x77, 0xd1, 0x5f, 0x44, 0xdb, 0xdb, 0xd3, 0x19, 0x1a, 0xc3, 0x92, + 0x1e, 0xf9, 0xc5, 0x82, 0xa5, 0x72, 0x3a, 0xd7, 0x5a, 0xe2, 0x1c, 0x1d, 0x7b, 0x2e, 0x3a, 0xce, + 0x3c, 0x74, 0xdc, 0x02, 0x9d, 0xe2, 0x7d, 0xb0, 0x50, 0x7a, 0x1f, 0x90, 0x63, 0xb8, 0x7b, 0x01, + 0xb2, 0x4d, 0x31, 0x1c, 0xa9, 0xd9, 0xf8, 0x1f, 0xd0, 0xa9, 0xeb, 0x2d, 0x49, 0x0c, 0x68, 0x35, + 0xaa, 0x09, 0xf2, 0x19, 0xdc, 0xe9, 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/public.pb.go b/internal/public.pb.go index d364038f2..514d3ad25 100644 --- a/internal/public.pb.go +++ b/internal/public.pb.go @@ -3,14 +3,13 @@ package internal -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import encoding_binary "encoding/binary" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -21,12 +20,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Row struct { - 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"` + 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"` Roaring []byte `protobuf:"bytes,4,opt,name=Roaring,proto3" json:"Roaring,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -37,7 +36,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_413a91106d7bcce8, []int{0} + return fileDescriptor_public_34478dbd0ceb9d33, []int{0} } func (m *Row) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -47,15 +46,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Row) XXX_Merge(src proto.Message) { - xxx_messageInfo_Row.Merge(m, src) +func (dst *Row) XXX_Merge(src proto.Message) { + xxx_messageInfo_Row.Merge(dst, src) } func (m *Row) XXX_Size() int { return m.Size() @@ -95,8 +94,8 @@ func (m *Row) GetRoaring() []byte { } type SignedRow struct { - Pos *Row `protobuf:"bytes,1,opt,name=Pos,proto3" json:"Pos,omitempty"` - Neg *Row `protobuf:"bytes,2,opt,name=Neg,proto3" json:"Neg,omitempty"` + Pos *Row `protobuf:"bytes,1,opt,name=Pos" json:"Pos,omitempty"` + Neg *Row `protobuf:"bytes,2,opt,name=Neg" json:"Neg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -106,7 +105,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_413a91106d7bcce8, []int{1} + return fileDescriptor_public_34478dbd0ceb9d33, []int{1} } func (m *SignedRow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -116,15 +115,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SignedRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedRow.Merge(m, src) +func (dst *SignedRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedRow.Merge(dst, src) } func (m *SignedRow) XXX_Size() int { return m.Size() @@ -150,8 +149,8 @@ func (m *SignedRow) GetNeg() *Row { } type RowIdentifiers struct { - 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"` + Rows []uint64 `protobuf:"varint,1,rep,packed,name=Rows" json:"Rows,omitempty"` + Keys []string `protobuf:"bytes,2,rep,name=Keys" json:"Keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -161,7 +160,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_413a91106d7bcce8, []int{2} + return fileDescriptor_public_34478dbd0ceb9d33, []int{2} } func (m *RowIdentifiers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -171,15 +170,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RowIdentifiers) XXX_Merge(src proto.Message) { - xxx_messageInfo_RowIdentifiers.Merge(m, src) +func (dst *RowIdentifiers) XXX_Merge(src proto.Message) { + xxx_messageInfo_RowIdentifiers.Merge(dst, src) } func (m *RowIdentifiers) XXX_Size() int { return m.Size() @@ -217,7 +216,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_413a91106d7bcce8, []int{3} + return fileDescriptor_public_34478dbd0ceb9d33, []int{3} } func (m *Pair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -227,15 +226,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Pair) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pair.Merge(m, src) +func (dst *Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pair.Merge(dst, src) } func (m *Pair) XXX_Size() int { return m.Size() @@ -268,7 +267,7 @@ func (m *Pair) GetCount() uint64 { } type PairField struct { - Pair *Pair `protobuf:"bytes,1,opt,name=Pair,proto3" json:"Pair,omitempty"` + Pair *Pair `protobuf:"bytes,1,opt,name=Pair" json:"Pair,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -279,7 +278,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_413a91106d7bcce8, []int{4} + return fileDescriptor_public_34478dbd0ceb9d33, []int{4} } func (m *PairField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -289,15 +288,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *PairField) XXX_Merge(src proto.Message) { - xxx_messageInfo_PairField.Merge(m, src) +func (dst *PairField) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairField.Merge(dst, src) } func (m *PairField) XXX_Size() int { return m.Size() @@ -323,7 +322,7 @@ func (m *PairField) GetField() string { } type PairsField struct { - Pairs []*Pair `protobuf:"bytes,1,rep,name=Pairs,proto3" json:"Pairs,omitempty"` + Pairs []*Pair `protobuf:"bytes,1,rep,name=Pairs" json:"Pairs,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -334,7 +333,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_413a91106d7bcce8, []int{5} + return fileDescriptor_public_34478dbd0ceb9d33, []int{5} } func (m *PairsField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -344,15 +343,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *PairsField) XXX_Merge(src proto.Message) { - xxx_messageInfo_PairsField.Merge(m, src) +func (dst *PairsField) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairsField.Merge(dst, src) } func (m *PairsField) XXX_Size() int { return m.Size() @@ -390,7 +389,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_413a91106d7bcce8, []int{6} + return fileDescriptor_public_34478dbd0ceb9d33, []int{6} } func (m *FieldRow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -400,15 +399,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *FieldRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldRow.Merge(m, src) +func (dst *FieldRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldRow.Merge(dst, src) } func (m *FieldRow) XXX_Size() int { return m.Size() @@ -441,7 +440,7 @@ func (m *FieldRow) GetRowKey() string { } type GroupCount struct { - Group []*FieldRow `protobuf:"bytes,1,rep,name=Group,proto3" json:"Group,omitempty"` + Group []*FieldRow `protobuf:"bytes,1,rep,name=Group" 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:"-"` @@ -453,7 +452,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_413a91106d7bcce8, []int{7} + return fileDescriptor_public_34478dbd0ceb9d33, []int{7} } func (m *GroupCount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -463,15 +462,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *GroupCount) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupCount.Merge(m, src) +func (dst *GroupCount) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupCount.Merge(dst, src) } func (m *GroupCount) XXX_Size() int { return m.Size() @@ -515,7 +514,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_413a91106d7bcce8, []int{8} + return fileDescriptor_public_34478dbd0ceb9d33, []int{8} } func (m *ValCount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -525,15 +524,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ValCount) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValCount.Merge(m, src) +func (dst *ValCount) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValCount.Merge(dst, src) } func (m *ValCount) XXX_Size() int { return m.Size() @@ -561,7 +560,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,proto3" json:"Attrs,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -571,7 +570,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_413a91106d7bcce8, []int{9} + return fileDescriptor_public_34478dbd0ceb9d33, []int{9} } func (m *ColumnAttrSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -581,15 +580,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ColumnAttrSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnAttrSet.Merge(m, src) +func (dst *ColumnAttrSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ColumnAttrSet.Merge(dst, src) } func (m *ColumnAttrSet) XXX_Size() int { return m.Size() @@ -637,7 +636,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_413a91106d7bcce8, []int{10} + return fileDescriptor_public_34478dbd0ceb9d33, []int{10} } func (m *Attr) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -647,15 +646,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *Attr) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attr.Merge(m, src) +func (dst *Attr) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attr.Merge(dst, src) } func (m *Attr) XXX_Size() int { return m.Size() @@ -709,7 +708,7 @@ func (m *Attr) GetFloatValue() float64 { } type AttrMap struct { - Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs,proto3" json:"Attrs,omitempty"` + Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -719,7 +718,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_413a91106d7bcce8, []int{11} + return fileDescriptor_public_34478dbd0ceb9d33, []int{11} } func (m *AttrMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,15 +728,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *AttrMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttrMap.Merge(m, src) +func (dst *AttrMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttrMap.Merge(dst, src) } func (m *AttrMap) XXX_Size() int { return m.Size() @@ -757,12 +756,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,proto3" json:"Shards,omitempty"` + Shards []uint64 `protobuf:"varint,2,rep,packed,name=Shards" json:"Shards,omitempty"` ColumnAttrs bool `protobuf:"varint,3,opt,name=ColumnAttrs,proto3" json:"ColumnAttrs,omitempty"` Remote bool `protobuf:"varint,5,opt,name=Remote,proto3" json:"Remote,omitempty"` ExcludeRowAttrs bool `protobuf:"varint,6,opt,name=ExcludeRowAttrs,proto3" json:"ExcludeRowAttrs,omitempty"` ExcludeColumns bool `protobuf:"varint,7,opt,name=ExcludeColumns,proto3" json:"ExcludeColumns,omitempty"` - EmbeddedData []*Row `protobuf:"bytes,8,rep,name=EmbeddedData,proto3" json:"EmbeddedData,omitempty"` + EmbeddedData []*Row `protobuf:"bytes,8,rep,name=EmbeddedData" json:"EmbeddedData,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -772,7 +771,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_413a91106d7bcce8, []int{12} + return fileDescriptor_public_34478dbd0ceb9d33, []int{12} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -782,15 +781,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRequest.Merge(m, src) +func (dst *QueryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRequest.Merge(dst, src) } func (m *QueryRequest) XXX_Size() int { return m.Size() @@ -852,8 +851,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,proto3" json:"Results,omitempty"` - ColumnAttrSets []*ColumnAttrSet `protobuf:"bytes,3,rep,name=ColumnAttrSets,proto3" json:"ColumnAttrSets,omitempty"` + Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` + ColumnAttrSets []*ColumnAttrSet `protobuf:"bytes,3,rep,name=ColumnAttrSets" json:"ColumnAttrSets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -863,7 +862,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_413a91106d7bcce8, []int{13} + return fileDescriptor_public_34478dbd0ceb9d33, []int{13} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -873,15 +872,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResponse.Merge(m, src) +func (dst *QueryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResponse.Merge(dst, src) } func (m *QueryResponse) XXX_Size() int { return m.Size() @@ -915,16 +914,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,proto3" json:"Row,omitempty"` + Row *Row `protobuf:"bytes,1,opt,name=Row" json:"Row,omitempty"` N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` - Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs,proto3" json:"Pairs,omitempty"` + Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` - ValCount *ValCount `protobuf:"bytes,5,opt,name=ValCount,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"` + 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -934,7 +933,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_413a91106d7bcce8, []int{14} + return fileDescriptor_public_34478dbd0ceb9d33, []int{14} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -944,15 +943,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResult.Merge(m, src) +func (dst *QueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(dst, src) } func (m *QueryResult) XXX_Size() int { return m.Size() @@ -1044,11 +1043,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,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"` + RowIDs []uint64 `protobuf:"varint,4,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + RowKeys []string `protobuf:"bytes,7,rep,name=RowKeys" json:"RowKeys,omitempty"` + ColumnKeys []string `protobuf:"bytes,8,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` + Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1058,7 +1057,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_413a91106d7bcce8, []int{15} + return fileDescriptor_public_34478dbd0ceb9d33, []int{15} } func (m *ImportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1068,15 +1067,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRequest.Merge(m, src) +func (dst *ImportRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportRequest.Merge(dst, src) } func (m *ImportRequest) XXX_Size() int { return m.Size() @@ -1147,11 +1146,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,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"` + 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"` + StringValues []string `protobuf:"bytes,9,rep,name=StringValues" json:"StringValues,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1161,7 +1160,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_413a91106d7bcce8, []int{16} + return fileDescriptor_public_34478dbd0ceb9d33, []int{16} } func (m *ImportValueRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1171,15 +1170,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportValueRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportValueRequest.Merge(m, src) +func (dst *ImportValueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportValueRequest.Merge(dst, src) } func (m *ImportValueRequest) XXX_Size() int { return m.Size() @@ -1249,7 +1248,7 @@ func (m *ImportValueRequest) GetStringValues() []string { 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,proto3" json:"Keys,omitempty"` + Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1259,7 +1258,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_413a91106d7bcce8, []int{17} + return fileDescriptor_public_34478dbd0ceb9d33, []int{17} } func (m *TranslateKeysRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1269,15 +1268,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *TranslateKeysRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranslateKeysRequest.Merge(m, src) +func (dst *TranslateKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TranslateKeysRequest.Merge(dst, src) } func (m *TranslateKeysRequest) XXX_Size() int { return m.Size() @@ -1310,7 +1309,7 @@ func (m *TranslateKeysRequest) GetKeys() []string { } type TranslateKeysResponse struct { - IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs,proto3" json:"IDs,omitempty"` + IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs" json:"IDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1320,7 +1319,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_413a91106d7bcce8, []int{18} + return fileDescriptor_public_34478dbd0ceb9d33, []int{18} } func (m *TranslateKeysResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1330,15 +1329,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *TranslateKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TranslateKeysResponse.Merge(m, src) +func (dst *TranslateKeysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TranslateKeysResponse.Merge(dst, src) } func (m *TranslateKeysResponse) XXX_Size() int { return m.Size() @@ -1356,6 +1355,116 @@ func (m *TranslateKeysResponse) GetIDs() []uint64 { return nil } +type TranslateIDsRequest 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"` + IDs []uint64 `protobuf:"varint,3,rep,packed,name=IDs" json:"IDs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TranslateIDsRequest) Reset() { *m = TranslateIDsRequest{} } +func (m *TranslateIDsRequest) String() string { return proto.CompactTextString(m) } +func (*TranslateIDsRequest) ProtoMessage() {} +func (*TranslateIDsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_public_34478dbd0ceb9d33, []int{19} +} +func (m *TranslateIDsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TranslateIDsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TranslateIDsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TranslateIDsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TranslateIDsRequest.Merge(dst, src) +} +func (m *TranslateIDsRequest) XXX_Size() int { + return m.Size() +} +func (m *TranslateIDsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TranslateIDsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TranslateIDsRequest proto.InternalMessageInfo + +func (m *TranslateIDsRequest) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *TranslateIDsRequest) GetField() string { + if m != nil { + return m.Field + } + return "" +} + +func (m *TranslateIDsRequest) GetIDs() []uint64 { + if m != nil { + return m.IDs + } + return nil +} + +type TranslateIDsResponse struct { + Keys []string `protobuf:"bytes,3,rep,name=Keys" json:"Keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TranslateIDsResponse) Reset() { *m = TranslateIDsResponse{} } +func (m *TranslateIDsResponse) String() string { return proto.CompactTextString(m) } +func (*TranslateIDsResponse) ProtoMessage() {} +func (*TranslateIDsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_public_34478dbd0ceb9d33, []int{20} +} +func (m *TranslateIDsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TranslateIDsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TranslateIDsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TranslateIDsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TranslateIDsResponse.Merge(dst, src) +} +func (m *TranslateIDsResponse) XXX_Size() int { + return m.Size() +} +func (m *TranslateIDsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TranslateIDsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TranslateIDsResponse proto.InternalMessageInfo + +func (m *TranslateIDsResponse) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + type ImportRoaringRequestView struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` @@ -1368,7 +1477,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_413a91106d7bcce8, []int{19} + return fileDescriptor_public_34478dbd0ceb9d33, []int{21} } func (m *ImportRoaringRequestView) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1378,15 +1487,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportRoaringRequestView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRoaringRequestView.Merge(m, src) +func (dst *ImportRoaringRequestView) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportRoaringRequestView.Merge(dst, src) } func (m *ImportRoaringRequestView) XXX_Size() int { return m.Size() @@ -1413,7 +1522,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,proto3" json:"views,omitempty"` + Views []*ImportRoaringRequestView `protobuf:"bytes,2,rep,name=views" json:"views,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1423,7 +1532,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_413a91106d7bcce8, []int{20} + return fileDescriptor_public_34478dbd0ceb9d33, []int{22} } func (m *ImportRoaringRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1433,15 +1542,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportRoaringRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRoaringRequest.Merge(m, src) +func (dst *ImportRoaringRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportRoaringRequest.Merge(dst, src) } func (m *ImportRoaringRequest) XXX_Size() int { return m.Size() @@ -1470,8 +1579,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,proto3" json:"AttrVals,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs,proto3" json:"ColumnIDs,omitempty"` + AttrVals []string `protobuf:"bytes,4,rep,name=AttrVals" json:"AttrVals,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1481,7 +1590,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_413a91106d7bcce8, []int{21} + return fileDescriptor_public_34478dbd0ceb9d33, []int{23} } func (m *ImportColumnAttrsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1491,15 +1600,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.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ImportColumnAttrsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportColumnAttrsRequest.Merge(m, src) +func (dst *ImportColumnAttrsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportColumnAttrsRequest.Merge(dst, src) } func (m *ImportColumnAttrsRequest) XXX_Size() int { return m.Size() @@ -1565,89 +1674,16 @@ func init() { proto.RegisterType((*ImportValueRequest)(nil), "internal.ImportValueRequest") proto.RegisterType((*TranslateKeysRequest)(nil), "internal.TranslateKeysRequest") proto.RegisterType((*TranslateKeysResponse)(nil), "internal.TranslateKeysResponse") + proto.RegisterType((*TranslateIDsRequest)(nil), "internal.TranslateIDsRequest") + proto.RegisterType((*TranslateIDsResponse)(nil), "internal.TranslateIDsResponse") proto.RegisterType((*ImportRoaringRequestView)(nil), "internal.ImportRoaringRequestView") 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, 0x0d, 0x98, 0xe8, 0x0b, 0xf5, 0x08, 0xf6, 0x30, 0x5b, - 0x8e, 0x67, 0x3a, 0x2d, 0xe3, 0x97, 0xb1, 0xce, 0xb9, 0x68, 0xcc, 0x96, 0x16, 0x0b, 0xcb, 0x2b, - 0x20, 0x2d, 0x07, 0x44, 0x7d, 0x02, 0xfe, 0xf3, 0x28, 0xce, 0xe5, 0x1e, 0xb4, 0xc6, 0xc7, 0x5c, - 0x82, 0x8f, 0xad, 0xf1, 0xb1, 0xbc, 0x05, 0xde, 0x53, 0x7d, 0x19, 0x78, 0x23, 0x11, 0xf6, 0x90, - 0x44, 0x39, 0x84, 0xf6, 0xe3, 0xac, 0x4a, 0x4b, 0x2e, 0xc3, 0x47, 0xa3, 0xa8, 0x13, 0xe8, 0xd1, - 0xf9, 0x27, 0xb1, 0x4e, 0x66, 0x52, 0x99, 0x64, 0x35, 0x92, 0x46, 0x53, 0xc8, 0x8a, 0xe6, 0xa2, - 0x21, 0xb4, 0x39, 0x98, 0xd3, 0xf4, 0xd0, 0x28, 0xea, 0x4b, 0x00, 0xf2, 0x16, 0x26, 0xcf, 0x7d, - 0x68, 0xb3, 0xc6, 0xd5, 0xbf, 0x99, 0xc8, 0x38, 0xaf, 0xc9, 0x34, 0x81, 0x2e, 0x0b, 0xd4, 0xd8, - 0x55, 0x84, 0x68, 0x44, 0x90, 0x95, 0x9a, 0x75, 0x6c, 0x81, 0xb0, 0x22, 0xef, 0xc0, 0x0e, 0x66, - 0x4b, 0x87, 0xb9, 0xd6, 0xd4, 0x37, 0x00, 0x5f, 0xe4, 0x59, 0xb5, 0x60, 0xb8, 0x32, 0x84, 0x36, - 0x6b, 0x75, 0x65, 0xd2, 0x55, 0x66, 0x2f, 0x45, 0x13, 0xb0, 0xbd, 0x5d, 0xd4, 0xd6, 0xd3, 0x6a, - 0xce, 0x57, 0x78, 0x48, 0xa2, 0x3a, 0x84, 0xee, 0x34, 0x4a, 0x56, 0xde, 0x69, 0x94, 0x70, 0xb5, - 0x1e, 0x92, 0xb8, 0x9e, 0xc5, 0xb3, 0x4d, 0xff, 0x1a, 0x76, 0xcd, 0x70, 0xd2, 0x98, 0x9d, 0xea, - 0xf2, 0x2d, 0xbe, 0xde, 0x5b, 0x0d, 0xac, 0xfa, 0x49, 0x80, 0x4f, 0x92, 0x4d, 0x20, 0x5c, 0x02, - 0x09, 0xfe, 0xd9, 0xe5, 0x42, 0xd7, 0x70, 0x58, 0x96, 0x23, 0xe8, 0x9f, 0x96, 0x34, 0xcf, 0xd3, - 0x28, 0xa9, 0x74, 0x7d, 0x5d, 0xd3, 0x24, 0xdf, 0x83, 0xee, 0x38, 0x2d, 0x8d, 0xdb, 0x67, 0x08, - 0x2b, 0x5d, 0xde, 0x85, 0xde, 0x51, 0x96, 0x25, 0xc6, 0xd9, 0x1e, 0x89, 0xb0, 0x8b, 0xce, 0x20, - 0xf7, 0x01, 0x9e, 0x24, 0x59, 0x54, 0x9f, 0xdd, 0x19, 0x89, 0x50, 0x60, 0xc3, 0xa2, 0x1e, 0x40, - 0x87, 0x2a, 0x7d, 0x16, 0x2d, 0x1c, 0x36, 0x71, 0x13, 0xb6, 0xbf, 0x04, 0x0c, 0xbe, 0xaa, 0x74, - 0x7e, 0x89, 0xfa, 0xdb, 0x4a, 0x17, 0x25, 0xf5, 0x96, 0x75, 0x3b, 0x1d, 0xac, 0xd0, 0x1c, 0x9c, - 0xbe, 0x8a, 0xf2, 0x99, 0xe9, 0x94, 0x8f, 0xb5, 0x46, 0x58, 0x5d, 0xcf, 0x0b, 0xc6, 0xda, 0xc5, - 0xa6, 0x89, 0x27, 0x48, 0xcf, 0xb3, 0xd2, 0x82, 0xa9, 0x35, 0x19, 0xc2, 0xff, 0x4f, 0x5e, 0xbf, - 0x48, 0xaa, 0x99, 0xc6, 0x6c, 0x69, 0x4e, 0xef, 0x70, 0xc0, 0xa6, 0x59, 0xbe, 0x0f, 0x7b, 0xb5, - 0xc9, 0x52, 0x51, 0x87, 0x03, 0x37, 0xac, 0xf2, 0x21, 0x0c, 0x4e, 0xe6, 0xe7, 0x7a, 0x36, 0xd3, - 0xb3, 0xe3, 0xa8, 0x8c, 0x82, 0x2e, 0xe3, 0xde, 0x20, 0x86, 0xb5, 0x10, 0xf5, 0xbd, 0x80, 0xdd, - 0x1a, 0x7d, 0xb1, 0xc8, 0xd2, 0x42, 0xd3, 0x27, 0x3e, 0xc9, 0x73, 0xfb, 0x89, 0x4f, 0xf2, 0x5c, - 0x3e, 0x80, 0x0e, 0xea, 0xa2, 0x4a, 0x4a, 0x3b, 0x25, 0xb7, 0x5d, 0x46, 0x7b, 0xb6, 0x4a, 0x4a, - 0xb4, 0x51, 0xf2, 0x53, 0xd8, 0x5b, 0x9b, 0x43, 0xc3, 0x91, 0xfd, 0xc3, 0x77, 0xdd, 0xb9, 0x35, - 0x3f, 0x6e, 0x84, 0xab, 0x9f, 0x3d, 0xe8, 0x37, 0x32, 0xaf, 0x86, 0x8c, 0xfa, 0xb3, 0x5b, 0x0f, - 0xd9, 0x3d, 0xe6, 0xe7, 0x6b, 0xd8, 0x91, 0x5e, 0xf9, 0x00, 0xc4, 0xa4, 0x1e, 0x4b, 0x31, 0x71, - 0xdc, 0xe1, 0xdd, 0xc4, 0x1d, 0xc4, 0xf6, 0xaf, 0xa2, 0xf4, 0x42, 0xcf, 0x78, 0x2c, 0xbb, 0x68, - 0x55, 0x79, 0xe0, 0xde, 0x23, 0x7f, 0xc7, 0xb5, 0x47, 0x6e, 0x3d, 0xe8, 0xde, 0xac, 0xe1, 0x8d, - 0xf1, 0x31, 0x7d, 0x2b, 0x9e, 0x17, 0xa3, 0xc9, 0x8f, 0xa1, 0xef, 0x78, 0xa3, 0xa8, 0x3f, 0xd1, - 0xd0, 0xa5, 0x72, 0x4e, 0x6c, 0x06, 0xca, 0xcf, 0x36, 0xa9, 0x3c, 0xe8, 0x71, 0x15, 0xc1, 0x1a, - 0xf2, 0x86, 0x1f, 0x37, 0xa9, 0xff, 0x61, 0x63, 0xb7, 0x04, 0xc0, 0x87, 0xdf, 0x71, 0x87, 0x57, - 0x2e, 0x6c, 0x6c, 0xa0, 0x8f, 0x9a, 0xf4, 0x1b, 0xf4, 0xf9, 0xcc, 0x70, 0xbd, 0x73, 0xc6, 0x87, - 0x8d, 0x38, 0xf5, 0xbb, 0x80, 0xdd, 0xf1, 0x7c, 0x91, 0xe5, 0x65, 0xe3, 0x49, 0x8d, 0xd3, 0x99, - 0x7e, 0x6d, 0x9f, 0x14, 0x2b, 0xdb, 0x89, 0x9a, 0xac, 0xfc, 0xb4, 0xf8, 0x29, 0xf9, 0x68, 0x94, - 0x46, 0x3b, 0xfd, 0xb5, 0x76, 0xde, 0x85, 0x9e, 0x99, 0x1d, 0x72, 0xb5, 0xd9, 0xe5, 0x0c, 0x66, - 0xd1, 0x2e, 0x79, 0xb9, 0x75, 0x78, 0xb9, 0x59, 0x95, 0x68, 0xc4, 0x84, 0xb1, 0xb3, 0xcb, 0xce, - 0x86, 0x85, 0xfc, 0x67, 0xf1, 0x5c, 0x17, 0x65, 0x34, 0x5f, 0xd0, 0xbb, 0xf4, 0x42, 0x0f, 0x1b, - 0x16, 0xf5, 0xa7, 0x00, 0x69, 0x30, 0x32, 0xed, 0xfc, 0x77, 0x40, 0x6f, 0x06, 0xb4, 0x5e, 0x76, - 0xe7, 0x8d, 0xb2, 0xef, 0xc0, 0x0e, 0xd7, 0x63, 0x4b, 0xae, 0x35, 0x62, 0x29, 0xc7, 0x91, 0x06, - 0xaf, 0xc0, 0xa6, 0x49, 0x2a, 0x18, 0x34, 0x08, 0x9a, 0xa6, 0x8b, 0x72, 0xaf, 0xd9, 0xd4, 0x14, - 0x86, 0x67, 0x79, 0x94, 0x16, 0x49, 0x54, 0x6a, 0xba, 0xee, 0xdf, 0xa0, 0xde, 0xf2, 0xd7, 0xa4, - 0x3e, 0x80, 0xdb, 0x1b, 0x79, 0x1d, 0x17, 0x51, 0x1b, 0x3c, 0x6e, 0x03, 0x89, 0xea, 0x08, 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.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1655,49 +1691,10 @@ func (m *Row) Marshal() (dAtA []byte, err error) { } func (m *Row) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Row) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 @@ -1710,19 +1707,54 @@ func (m *Row) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintPublic(dAtA, i, uint64(j1)) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintPublic(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) } - return len(dAtA) - i, nil + 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 } func (m *SignedRow) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1730,50 +1762,40 @@ func (m *SignedRow) Marshal() (dAtA []byte, err error) { } func (m *SignedRow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.Neg != nil { - { - size, err := m.Neg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPublic(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 - } - 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++ + i = encodeVarintPublic(dAtA, i, uint64(m.Neg.Size())) + n4, err := m.Neg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n4 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *RowIdentifiers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1781,28 +1803,10 @@ func (m *RowIdentifiers) Marshal() (dAtA []byte, err error) { } func (m *RowIdentifiers) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RowIdentifiers) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 @@ -1815,19 +1819,36 @@ func (m *RowIdentifiers) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA6[j5] = uint8(num) j5++ } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintPublic(dAtA, i, uint64(j5)) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintPublic(dAtA, i, uint64(j5)) + i += copy(dAtA[i:], dAtA6[:j5]) } - return len(dAtA) - i, nil + 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 } func (m *Pair) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1835,43 +1856,36 @@ func (m *Pair) Marshal() (dAtA []byte, err error) { } func (m *Pair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - 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] = 0x1a + if m.ID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.ID)) } if m.Count != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Count)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Count)) } - if m.ID != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 + if len(m.Key) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *PairField) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1879,45 +1893,36 @@ func (m *PairField) Marshal() (dAtA []byte, err error) { } func (m *PairField) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PairField) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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 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 + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *PairsField) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1925,47 +1930,38 @@ func (m *PairsField) Marshal() (dAtA []byte, err error) { } func (m *PairsField) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PairsField) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - 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 - } 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-- + 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 } } - return len(dAtA) - i, nil + 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 += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *FieldRow) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1973,45 +1969,37 @@ func (m *FieldRow) Marshal() (dAtA []byte, err error) { } func (m *FieldRow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FieldRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RowKey) > 0 { - i -= len(m.RowKey) - copy(dAtA[i:], m.RowKey) - i = encodeVarintPublic(dAtA, i, uint64(len(m.RowKey))) - i-- - dAtA[i] = 0x1a + 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 { - i = encodeVarintPublic(dAtA, i, uint64(m.RowID)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.RowID)) } - 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 + if len(m.RowKey) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.RowKey))) + i += copy(dAtA[i:], m.RowKey) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *GroupCount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2019,50 +2007,42 @@ func (m *GroupCount) Marshal() (dAtA []byte, err error) { } func (m *GroupCount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GroupCount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Sum != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Sum)) - i-- - dAtA[i] = 0x18 - } - if m.Count != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x10 - } 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-- + 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 } } - return len(dAtA) - i, nil + if m.Count != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Count)) + } + if m.Sum != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Sum)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ValCount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2070,36 +2050,30 @@ func (m *ValCount) Marshal() (dAtA []byte, err error) { } func (m *ValCount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValCount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Val != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Val)) } if m.Count != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Count)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Count)) } - if m.Val != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Val)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *ColumnAttrSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2107,52 +2081,43 @@ func (m *ColumnAttrSet) Marshal() (dAtA []byte, err error) { } func (m *ColumnAttrSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ColumnAttrSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - 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] = 0x1a + if m.ID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.ID)) } 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-- + 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.ID != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 + if len(m.Key) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Attr) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2160,66 +2125,58 @@ func (m *Attr) Marshal() (dAtA []byte, err error) { } func (m *Attr) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Attr) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.FloatValue != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) - i-- - dAtA[i] = 0x31 + 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.BoolValue { - i-- + dAtA[i] = 0x28 + i++ if m.BoolValue { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x28 + i++ } - if m.IntValue != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x20 + if m.FloatValue != 0 { + dAtA[i] = 0x31 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) + i += 8 } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - 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 + return i, nil } func (m *AttrMap) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2227,40 +2184,32 @@ func (m *AttrMap) Marshal() (dAtA []byte, err error) { } func (m *AttrMap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttrMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 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-- + 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 + } + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *QueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2268,72 +2217,15 @@ func (m *QueryRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - 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.Query) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Query))) + i += copy(dAtA[i:], m.Query) } if len(m.Shards) > 0 { dAtA9 := make([]byte, len(m.Shards)*10) @@ -2347,26 +2239,73 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA9[j8] = uint8(num) j8++ } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintPublic(dAtA, i, uint64(j8)) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPublic(dAtA, i, uint64(j8)) + i += copy(dAtA[i:], dAtA9[:j8]) } - 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.ColumnAttrs { + dAtA[i] = 0x18 + i++ + if m.ColumnAttrs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - return len(dAtA) - i, nil + 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 } func (m *QueryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2374,61 +2313,50 @@ func (m *QueryResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ColumnAttrSets) > 0 { - 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-- - dAtA[i] = 0x1a - } + 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 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-- + 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 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 + 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 + } + i += n + } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *QueryResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2436,152 +2364,131 @@ func (m *QueryResult) Marshal() (dAtA []byte, err error) { } func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.PairsField != nil { - { - size, err := m.PairsField.MarshalToSizedBuffer(dAtA[:i]) + 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 err != nil { return 0, err } - i -= size - i = encodeVarintPublic(dAtA, i, uint64(size)) + i += n } - 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 { - i-- + dAtA[i] = 0x20 + i++ if m.Changed { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x20 + i++ } - 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] = 0x1a + 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.N != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.N)) - i-- - dAtA[i] = 0x10 + if m.Type != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Type)) } - if m.Row != nil { - { - size, err := m.Row.MarshalToSizedBuffer(dAtA[:i]) + 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++ + } + dAtA13[j12] = uint8(num) + j12++ + } + 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 err != nil { return 0, err } - i -= size - i = encodeVarintPublic(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + 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 } func (m *ImportRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2589,42 +2496,31 @@ func (m *ImportRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.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 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.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 m.Shard != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) } - if len(m.Timestamps) > 0 { - dAtA18 := make([]byte, len(m.Timestamps)*10) + if len(m.RowIDs) > 0 { + dAtA18 := make([]byte, len(m.RowIDs)*10) var j17 int - for _, num1 := range m.Timestamps { - num := uint64(num1) + for _, num := range m.RowIDs { for num >= 1<<7 { dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2633,11 +2529,10 @@ func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA18[j17] = uint8(num) j17++ } - i -= j17 - copy(dAtA[i:], dAtA18[:j17]) + dAtA[i] = 0x22 + i++ i = encodeVarintPublic(dAtA, i, uint64(j17)) - i-- - dAtA[i] = 0x32 + i += copy(dAtA[i:], dAtA18[:j17]) } if len(m.ColumnIDs) > 0 { dAtA20 := make([]byte, len(m.ColumnIDs)*10) @@ -2651,16 +2546,16 @@ func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA20[j19] = uint8(num) j19++ } - i -= j19 - copy(dAtA[i:], dAtA20[:j19]) - i = encodeVarintPublic(dAtA, i, uint64(j19)) - i-- dAtA[i] = 0x2a + i++ + i = encodeVarintPublic(dAtA, i, uint64(j19)) + i += copy(dAtA[i:], dAtA20[:j19]) } - if len(m.RowIDs) > 0 { - dAtA22 := make([]byte, len(m.RowIDs)*10) + if len(m.Timestamps) > 0 { + dAtA22 := make([]byte, len(m.Timestamps)*10) var j21 int - for _, num := range m.RowIDs { + for _, num1 := range m.Timestamps { + num := uint64(num1) for num >= 1<<7 { dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -2669,38 +2564,51 @@ func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA22[j21] = uint8(num) j21++ } - i -= j21 - copy(dAtA[i:], dAtA22[:j21]) + dAtA[i] = 0x32 + i++ i = encodeVarintPublic(dAtA, i, uint64(j21)) - i-- - dAtA[i] = 0x22 + i += copy(dAtA[i:], dAtA22[:j21]) } - if m.Shard != 0 { - i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) - i-- - dAtA[i] = 0x18 + 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 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.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.Index) > 0 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *ImportValueRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2708,110 +2616,112 @@ func (m *ImportValueRequest) Marshal() (dAtA []byte, err error) { } func (m *ImportValueRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImportValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + 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.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.Field) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - if len(m.FloatValues) > 0 { - 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)) - i-- - dAtA[i] = 0x42 + if m.Shard != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) } - 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 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 { - dAtA25 := make([]byte, len(m.Values)*10) - var j24 int + dAtA26 := make([]byte, len(m.Values)*10) + var j25 int for _, num1 := range m.Values { num := uint64(num1) for num >= 1<<7 { - dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j24++ + j25++ } - dAtA25[j24] = uint8(num) - j24++ + dAtA26[j25] = uint8(num) + j25++ } - i -= j24 - copy(dAtA[i:], dAtA25[:j24]) - i = encodeVarintPublic(dAtA, i, uint64(j24)) - i-- dAtA[i] = 0x32 + i++ + i = encodeVarintPublic(dAtA, i, uint64(j25)) + i += copy(dAtA[i:], dAtA26[:j25]) } - 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++ + 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++ } - dAtA27[j26] = uint8(num) - j26++ + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } - 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.FloatValues) > 0 { + dAtA[i] = 0x42 + i++ + 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 + } } - 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.StringValues) > 0 { + for _, s := range m.StringValues { + dAtA[i] = 0x4a + 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.Index) > 0 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TranslateKeysRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2819,49 +2729,47 @@ func (m *TranslateKeysRequest) Marshal() (dAtA []byte, err error) { } func (m *TranslateKeysRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TranslateKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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] = 0x1a - } + 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 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - 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 + 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) + } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TranslateKeysResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2869,19 +2777,10 @@ func (m *TranslateKeysResponse) Marshal() (dAtA []byte, err error) { } func (m *TranslateKeysResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TranslateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = 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 @@ -2894,135 +2793,48 @@ func (m *TranslateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA29[j28] = uint8(num) j28++ } - i -= j28 - copy(dAtA[i:], dAtA29[:j28]) - i = encodeVarintPublic(dAtA, i, uint64(j28)) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintPublic(dAtA, i, uint64(j28)) + i += copy(dAtA[i:], dAtA29[:j28]) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } -func (m *ImportRoaringRequestView) Marshal() (dAtA []byte, err error) { +func (m *TranslateIDsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ImportRoaringRequestView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImportRoaringRequestView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) +func (m *TranslateIDsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintPublic(dAtA, i, uint64(len(m.Name))) - i-- + if len(m.Index) > 0 { dAtA[i] = 0xa + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Index))) + i += copy(dAtA[i:], m.Index) } - return len(dAtA) - i, nil -} - -func (m *ImportRoaringRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.Field) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) } - return dAtA[:n], nil -} - -func (m *ImportRoaringRequest) MarshalTo(dAtA []byte) (int, error) { - 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 { - i-- - if m.Clear { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ImportColumnAttrsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportColumnAttrsRequest) MarshalTo(dAtA []byte) (int, error) { - 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 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) + if len(m.IDs) > 0 { + dAtA31 := make([]byte, len(m.IDs)*10) var j30 int - for _, num := range m.ColumnIDs { + for _, num := range m.IDs { for num >= 1<<7 { dAtA31[j30] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -3031,53 +2843,207 @@ func (m *ImportColumnAttrsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error dAtA31[j30] = uint8(num) j30++ } - i -= j30 - copy(dAtA[i:], dAtA31[:j30]) + dAtA[i] = 0x1a + i++ i = encodeVarintPublic(dAtA, i, uint64(j30)) - i-- - dAtA[i] = 0x2a + i += copy(dAtA[i:], dAtA31[:j30]) } - 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 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TranslateIDsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TranslateIDsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + 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.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.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ImportRoaringRequestView) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportRoaringRequestView) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = 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 len(m.Data) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ImportRoaringRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportRoaringRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Clear { + dAtA[i] = 0x8 + i++ + if m.Clear { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + 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 +} + +func (m *ImportColumnAttrsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportColumnAttrsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = 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 { - i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPublic(dAtA, i, uint64(m.Shard)) } - 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 + if len(m.AttrKey) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPublic(dAtA, i, uint64(len(m.AttrKey))) + i += copy(dAtA[i:], m.AttrKey) } - return len(dAtA) - i, nil + 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 len(m.ColumnIDs) > 0 { + dAtA33 := make([]byte, len(m.ColumnIDs)*10) + var j32 int + for _, num := range m.ColumnIDs { + for num >= 1<<7 { + dAtA33[j32] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j32++ + } + dAtA33[j32] = uint8(num) + j32++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintPublic(dAtA, i, uint64(j32)) + i += copy(dAtA[i:], dAtA33[:j32]) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return 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 base + return offset + 1 } func (m *Row) Size() (n int) { if m == nil { @@ -3645,6 +3611,51 @@ func (m *TranslateKeysResponse) Size() (n int) { return n } +func (m *TranslateIDsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovPublic(uint64(l)) + } + l = len(m.Field) + if l > 0 { + n += 1 + l + sovPublic(uint64(l)) + } + if len(m.IDs) > 0 { + l = 0 + for _, e := range m.IDs { + l += sovPublic(uint64(e)) + } + n += 1 + sovPublic(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TranslateIDsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ImportRoaringRequestView) Size() (n int) { if m == nil { return 0 @@ -3723,7 +3734,14 @@ func (m *ImportColumnAttrsRequest) Size() (n int) { } func sovPublic(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozPublic(x uint64) (n int) { return sovPublic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3743,7 +3761,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 } @@ -3769,7 +3787,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 } @@ -3786,7 +3804,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 } @@ -3795,15 +3813,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -3823,7 +3838,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 } @@ -3847,7 +3862,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 } @@ -3856,9 +3871,6 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3881,7 +3893,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 } @@ -3891,9 +3903,6 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3913,7 +3922,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 } @@ -3922,9 +3931,6 @@ func (m *Row) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3942,9 +3948,6 @@ 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 } @@ -3973,7 +3976,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 } @@ -4001,7 +4004,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 } @@ -4010,9 +4013,6 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4037,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 } @@ -4046,9 +4046,6 @@ func (m *SignedRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4068,9 +4065,6 @@ 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 } @@ -4099,7 +4093,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 } @@ -4125,7 +4119,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 } @@ -4142,7 +4136,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 } @@ -4151,15 +4145,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -4179,7 +4170,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 } @@ -4203,7 +4194,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 } @@ -4213,9 +4204,6 @@ func (m *RowIdentifiers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4230,9 +4218,6 @@ 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 } @@ -4261,7 +4246,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 } @@ -4289,7 +4274,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 } @@ -4308,7 +4293,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 } @@ -4327,7 +4312,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 } @@ -4337,9 +4322,6 @@ func (m *Pair) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4354,9 +4336,6 @@ 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 } @@ -4385,7 +4364,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 } @@ -4413,7 +4392,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 } @@ -4422,9 +4401,6 @@ func (m *PairField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4449,7 +4425,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 } @@ -4459,9 +4435,6 @@ func (m *PairField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4476,9 +4449,6 @@ 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 } @@ -4507,7 +4477,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 } @@ -4535,7 +4505,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 } @@ -4544,9 +4514,6 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4569,7 +4536,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 } @@ -4579,9 +4546,6 @@ func (m *PairsField) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4596,9 +4560,6 @@ 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 } @@ -4627,7 +4588,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 } @@ -4655,7 +4616,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 } @@ -4665,9 +4626,6 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4687,7 +4645,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 } @@ -4706,7 +4664,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 } @@ -4716,9 +4674,6 @@ func (m *FieldRow) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4733,9 +4688,6 @@ 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 } @@ -4764,7 +4716,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 } @@ -4792,7 +4744,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 } @@ -4801,9 +4753,6 @@ func (m *GroupCount) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4826,7 +4775,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 } @@ -4845,7 +4794,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 } @@ -4859,9 +4808,6 @@ 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 } @@ -4890,7 +4836,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 } @@ -4918,7 +4864,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 } @@ -4937,7 +4883,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 } @@ -4951,9 +4897,6 @@ 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 } @@ -4982,7 +4925,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 } @@ -5010,7 +4953,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 } @@ -5029,7 +4972,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 } @@ -5038,9 +4981,6 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5063,7 +5003,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 } @@ -5073,9 +5013,6 @@ func (m *ColumnAttrSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5090,9 +5027,6 @@ 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 } @@ -5121,7 +5055,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 } @@ -5149,7 +5083,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 } @@ -5159,9 +5093,6 @@ func (m *Attr) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5181,7 +5112,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 } @@ -5200,7 +5131,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 } @@ -5210,9 +5141,6 @@ func (m *Attr) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5232,7 +5160,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 } @@ -5251,7 +5179,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 } @@ -5277,9 +5205,6 @@ 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 } @@ -5308,7 +5233,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 } @@ -5336,7 +5261,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 } @@ -5345,9 +5270,6 @@ func (m *AttrMap) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5365,9 +5287,6 @@ 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 } @@ -5396,7 +5315,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 } @@ -5424,7 +5343,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 } @@ -5434,9 +5353,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5454,7 +5370,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 } @@ -5471,7 +5387,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 } @@ -5480,15 +5396,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -5508,7 +5421,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 } @@ -5532,7 +5445,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 } @@ -5552,7 +5465,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 } @@ -5572,7 +5485,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 } @@ -5592,7 +5505,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 } @@ -5612,7 +5525,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 } @@ -5621,9 +5534,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5641,9 +5551,6 @@ 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 } @@ -5672,7 +5579,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 } @@ -5700,7 +5607,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 } @@ -5710,9 +5617,6 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5732,7 +5636,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 } @@ -5741,9 +5645,6 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5766,7 +5667,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 } @@ -5775,9 +5676,6 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5795,9 +5693,6 @@ 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 } @@ -5826,7 +5721,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 } @@ -5854,7 +5749,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 } @@ -5863,9 +5758,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5890,7 +5782,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 } @@ -5909,7 +5801,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 } @@ -5918,9 +5810,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5943,7 +5832,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 } @@ -5963,7 +5852,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 } @@ -5972,9 +5861,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5999,7 +5885,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 } @@ -6016,7 +5902,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 } @@ -6033,7 +5919,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 } @@ -6042,15 +5928,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6070,7 +5953,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 } @@ -6094,7 +5977,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 } @@ -6103,9 +5986,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6128,7 +6008,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 } @@ -6137,9 +6017,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6164,7 +6041,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 } @@ -6173,9 +6050,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6200,7 +6074,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 } @@ -6209,9 +6083,6 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6231,9 +6102,6 @@ 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 } @@ -6262,7 +6130,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 } @@ -6290,7 +6158,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 } @@ -6300,9 +6168,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6322,7 +6187,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 } @@ -6332,9 +6197,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6354,7 +6216,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 } @@ -6371,7 +6233,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 } @@ -6388,7 +6250,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 } @@ -6397,15 +6259,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6425,7 +6284,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 } @@ -6447,7 +6306,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 } @@ -6464,7 +6323,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 } @@ -6473,15 +6332,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6501,7 +6357,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 } @@ -6523,7 +6379,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 } @@ -6540,7 +6396,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 } @@ -6549,15 +6405,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6577,7 +6430,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 } @@ -6601,7 +6454,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 } @@ -6611,9 +6464,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6633,7 +6483,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 } @@ -6643,9 +6493,6 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6660,9 +6507,6 @@ 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 } @@ -6691,7 +6535,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 } @@ -6719,7 +6563,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 } @@ -6729,9 +6573,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6751,7 +6592,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 } @@ -6761,9 +6602,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6783,7 +6621,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 } @@ -6800,7 +6638,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 } @@ -6817,7 +6655,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 } @@ -6826,15 +6664,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6854,7 +6689,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 } @@ -6876,7 +6711,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 } @@ -6893,7 +6728,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 } @@ -6902,15 +6737,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -6930,7 +6762,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 } @@ -6954,7 +6786,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 } @@ -6964,9 +6796,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6993,7 +6822,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 } @@ -7002,9 +6831,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7040,7 +6866,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 } @@ -7050,9 +6876,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7067,9 +6890,6 @@ 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 } @@ -7098,7 +6918,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 } @@ -7126,7 +6946,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 } @@ -7136,9 +6956,6 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7158,7 +6975,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 } @@ -7168,9 +6985,6 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7190,7 +7004,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 } @@ -7200,9 +7014,6 @@ func (m *TranslateKeysRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7217,9 +7028,6 @@ 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 } @@ -7248,7 +7056,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 } @@ -7274,7 +7082,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 } @@ -7291,7 +7099,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 } @@ -7300,15 +7108,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -7328,7 +7133,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 } @@ -7347,7 +7152,266 @@ func (m *TranslateKeysResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthPublic } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TranslateIDsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TranslateIDsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TranslateIDsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", 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 > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", 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 > l { + return io.ErrUnexpectedEOF + } + m.Field = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPublic + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.IDs) == 0 { + m.IDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field IDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPublic(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPublic + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TranslateIDsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TranslateIDsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TranslateIDsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", 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 > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPublic(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { return ErrInvalidLengthPublic } if (iNdEx + skippy) > l { @@ -7378,7 +7442,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 } @@ -7406,7 +7470,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 } @@ -7416,9 +7480,6 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7438,7 +7499,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 } @@ -7447,9 +7508,6 @@ func (m *ImportRoaringRequestView) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7467,9 +7525,6 @@ 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 } @@ -7498,7 +7553,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 } @@ -7526,7 +7581,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 } @@ -7546,7 +7601,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 } @@ -7555,9 +7610,6 @@ func (m *ImportRoaringRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7575,9 +7627,6 @@ 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 } @@ -7606,7 +7655,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 } @@ -7634,7 +7683,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 } @@ -7644,9 +7693,6 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7666,7 +7712,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 } @@ -7685,7 +7731,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 } @@ -7695,9 +7741,6 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7717,7 +7760,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 } @@ -7727,9 +7770,6 @@ func (m *ImportColumnAttrsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPublic } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPublic - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7747,7 +7787,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 } @@ -7764,7 +7804,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 } @@ -7773,15 +7813,12 @@ 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[iNdEx:postIndex] { + for _, integer := range dAtA { if integer < 128 { count++ } @@ -7801,7 +7838,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 } @@ -7820,9 +7857,6 @@ 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 } @@ -7839,7 +7873,6 @@ 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 { @@ -7871,8 +7904,10 @@ 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 { @@ -7889,34 +7924,128 @@ func skipPublic(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthPublic } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPublic + 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 } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil 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 - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthPublic = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPublic = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPublic = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthPublic = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPublic = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("public.proto", fileDescriptor_public_34478dbd0ceb9d33) } + +var fileDescriptor_public_34478dbd0ceb9d33 = []byte{ + // 1097 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x8e, 0x1b, 0x45, + 0x10, 0xa6, 0x3d, 0xf6, 0xda, 0x2e, 0x7b, 0x97, 0xa8, 0xe3, 0x84, 0x11, 0x8a, 0x16, 0xab, 0x15, + 0xa1, 0x81, 0xc3, 0x46, 0x59, 0x10, 0xca, 0x89, 0x9f, 0x8d, 0x37, 0x60, 0x45, 0xb1, 0x42, 0x79, + 0x65, 0x6e, 0x48, 0xb3, 0x71, 0x67, 0x33, 0xd2, 0x78, 0xc6, 0xcc, 0x0f, 0xce, 0x3e, 0x07, 0x17, + 0xc4, 0x13, 0xf0, 0x0e, 0xbc, 0x00, 0x47, 0x1e, 0x01, 0x96, 0x37, 0xe0, 0xca, 0x05, 0x55, 0xf5, + 0xb4, 0x7b, 0xec, 0xfd, 0x01, 0x45, 0xdc, 0xfa, 0xab, 0xaa, 0xae, 0xae, 0xaa, 0xae, 0xfa, 0xba, + 0xa1, 0xbf, 0x2c, 0x4f, 0xe3, 0xe8, 0xc5, 0xc1, 0x32, 0x4b, 0x8b, 0x54, 0x76, 0xa2, 0xa4, 0xd0, + 0x59, 0x12, 0xc6, 0x2a, 0x07, 0x0f, 0xd3, 0x95, 0xf4, 0xa1, 0xfd, 0x38, 0x8d, 0xcb, 0x45, 0x92, + 0xfb, 0x62, 0xe8, 0x05, 0x4d, 0xb4, 0x50, 0xde, 0x87, 0xd6, 0x17, 0x45, 0x91, 0xe5, 0x7e, 0x63, + 0xe8, 0x05, 0xbd, 0xc3, 0xbd, 0x03, 0xbb, 0xf5, 0x80, 0xc4, 0x68, 0x94, 0x52, 0x42, 0xf3, 0xa9, + 0x3e, 0xcf, 0x7d, 0x6f, 0xe8, 0x05, 0x5d, 0xe4, 0x35, 0xf9, 0xc4, 0x34, 0xcc, 0xa2, 0xe4, 0xcc, + 0x6f, 0x0e, 0x45, 0xd0, 0x47, 0x0b, 0xd5, 0x33, 0xe8, 0x4e, 0xa3, 0xb3, 0x44, 0xcf, 0xe9, 0xe8, + 0xf7, 0xc0, 0x7b, 0x9e, 0xd2, 0xb1, 0x22, 0xe8, 0x1d, 0xee, 0x3a, 0xf7, 0x98, 0xae, 0x90, 0x34, + 0x64, 0x30, 0xd1, 0x67, 0x7e, 0xe3, 0x4a, 0x83, 0x89, 0x3e, 0x53, 0x8f, 0x60, 0x0f, 0xd3, 0xd5, + 0x78, 0xae, 0x93, 0x22, 0x7a, 0x19, 0x69, 0x13, 0x0e, 0xa6, 0x2b, 0x9b, 0x0b, 0xaf, 0xd7, 0x21, + 0x36, 0x5c, 0x88, 0xea, 0x53, 0x68, 0x3e, 0x0f, 0xa3, 0x4c, 0xee, 0x41, 0x63, 0x3c, 0xe2, 0x10, + 0x9a, 0xd8, 0x18, 0x8f, 0xe4, 0x00, 0x5a, 0x8f, 0xd3, 0x32, 0x29, 0xf8, 0xd0, 0x26, 0x1a, 0x20, + 0x6f, 0x81, 0xf7, 0x54, 0x9f, 0xfb, 0xde, 0x50, 0x04, 0x5d, 0xa4, 0xa5, 0x3a, 0x86, 0x2e, 0xed, + 0x7f, 0x12, 0xe9, 0x78, 0x2e, 0x95, 0x71, 0x56, 0x65, 0x52, 0x2b, 0x14, 0x49, 0xd1, 0x1c, 0x34, + 0x80, 0x16, 0x1b, 0xb3, 0xe3, 0x2e, 0x1a, 0xa0, 0xbe, 0x02, 0x20, 0x6d, 0x6e, 0xfc, 0xdc, 0x87, + 0x16, 0x23, 0x8e, 0xfe, 0xb2, 0x23, 0xa3, 0xbc, 0xc6, 0xd3, 0x04, 0x3a, 0xbc, 0xa0, 0xc2, 0xae, + 0x2d, 0x44, 0xcd, 0x82, 0xa4, 0x54, 0xac, 0x91, 0x4d, 0x8d, 0x81, 0xbc, 0x0b, 0x3b, 0x98, 0xae, + 0x5c, 0x76, 0x15, 0x52, 0xdf, 0x02, 0x7c, 0x99, 0xa5, 0xe5, 0xd2, 0x14, 0x20, 0x80, 0x16, 0xa3, + 0x2a, 0x32, 0xe9, 0x22, 0xb3, 0x87, 0xa2, 0x31, 0xb8, 0xbe, 0x80, 0xd3, 0x72, 0xc1, 0x47, 0x78, + 0x48, 0x4b, 0x75, 0x08, 0x9d, 0x59, 0x18, 0xaf, 0xb5, 0xb3, 0x30, 0xe6, 0x68, 0x3d, 0xa4, 0xe5, + 0xa6, 0x17, 0xaf, 0xf2, 0xa2, 0xbe, 0x81, 0x5d, 0xd3, 0x9c, 0xd4, 0x7a, 0x53, 0x5d, 0x5c, 0xba, + 0xbd, 0xff, 0xd6, 0xb2, 0x97, 0x6f, 0xf3, 0x67, 0x01, 0x4d, 0xd2, 0x59, 0x95, 0x58, 0xab, 0xa8, + 0x79, 0x4e, 0xce, 0x97, 0xba, 0x4a, 0x87, 0xd7, 0x72, 0x08, 0xbd, 0x69, 0x41, 0xfd, 0x3c, 0x0b, + 0xe3, 0x52, 0x57, 0x8e, 0xea, 0x22, 0xf9, 0x2e, 0x74, 0xc6, 0x49, 0x61, 0xd4, 0x4d, 0x4e, 0x61, + 0x8d, 0xe5, 0x3d, 0xe8, 0x1e, 0xa5, 0x69, 0x6c, 0x94, 0xad, 0xa1, 0x08, 0x3a, 0xe8, 0x04, 0x72, + 0x1f, 0xe0, 0x49, 0x9c, 0x86, 0xd5, 0xde, 0x9d, 0xa1, 0x08, 0x04, 0xd6, 0x24, 0xea, 0x01, 0xb4, + 0x29, 0xd2, 0x67, 0xe1, 0xd2, 0x65, 0x2b, 0x6e, 0xc8, 0x56, 0xfd, 0x2d, 0xa0, 0xff, 0x75, 0xa9, + 0xb3, 0x73, 0xd4, 0xdf, 0x95, 0x3a, 0x2f, 0xa8, 0xb6, 0x8c, 0x6d, 0x77, 0x30, 0xa0, 0x3e, 0x98, + 0xbe, 0x0a, 0xb3, 0xb9, 0xa9, 0x5d, 0x13, 0x2b, 0x44, 0xb9, 0xba, 0x9a, 0xe7, 0x9c, 0x6b, 0x07, + 0xeb, 0x22, 0xee, 0x20, 0xbd, 0x48, 0x0b, 0x9b, 0x4c, 0x85, 0x64, 0x00, 0x6f, 0x1f, 0xbf, 0x7e, + 0x11, 0x97, 0x73, 0x8d, 0xe9, 0xca, 0xec, 0xde, 0x61, 0x83, 0x6d, 0xb1, 0x7c, 0x1f, 0xf6, 0x2a, + 0x91, 0xa5, 0xa2, 0x36, 0x1b, 0x6e, 0x49, 0xe5, 0x43, 0xe8, 0x1f, 0x2f, 0x4e, 0xf5, 0x7c, 0xae, + 0xe7, 0xa3, 0xb0, 0x08, 0xfd, 0x0e, 0xe7, 0xbd, 0x45, 0x0c, 0x1b, 0x26, 0xea, 0x07, 0x01, 0xbb, + 0x55, 0xf6, 0xf9, 0x32, 0x4d, 0x72, 0x4d, 0x57, 0x7c, 0x9c, 0x65, 0xf6, 0x8a, 0x8f, 0xb3, 0x4c, + 0x3e, 0x80, 0x36, 0xea, 0xbc, 0x8c, 0x0b, 0xdb, 0x37, 0x77, 0x9c, 0x47, 0xbb, 0xb7, 0x8c, 0x0b, + 0xb4, 0x56, 0xf2, 0x33, 0xd8, 0xdb, 0xe8, 0x43, 0xc3, 0x7e, 0xbd, 0xc3, 0x77, 0xdc, 0xbe, 0x0d, + 0x3d, 0x6e, 0x99, 0xab, 0x5f, 0x3c, 0xe8, 0xd5, 0x3c, 0x13, 0xd1, 0x61, 0xba, 0xba, 0x86, 0x09, + 0x69, 0xa2, 0xfb, 0x20, 0x26, 0x55, 0x0b, 0x8a, 0x89, 0xe3, 0x09, 0xef, 0x26, 0x9e, 0x20, 0x66, + 0x7f, 0x15, 0x26, 0x67, 0x7a, 0xce, 0x2d, 0xd8, 0x41, 0x0b, 0xe5, 0x81, 0x9b, 0x3d, 0xbe, 0xb3, + 0x8d, 0x81, 0xb6, 0x1a, 0x74, 0xf3, 0x69, 0x67, 0x80, 0xae, 0x6f, 0xb7, 0x9a, 0x01, 0xc3, 0x1b, + 0xe3, 0x11, 0xdd, 0x15, 0xf7, 0x8b, 0x41, 0xf2, 0x13, 0xe8, 0x39, 0xde, 0xc8, 0xab, 0x2b, 0x1a, + 0x38, 0xf7, 0x4e, 0x89, 0x75, 0x43, 0xf9, 0xf9, 0x36, 0x95, 0xfb, 0x5d, 0x8e, 0xcc, 0xdf, 0xa8, + 0x46, 0x4d, 0x8f, 0xdb, 0xd4, 0xff, 0xb0, 0xf6, 0xb6, 0xf8, 0xc0, 0x9b, 0x6f, 0xbb, 0xcd, 0x6b, + 0x15, 0xd6, 0x5e, 0xa0, 0x8f, 0xeb, 0xf4, 0xeb, 0xf7, 0x78, 0xcf, 0x60, 0xb3, 0x9a, 0x46, 0x87, + 0x35, 0x3b, 0xf5, 0x87, 0x80, 0xdd, 0xf1, 0x62, 0x99, 0x66, 0x45, 0x6d, 0xa4, 0xc6, 0xc9, 0x5c, + 0xbf, 0xb6, 0x23, 0xc5, 0xe0, 0x6a, 0xa2, 0x26, 0x29, 0x8f, 0x16, 0x8f, 0x52, 0x13, 0x0d, 0xa8, + 0x95, 0xb3, 0xb9, 0x51, 0xce, 0x7b, 0xd0, 0x35, 0xbd, 0x43, 0xaa, 0x16, 0xab, 0x9c, 0x80, 0xc8, + 0xe2, 0x24, 0x5a, 0xe8, 0xbc, 0x08, 0x17, 0x4b, 0x9a, 0x2e, 0x2f, 0xf0, 0xb0, 0x26, 0x31, 0x0f, + 0xf1, 0x8a, 0x1f, 0xbf, 0x36, 0x3f, 0x7e, 0x16, 0xd2, 0x4e, 0xe3, 0x86, 0x95, 0x1d, 0x56, 0xd6, + 0x24, 0xea, 0x2f, 0x01, 0xd2, 0xe4, 0xc8, 0xb4, 0xf3, 0xff, 0x25, 0x7a, 0x73, 0x42, 0x77, 0x61, + 0x87, 0xcf, 0xb3, 0xc9, 0x54, 0x68, 0x2b, 0xdc, 0xf6, 0x76, 0xb8, 0xc4, 0x52, 0x8e, 0x23, 0x4d, + 0x3e, 0x02, 0xeb, 0x22, 0xa9, 0xa0, 0x5f, 0x23, 0x68, 0xea, 0x2e, 0xf2, 0xb1, 0x21, 0x53, 0x33, + 0x18, 0x9c, 0x64, 0x61, 0x92, 0xc7, 0x61, 0xa1, 0xc9, 0xed, 0x9b, 0x64, 0x7d, 0xc5, 0x7f, 0x48, + 0x7d, 0x00, 0x77, 0xb6, 0xfc, 0x3a, 0x2e, 0xa2, 0x32, 0x78, 0x5c, 0x06, 0x5a, 0xaa, 0x29, 0xdc, + 0x5e, 0x9b, 0x8e, 0x47, 0x6f, 0x14, 0xc1, 0x65, 0xa7, 0x1f, 0xd6, 0xf2, 0x62, 0xa7, 0xd5, 0xf1, + 0x57, 0xc5, 0x7a, 0x04, 0x7e, 0xd5, 0xdb, 0xe6, 0xcb, 0x56, 0x45, 0x30, 0x8b, 0xf4, 0x8a, 0xec, + 0x27, 0xe1, 0x42, 0x57, 0x41, 0xf0, 0x9a, 0x64, 0xcc, 0xc5, 0x0d, 0xfe, 0xe8, 0xf1, 0x5a, 0xbd, + 0x84, 0xc1, 0x55, 0x3e, 0xf8, 0x55, 0x8f, 0x75, 0x68, 0xc8, 0xb7, 0x83, 0x06, 0xc8, 0x47, 0xd0, + 0xfa, 0x3e, 0xd2, 0x2b, 0x4b, 0xbe, 0xca, 0xcd, 0xdf, 0x75, 0x81, 0xa0, 0xd9, 0xa0, 0x7e, 0x12, + 0x36, 0xd8, 0xda, 0x7b, 0xf4, 0xaf, 0x25, 0x33, 0x4d, 0x59, 0x7d, 0x2c, 0x4c, 0x53, 0xfa, 0xe6, + 0x51, 0x75, 0xbf, 0x02, 0x0b, 0xe9, 0x21, 0xa7, 0xe5, 0x2c, 0x8c, 0xcd, 0x64, 0x76, 0x71, 0x8d, + 0x6f, 0x6e, 0xe5, 0xa3, 0x5b, 0xbf, 0x5e, 0xec, 0x8b, 0xdf, 0x2e, 0xf6, 0xc5, 0xef, 0x17, 0xfb, + 0xe2, 0xc7, 0x3f, 0xf7, 0xdf, 0x3a, 0xdd, 0xe1, 0x2f, 0xf8, 0x47, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x7f, 0x3f, 0x32, 0x93, 0x92, 0x0b, 0x00, 0x00, +} diff --git a/internal/public.proto b/internal/public.proto index ed33a4cda..7ba89bd75 100644 --- a/internal/public.proto +++ b/internal/public.proto @@ -133,6 +133,16 @@ message TranslateKeysResponse { repeated uint64 IDs = 3; } +message TranslateIDsRequest { + string Index = 1; + string Field = 2; + repeated uint64 IDs = 3; +} + +message TranslateIDsResponse { + repeated string Keys = 3; +} + message ImportRoaringRequestView { string Name = 1; bytes Data = 2; diff --git a/mock/translator.go b/mock/translator.go index 4291ed43d..9de9fb444 100644 --- a/mock/translator.go +++ b/mock/translator.go @@ -25,6 +25,7 @@ var _ pilosa.TranslateStore = (*TranslateStore)(nil) type TranslateStore struct { CloseFunc func() error MaxIDFunc func() (uint64, error) + PartitionIDFunc func() int ReadOnlyFunc func() bool SetReadOnlyFunc func(v bool) TranslateKeyFunc func(key string) (uint64, error) @@ -43,6 +44,10 @@ func (s *TranslateStore) MaxID() (uint64, error) { return s.MaxIDFunc() } +func (s *TranslateStore) PartitionID() int { + return s.PartitionIDFunc() +} + func (s *TranslateStore) ReadOnly() bool { return s.ReadOnlyFunc() } diff --git a/pql/ast.go b/pql/ast.go index 738601100..9855f5b96 100644 --- a/pql/ast.go +++ b/pql/ast.go @@ -338,6 +338,8 @@ var callInfoByFunc = map[string]callInfo{ "Row": {allowUnknown: true}, "Range": {allowUnknown: true}, + "Distinct": {allowUnknown: true}, + // allow only "field=X" cases with string field names "Max": allowField, "Min": allowField, @@ -742,6 +744,36 @@ func (c *Call) HasConditionArg() bool { return false } +// TranslateInfo returns the relevant translation fields. +func (c *Call) TranslateInfo(columnLabel, rowLabel string) (colKey, rowKey, fieldName string) { + switch c.Name { + case "Set", "Clear", "Row", "Range", "SetColumnAttrs", "ClearRow": + // Positional args in new PQL syntax require special handling here. + fieldName, _ = c.FieldArg() + return "_" + columnLabel, fieldName, fieldName + case "SetRowAttrs": + // Positional args in new PQL syntax require special handling here. + return "", "_" + rowLabel, c.ArgString("_field") + case "Rows": + return "column", "previous", c.ArgString("_field") + case "IncludesColumn": + return "column", "", "" + case "GroupBy": + return "", "", "" + default: + return "col", "row", c.ArgString("_field") + } +} + +func (c *Call) ArgString(key string) string { + value, ok := c.Args[key] + if !ok { + return "" + } + s, _ := value.(string) + return s +} + // Condition represents an operation & value. // When used in an argument map it represents a binary expression. type Condition struct { diff --git a/server.go b/server.go index 96b422cfe..19e20b074 100644 --- a/server.go +++ b/server.go @@ -300,10 +300,12 @@ func OptServerOpenTranslateReader(fn OpenTranslateReaderFunc) ServerOption { // NewServer returns a new instance of Server. func NewServer(opts ...ServerOption) (*Server, error) { + cluster := newCluster() + s := &Server{ closing: make(chan struct{}), - cluster: newCluster(), - holder: NewHolder(), + cluster: cluster, + holder: NewHolder(cluster.partitionN), diagnostics: newDiagnosticsCollector(defaultDiagnosticServer), systemInfo: newNopSystemInfo(), defaultClient: nopInternalClient{}, @@ -527,6 +529,10 @@ func (s *Server) Open() error { s.syncer.Closing = s.closing s.syncer.Stats = s.holder.Stats.WithTags("HolderSyncer") + if err := s.syncer.ResetTranslationSync(); err != nil { + return err + } + // Start background monitoring. s.wg.Add(3) go func() { defer s.wg.Done(); s.monitorAntiEntropy() }() @@ -660,10 +666,16 @@ func (s *Server) receiveMessage(m Message) error { if err != nil { return err } + if err := s.syncer.ResetTranslationSync(); err != nil { + return err + } case *DeleteIndexMessage: if err := s.holder.DeleteIndex(obj.Index); err != nil { return err } + if err := s.syncer.ResetTranslationSync(); err != nil { + return err + } case *CreateFieldMessage: idx := s.holder.Index(obj.Index) if idx == nil { @@ -674,11 +686,17 @@ func (s *Server) receiveMessage(m Message) error { if err != nil { return err } + if err := s.syncer.ResetTranslationSync(); err != nil { + return err + } case *DeleteFieldMessage: idx := s.holder.Index(obj.Index) if err := idx.DeleteField(obj.Field); err != nil { return err } + if err := s.syncer.ResetTranslationSync(); err != nil { + return err + } case *DeleteAvailableShardMessage: f := s.holder.Field(obj.Index, obj.Field) if err := f.RemoveAvailableShard(obj.ShardID); err != nil { diff --git a/server/grpc.go b/server/grpc.go index 78f9b87f6..95824c607 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -256,10 +256,31 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer case "int": 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 { + var value string + var exists bool + var err error + if fi := field.ForeignIndex(); fi != "" { + // Get the value from the int field. + intVal, ok, err := field.Value(col) + if err != nil { + return errors.Wrap(err, "getting int value") + } else if ok { + vals, err := h.api.TranslateIndexIDs(context.Background(), fi, []uint64{uint64(intVal)}) + if err != nil { + return errors.Wrap(err, "getting keys for ids") + } + if len(vals) > 0 && vals[0] != "" { + value = vals[0] + exists = true + } + } + } else { + value, exists, err = field.StringValue(col) + if err != nil { + return errors.Wrap(err, "getting string field value for column") + } + } + if exists { rowResp.Columns = append(rowResp.Columns, &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_StringVal{StringVal: value}}) } else { @@ -454,16 +475,37 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer case "int": // Translate column key. - id, err := index.TranslateStore().TranslateKey(col) + id, err := h.api.TranslateIndexKey(context.Background(), index.Name(), col) if err != nil { return errors.Wrap(err, "translating column key") } 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 { + var value string + var exists bool + var err error + if fi := field.ForeignIndex(); fi != "" { + // Get the value from the int field. + intVal, ok, err := field.Value(id) + if err != nil { + return errors.Wrap(err, "getting int value") + } else if ok { + vals, err := h.api.TranslateIndexIDs(context.Background(), fi, []uint64{uint64(intVal)}) + if err != nil { + return errors.Wrap(err, "getting keys for ids") + } + if len(vals) > 0 && vals[0] != "" { + value = vals[0] + exists = true + } + } + } else { + value, exists, err = field.StringValue(id) + if err != nil { + return errors.Wrap(err, "getting string field value for column") + } + } + if exists { rowResp.Columns = append(rowResp.Columns, &pb.ColumnResponse{ColumnVal: &pb.ColumnResponse_StringVal{StringVal: value}}) } else { @@ -485,7 +527,7 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer case "decimal": // Translate column key. - id, err := index.TranslateStore().TranslateKey(col) + id, err := h.api.TranslateIndexKey(context.Background(), index.Name(), col) if err != nil { return errors.Wrap(err, "translating column key") } diff --git a/server/handler_test.go b/server/handler_test.go index 2f0af0345..cb132fe8d 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -991,7 +991,7 @@ func TestHandler_Endpoints(t *testing.T) { if w.Code != gohttp.StatusOK { t.Fatalf("unexpected status code: %d", w.Code) } - target := []uint64{1, 2, 3} + target := []uint64{162529281, 159383553, 160432129} resp := pilosa.TranslateKeysResponse{} err = cmd.API.Serializer.Unmarshal(w.Body.Bytes(), &resp) if err != nil { diff --git a/server/server.go b/server/server.go index e317f9548..e9edeb293 100644 --- a/server/server.go +++ b/server/server.go @@ -137,7 +137,6 @@ func NewCommand(stdin io.Reader, stdout, stderr io.Writer, opts ...CommandOption // Start starts the pilosa server - it returns once the server is running. func (m *Command) Start() (err error) { - // Seed random number generator rand.Seed(time.Now().UTC().UnixNano()) diff --git a/test/holder.go b/test/holder.go index b5e7c1260..a4399ba67 100644 --- a/test/holder.go +++ b/test/holder.go @@ -35,7 +35,7 @@ func NewHolder() *Holder { panic(err) } - h := &Holder{Holder: pilosa.NewHolder()} + h := &Holder{Holder: pilosa.NewHolder(pilosa.DefaultPartitionN)} h.Path = path h.Holder.NewAttrStore = boltdb.NewAttrStore @@ -61,7 +61,7 @@ func (h *Holder) Close() error { // Note that the holder must be Closed first. func (h *Holder) Reopen() error { path, logger := h.Path, h.Holder.Logger - h.Holder = pilosa.NewHolder() + h.Holder = pilosa.NewHolder(pilosa.DefaultPartitionN) h.Holder.Path = path h.Holder.Logger = logger h.Holder.NewAttrStore = boltdb.NewAttrStore diff --git a/test/index.go b/test/index.go index 7f461b927..bf65c6ae2 100644 --- a/test/index.go +++ b/test/index.go @@ -32,7 +32,7 @@ func newIndex() *Index { if err != nil { panic(err) } - index, err := pilosa.NewIndex(path, "i") + index, err := pilosa.NewIndex(path, "i", pilosa.DefaultPartitionN) if err != nil { panic(err) } @@ -62,7 +62,7 @@ func (i *Index) Reopen() error { } path, name := i.Path(), i.Name() - i.Index, err = pilosa.NewIndex(path, name) + i.Index, err = pilosa.NewIndex(path, name, pilosa.DefaultPartitionN) if err != nil { return err } diff --git a/test/pilosa.go b/test/pilosa.go index 73935290c..34880e627 100644 --- a/test/pilosa.go +++ b/test/pilosa.go @@ -137,6 +137,7 @@ func (m *Command) Reopen() error { // MustCreateIndex uses this command's API to create an index and fails the test // if there is an error. func (m *Command) MustCreateIndex(tb testing.TB, name string, opts pilosa.IndexOptions) *pilosa.Index { + tb.Helper() idx, err := m.API.CreateIndex(context.Background(), name, opts) if err != nil { tb.Fatalf("creating index: %v with options: %v, err: %v", name, opts, err) @@ -147,6 +148,7 @@ func (m *Command) MustCreateIndex(tb testing.TB, name string, opts pilosa.IndexO // MustCreateField uses this command's API to create the field. The index must // already exist - it fails the test if there is an error. func (m *Command) MustCreateField(tb testing.TB, index, field string, opts ...pilosa.FieldOption) *pilosa.Field { + tb.Helper() f, err := m.API.CreateField(context.Background(), index, field, opts...) if err != nil { tb.Fatalf("creating field: %s in index: %s err: %v", field, index, err) @@ -157,6 +159,7 @@ func (m *Command) MustCreateField(tb testing.TB, index, field string, opts ...pi // MustQuery uses this command's API to execute the given query request, failing // if Query returns a non-nil error, otherwise returning the QueryResponse. func (m *Command) MustQuery(tb testing.TB, req *pilosa.QueryRequest) pilosa.QueryResponse { + tb.Helper() resp, err := m.API.Query(context.Background(), req) if err != nil { tb.Fatalf("making query: %v, err: %v", req, err) @@ -248,6 +251,7 @@ type Cluster []*Command // Query executes an API.Query through one of the cluster's node's API. It fails // the test if there is an error. func (c Cluster) Query(t testing.TB, index, query string) pilosa.QueryResponse { + t.Helper() if len(c) == 0 { t.Fatal("must have at least one node in cluster to query") } @@ -256,6 +260,7 @@ func (c Cluster) Query(t testing.TB, index, query string) pilosa.QueryResponse { } func (c Cluster) ImportBits(t testing.TB, index, field string, rowcols [][2]uint64) { + t.Helper() byShard := make(map[uint64][][2]uint64) for _, rowcol := range rowcols { shard := rowcol[1] / pilosa.ShardWidth @@ -296,6 +301,7 @@ func (c Cluster) ImportBits(t testing.TB, index, field string, rowcols [][2]uint // CreateField creates the index (if necessary) and field specified. func (c Cluster) CreateField(t testing.TB, index string, iopts pilosa.IndexOptions, field string, fopts ...pilosa.FieldOption) *pilosa.Field { + t.Helper() idx, err := c[0].API.CreateIndex(context.Background(), index, iopts) if err != nil && !strings.Contains(err.Error(), "index already exists") { t.Fatalf("creating index: %v", err) @@ -344,6 +350,7 @@ func (c Cluster) Close() error { // MustNewCluster creates a new cluster func MustNewCluster(tb testing.TB, size int, opts ...[]server.CommandOption) Cluster { + tb.Helper() c, err := newCluster(size, opts...) if err != nil { tb.Fatalf("new cluster: %v", err) @@ -391,6 +398,7 @@ func runCluster(size int, opts ...[]server.CommandOption) (Cluster, error) { // MustRunCluster creates and starts a new cluster func MustRunCluster(tb testing.TB, size int, opts ...[]server.CommandOption) Cluster { + tb.Helper() c, err := runCluster(size, opts...) if err != nil { tb.Fatalf("run cluster: %v", err) @@ -429,6 +437,7 @@ func MustDo(method, urlStr string, body string) *httpResponse { } func CheckGroupBy(t *testing.T, expected, results []pilosa.GroupCount) { + t.Helper() if len(results) != len(expected) { t.Fatalf("number of groupings mismatch:\n got:%+v\nwant:%+v\n", results, expected) } diff --git a/translate.go b/translate.go index 3a2a6891f..a883802ad 100644 --- a/translate.go +++ b/translate.go @@ -28,6 +28,7 @@ var ( ErrTranslateStoreReaderClosed = errors.New("translate store reader closed") ErrReplicationNotSupported = errors.New("replication not supported") ErrTranslateStoreReadOnly = errors.New("translate store could not find or create key, translate store read only") + ErrTranslateStoreNotFound = errors.New("translate store not found") ErrCannotOpenV1TranslateFile = errors.New("cannot open v1 translate .keys file") ) @@ -38,11 +39,18 @@ type TranslateStore interface { // Returns the maximum ID set on the store. MaxID() (uint64, error) + // Retrieves the partition ID associated with the store. + // Only applies to index stores. + PartitionID() int + // Sets & retrieves whether the store is read-only. ReadOnly() bool SetReadOnly(v bool) // Converts a string key to its autoincrementing integer ID value. + // + // Translated id must be associated with a shard in the store's partition + // unless partition is set to -1. TranslateKey(key string) (uint64, error) TranslateKeys(key []string) ([]uint64, error) @@ -58,7 +66,18 @@ type TranslateStore interface { } // OpenTranslateStoreFunc represents a function for instantiating and opening a TranslateStore. -type OpenTranslateStoreFunc func(path, index, field string) (TranslateStore, error) +type OpenTranslateStoreFunc func(path, index, field string, partitionID, partitionN int) (TranslateStore, error) + +// GenerateNextPartitionedID returns the next ID within the same partition. +func GenerateNextPartitionedID(index string, prev uint64, partitionID, partitionN int) uint64 { + // Try to use the next ID if it is in the same partition. + // Otherwise find ID in next shard that has a matching partition. + for id := prev + 1; ; id += ShardWidth { + if shardPartition(index, id/ShardWidth, partitionN) == partitionID { + return id + } + } +} // TranslateEntryReader represents a stream of translation entries. type TranslateEntryReader interface { @@ -154,22 +173,22 @@ type readEntryResponse struct { } // TranslateOffsetMap maintains a set of offsets for both indexes & fields. -type TranslateOffsetMap map[string]map[string]uint64 +type TranslateOffsetMap map[string]*IndexTranslateOffsetMap // IndexOffset returns the offset for the given index. -func (m TranslateOffsetMap) IndexOffset(name string) uint64 { +func (m TranslateOffsetMap) IndexPartitionOffset(name string, partitionID int) uint64 { if m[name] == nil { return 0 } - return m[name][""] + return m[name].Partitions[partitionID] } // SetIndexOffset sets the offset for the given index. -func (m TranslateOffsetMap) SetIndexOffset(name string, offset uint64) { +func (m TranslateOffsetMap) SetIndexPartitionOffset(name string, partitionID int, offset uint64) { if m[name] == nil { - m[name] = make(map[string]uint64) + m[name] = NewIndexTranslateOffsetMap() } - m[name][""] = offset + m[name].Partitions[partitionID] = offset } // FieldOffset returns the offset for the given field. @@ -177,15 +196,27 @@ func (m TranslateOffsetMap) FieldOffset(index, name string) uint64 { if m[index] == nil { return 0 } - return m[index][name] + return m[index].Fields[name] } // SetFieldOffset sets the offset for the given field. func (m TranslateOffsetMap) SetFieldOffset(index, name string, offset uint64) { if m[index] == nil { - m[index] = make(map[string]uint64) + m[index] = NewIndexTranslateOffsetMap() + } + m[index].Fields[name] = offset +} + +type IndexTranslateOffsetMap struct { + Partitions map[int]uint64 `json:"partitions"` + Fields map[string]uint64 `json:"fields"` +} + +func NewIndexTranslateOffsetMap() *IndexTranslateOffsetMap { + return &IndexTranslateOffsetMap{ + Partitions: make(map[int]uint64), + Fields: make(map[string]uint64), } - m[index][name] = offset } // Ensure type implements interface. @@ -193,22 +224,28 @@ var _ TranslateStore = &InMemTranslateStore{} // InMemTranslateStore is an in-memory storage engine for mapping keys to int values. type InMemTranslateStore struct { - mu sync.RWMutex - index string - field string - readOnly bool - keys []string - lookup map[string]uint64 + mu sync.RWMutex + index string + field string + partitionID int + partitionN int + readOnly bool + keysByID map[uint64]string + idsByKey map[string]uint64 + maxID uint64 writeNotify chan struct{} } // NewInMemTranslateStore returns a new instance of InMemTranslateStore. -func NewInMemTranslateStore(index, field string) *InMemTranslateStore { +func NewInMemTranslateStore(index, field string, partitionID, partitionN int) *InMemTranslateStore { return &InMemTranslateStore{ index: index, field: field, - lookup: make(map[string]uint64), + partitionID: partitionID, + partitionN: partitionN, + keysByID: make(map[uint64]string), + idsByKey: make(map[string]uint64), writeNotify: make(chan struct{}), } } @@ -217,14 +254,19 @@ var _ OpenTranslateStoreFunc = OpenInMemTranslateStore // OpenInMemTranslateStore returns a new instance of InMemTranslateStore. // Implements OpenTranslateStoreFunc. -func OpenInMemTranslateStore(rawurl, index, field string) (TranslateStore, error) { - return NewInMemTranslateStore(index, field), nil +func OpenInMemTranslateStore(rawurl, index, field string, partitionID, partitionN int) (TranslateStore, error) { + return NewInMemTranslateStore(index, field, partitionID, partitionN), nil } func (s *InMemTranslateStore) Close() error { return nil } +// PartitionID returns the partition id the store was initialized with. +func (s *InMemTranslateStore) PartitionID() int { + return s.partitionID +} + // ReadOnly returns true if the store is in read-only mode. func (s *InMemTranslateStore) ReadOnly() bool { s.mu.Lock() @@ -244,40 +286,41 @@ func (s *InMemTranslateStore) SetReadOnly(v bool) { func (s *InMemTranslateStore) TranslateKey(key string) (uint64, error) { s.mu.Lock() defer s.mu.Unlock() - - if s.readOnly { - return 0, nil - } - return s.translateKey(key), nil + return s.translateKey(key) } // TranslateKeys converts a string key to an integer ID. // If key does not have an associated id then one is created. -func (s *InMemTranslateStore) TranslateKeys(keys []string) ([]uint64, error) { +func (s *InMemTranslateStore) TranslateKeys(keys []string) (_ []uint64, err error) { s.mu.Lock() defer s.mu.Unlock() - if s.readOnly { - return nil, nil - } - ids := make([]uint64, len(keys)) for i := range keys { - ids[i] = s.translateKey(keys[i]) + if ids[i], err = s.translateKey(keys[i]); err != nil { + return ids, err + } } return ids, nil } -func (s *InMemTranslateStore) translateKey(key string) uint64 { +func (s *InMemTranslateStore) translateKey(key string) (_ uint64, err error) { // Return id if it has been added. - if id, ok := s.lookup[key]; ok { - return id + if id, ok := s.idsByKey[key]; ok { + return id, nil + } else if s.readOnly { + return 0, nil } // Generate a new id and update db. - id := uint64(len(s.keys) + 1) + var id uint64 + if s.field == "" { + id = GenerateNextPartitionedID(s.index, s.maxID, s.partitionID, s.partitionN) + } else { + id = s.maxID + 1 + } s.set(id, key) - return id + return id, nil } // TranslateID converts an integer ID to a string key. @@ -301,10 +344,7 @@ func (s *InMemTranslateStore) TranslateIDs(ids []uint64) ([]string, error) { } func (s *InMemTranslateStore) translateID(id uint64) string { - if id == 0 || id > uint64(len(s.keys)) { - return "" - } - return s.keys[id-1] + return s.keysByID[id] } // ForceSet writes the id/key pair to the db. Used by replication. @@ -317,8 +357,11 @@ func (s *InMemTranslateStore) ForceSet(id uint64, key string) error { // set assigns the id/key pair to the store. func (s *InMemTranslateStore) set(id uint64, key string) { - s.keys = append(s.keys, key) - s.lookup[key] = id + s.keysByID[id] = key + s.idsByKey[key] = id + if id > s.maxID { + s.maxID = id + } s.notifyWrite() } @@ -347,7 +390,7 @@ func (s *InMemTranslateStore) EntryReader(ctx context.Context, offset uint64) (T func (s *InMemTranslateStore) MaxID() (uint64, error) { s.mu.RLock() defer s.mu.RUnlock() - return uint64(len(s.keys)), nil + return s.maxID, nil } // inMemEntryReader represents a stream of translation entries for an inmem translation store. diff --git a/translator_test.go b/translator_test.go index 664a18fba..34eaca0b1 100644 --- a/translator_test.go +++ b/translator_test.go @@ -26,7 +26,7 @@ import ( ) func TestInMemTranslateStore_TranslateKey(t *testing.T) { - s := pilosa.NewInMemTranslateStore("IDX", "FLD") + s := pilosa.NewInMemTranslateStore("IDX", "FLD", 0, pilosa.DefaultPartitionN) // Ensure initial key translates to ID 1. if id, err := s.TranslateKey("foo"); err != nil { @@ -51,7 +51,7 @@ func TestInMemTranslateStore_TranslateKey(t *testing.T) { } func TestInMemTranslateStore_TranslateID(t *testing.T) { - s := pilosa.NewInMemTranslateStore("IDX", "FLD") + s := pilosa.NewInMemTranslateStore("IDX", "FLD", 0, pilosa.DefaultPartitionN) // Setup initial keys. if _, err := s.TranslateKey("foo"); err != nil { diff --git a/utils_internal_test.go b/utils_internal_test.go index fe8e0d278..8abfdeb91 100644 --- a/utils_internal_test.go +++ b/utils_internal_test.go @@ -218,7 +218,7 @@ func (t *ClusterCluster) addCluster(i int, saveTopology bool) (*cluster, error) } // holder - h := NewHolder() + h := NewHolder(DefaultPartitionN) h.Path = path // cluster