diff --git a/.github/actions/test-setup/action.yml b/.github/actions/test-setup/action.yml index 06aac5ecf2..8be1f2b53d 100644 --- a/.github/actions/test-setup/action.yml +++ b/.github/actions/test-setup/action.yml @@ -11,6 +11,9 @@ inputs: raft-enabled: description: "Specifies if cluster should use consistent_cluster_management option" required: false + tablets: + description: "Specifies if cluster should use tablets replication" + required: false start-dev-env: description: "Should this action run 'make start-dev-env'" required: false @@ -39,5 +42,5 @@ runs: - name: Start dev env if: inputs.start-dev-env == 'true' - run: make start-dev-env SCYLLA_VERSION=${{ inputs.scylla-version }} IP_FAMILY=${{ inputs.ip-family }} RAFT_ENABLED=${{ inputs.raft-enabled }} + run: make start-dev-env SCYLLA_VERSION=${{ inputs.scylla-version }} IP_FAMILY=${{ inputs.ip-family }} RAFT_ENABLED=${{ inputs.raft-enabled }} TABLETS=${{ inputs.tablets }} shell: bash \ No newline at end of file diff --git a/.github/workflows/integration-tests-nightly-latest-ipv4-tablets.yaml b/.github/workflows/integration-tests-nightly-latest-ipv4-tablets.yaml new file mode 100644 index 0000000000..43faf718f4 --- /dev/null +++ b/.github/workflows/integration-tests-nightly-latest-ipv4-tablets.yaml @@ -0,0 +1,141 @@ +name: Integration tests (Scylla Nightly latest, IPV4, tablets) + +on: + push: + branches: + - master + pull_request: + types: [ opened, synchronize, reopened ] + +concurrency: + group: int-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + scylla-version: 'scylla-nightly:latest' + ip-family: IPV4 + raft-enabled: true + tablets: true + +jobs: + # Right now both restore-tables and restore-schema tests take way longer than any other pkg tests. + # For this reason they are divided into two distinct jobs, so that the whole workflow can be executed faster. + restore-tables: + name: Test restore tables + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Setup testing dependencies + uses: ./.github/actions/test-setup + with: + scylla-version: ${{ env.scylla-version }} + ip-family: ${{ env.ip-family }} + raft-enabled: ${{ env.raft-enabled }} + tablets: ${{ env.tablets }} + + - name: Run tests + run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/restore RUN='"TestRestoreTables.*Integration"' + + restore-schema: + name: Test restore schema + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Setup testing dependencies + uses: ./.github/actions/test-setup + with: + scylla-version: ${{ env.scylla-version }} + ip-family: ${{ env.ip-family }} + raft-enabled: ${{ env.raft-enabled }} + tablets: ${{ env.tablets }} + + # Go does not support negative lookahead in regex expressions, so it has to be done manually. + # This regex ensures that all restore tests that didn't match restore-tables job will be run here. + - name: Run tests + run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/restore RUN='"TestRestore([^T]|.{1}[^a]|.{2}[^b]|.{3}[^l]|.{4}[^e]|.{5}[^s]).*Integration"' + + backup: + name: Test backup + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Setup testing dependencies + uses: ./.github/actions/test-setup + with: + scylla-version: ${{ env.scylla-version }} + ip-family: ${{ env.ip-family }} + raft-enabled: ${{ env.raft-enabled }} + tablets: ${{ env.tablets }} + + - name: Run tests + run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/backup + + repair: + name: Test repair + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Setup testing dependencies + uses: ./.github/actions/test-setup + with: + scylla-version: ${{ env.scylla-version }} + ip-family: ${{ env.ip-family }} + raft-enabled: ${{ env.raft-enabled }} + tablets: ${{ env.tablets }} + + - name: Run tests + run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/repair + + small-pkg: + name: Test other, smaller packages + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Set IP_FAMILY var for all tests + run: | + echo "IP_FAMILY=${{ env.ip-family }}" >> $GITHUB_ENV + + - name: Setup testing dependencies + uses: ./.github/actions/test-setup + with: + scylla-version: ${{ env.scylla-version }} + ip-family: ${{ env.ip-family }} + raft-enabled: ${{ env.raft-enabled }} + tablets: ${{ env.tablets }} + + - name: Run cqlping tests + run: make pkg-integration-test PKG=./pkg/ping/cqlping + + - name: Run dynamoping tests + run: make pkg-integration-test PKG=./pkg/ping/dynamoping + + - name: Run scyllaclient tests + run: make pkg-integration-test PKG=./pkg/scyllaclient + + - name: Run cluster tests + run: make pkg-integration-test PKG=./pkg/service/cluster + + - name: Run healthcheck tests + run: make pkg-integration-test PKG=./pkg/service/healthcheck + + - name: Run scheduler tests + run: make pkg-integration-test PKG=./pkg/service/scheduler + + - name: Run store tests + run: make pkg-integration-test PKG=./pkg/store + + - name: Run migrate tests + run: make pkg-integration-test PKG=./pkg/schema/migrate + + - name: Run netwait tests + run: make pkg-integration-test PKG=./pkg/util/netwait diff --git a/Makefile b/Makefile index 2a7e5966b3..d3eef45836 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ GOFILES = go list -f '{{range .GoFiles}}{{ $$.Dir }}/{{ . }} {{end}}{{range .Tes SCYLLA_VERSION?=scylla:5.4.1 IP_FAMILY?=IPV4 RAFT_ENABLED?=true +TABLETS?=false SKIP_GOSSIP?=false MANAGER_CONFIG := testing/scylla-manager/scylla-manager.yaml diff --git a/pkg/scyllaclient/client_scylla.go b/pkg/scyllaclient/client_scylla.go index a172e57067..43e2e7bb2f 100644 --- a/pkg/scyllaclient/client_scylla.go +++ b/pkg/scyllaclient/client_scylla.go @@ -20,14 +20,13 @@ import ( "github.com/pkg/errors" "github.com/scylladb/go-set/strset" "github.com/scylladb/scylla-manager/v3/pkg/dht" - "github.com/scylladb/scylla-manager/v3/pkg/util/slice" - "go.uber.org/multierr" - "github.com/scylladb/scylla-manager/v3/pkg/util/parallel" "github.com/scylladb/scylla-manager/v3/pkg/util/pointer" "github.com/scylladb/scylla-manager/v3/pkg/util/prom" + "github.com/scylladb/scylla-manager/v3/pkg/util/slice" "github.com/scylladb/scylla-manager/v3/swagger/gen/scylla/v1/client/operations" "github.com/scylladb/scylla-manager/v3/swagger/gen/scylla/v1/models" + "go.uber.org/multierr" ) // ErrHostInvalidResponse is to indicate that one of the root-causes is the invalid response from scylla-server. @@ -246,15 +245,33 @@ func (c *Client) hosts(ctx context.Context) ([]string, error) { return v, nil } -// Keyspaces return a list of all the keyspaces. -func (c *Client) Keyspaces(ctx context.Context) ([]string, error) { - resp, err := c.scyllaOps.StorageServiceKeyspacesGet(&operations.StorageServiceKeyspacesGetParams{Context: ctx}) +// KeyspaceReplication describes keyspace replication type. +type KeyspaceReplication = string + +// KeyspaceReplication enum. +const ( + ReplicationAll = "all" + ReplicationVnode = "vnodes" + ReplicationTablet = "tablets" +) + +// ReplicationKeyspaces return a list of keyspaces with given replication. +func (c *Client) ReplicationKeyspaces(ctx context.Context, replication KeyspaceReplication) ([]string, error) { + resp, err := c.scyllaOps.StorageServiceKeyspacesGet(&operations.StorageServiceKeyspacesGetParams{ + Context: ctx, + Replication: &replication, + }) if err != nil { return nil, err } return resp.Payload, nil } +// Keyspaces return a list of all the keyspaces. +func (c *Client) Keyspaces(ctx context.Context) ([]string, error) { + return c.ReplicationKeyspaces(ctx, ReplicationAll) +} + // Tables returns a slice of table names in a given keyspace. func (c *Client) Tables(ctx context.Context, keyspace string) ([]string, error) { resp, err := c.scyllaOps.ColumnFamilyNameGet(&operations.ColumnFamilyNameGetParams{Context: ctx}) @@ -374,12 +391,25 @@ func (c *Client) metrics(ctx context.Context, host, name string) (map[string]*pr return prom.ParseText(resp.Body) } -// DescribeRing returns a description of token range of a given keyspace. -func (c *Client) DescribeRing(ctx context.Context, keyspace string) (Ring, error) { - resp, err := c.scyllaOps.StorageServiceDescribeRingByKeyspaceGet(&operations.StorageServiceDescribeRingByKeyspaceGetParams{ +// DescribeTabletRing returns a description of token range of a given tablet table. +func (c *Client) DescribeTabletRing(ctx context.Context, keyspace, table string) (Ring, error) { + return c.describeRing(&operations.StorageServiceDescribeRingByKeyspaceGetParams{ Context: ctx, Keyspace: keyspace, + Table: &table, }) +} + +// DescribeVnodeRing returns a description of token range of a given vnode keyspace. +func (c *Client) DescribeVnodeRing(ctx context.Context, keyspace string) (Ring, error) { + return c.describeRing(&operations.StorageServiceDescribeRingByKeyspaceGetParams{ + Context: ctx, + Keyspace: keyspace, + }) +} + +func (c *Client) describeRing(params *operations.StorageServiceDescribeRingByKeyspaceGetParams) (Ring, error) { + resp, err := c.scyllaOps.StorageServiceDescribeRingByKeyspaceGet(params) if err != nil { return Ring{}, err } diff --git a/pkg/scyllaclient/client_scylla_test.go b/pkg/scyllaclient/client_scylla_test.go index e221d122a5..7ec79f016d 100644 --- a/pkg/scyllaclient/client_scylla_test.go +++ b/pkg/scyllaclient/client_scylla_test.go @@ -180,7 +180,7 @@ func TestClientDescribeRing(t *testing.T) { client, closeServer := scyllaclienttest.NewFakeScyllaServer(t, "testdata/scylla_api/describe_ring_scylla_manager.json") defer closeServer() - ring, err := client.DescribeRing(context.Background(), "scylla_manager") + ring, err := client.DescribeVnodeRing(context.Background(), "scylla_manager") if err != nil { t.Fatal(err) } @@ -253,7 +253,7 @@ func TestClientDescribeRingReplicationStrategy(t *testing.T) { client, closeServer := scyllaclienttest.NewFakeScyllaServer(t, test.File) defer closeServer() - ring, err := client.DescribeRing(context.Background(), "scylla_manager") + ring, err := client.DescribeVnodeRing(context.Background(), "scylla_manager") if err != nil { t.Fatal(err) } diff --git a/pkg/scyllaclient/ring_describer.go b/pkg/scyllaclient/ring_describer.go new file mode 100644 index 0000000000..79ef0c2e08 --- /dev/null +++ b/pkg/scyllaclient/ring_describer.go @@ -0,0 +1,94 @@ +// Copyright (C) 2024 ScyllaDB + +package scyllaclient + +import ( + "context" + + "github.com/pkg/errors" + "github.com/scylladb/go-set/strset" +) + +// RingDescriber describes token rings on table basis for bot vnode and tablet tables. +type RingDescriber interface { + DescribeRing(ctx context.Context, keyspace, table string) (Ring, error) +} + +type ringDescriber struct { + client *Client + tabletKs *strset.Set + cache ringCache +} + +type ringCache struct { + Keyspace string + Table string + Ring Ring +} + +func NewRingDescriber(ctx context.Context, client *Client) RingDescriber { + return &ringDescriber{ + client: client, + tabletKs: getTabletKs(ctx, client), + } +} + +func (rd *ringDescriber) DescribeRing(ctx context.Context, keyspace, table string) (Ring, error) { + if ring, ok := rd.tryGetRing(keyspace, table); ok { + return ring, nil + } + + var ( + ring Ring + err error + ) + if rd.tabletKs.Has(keyspace) { + ring, err = rd.client.DescribeTabletRing(ctx, keyspace, table) + } else { + ring, err = rd.client.DescribeVnodeRing(ctx, keyspace) + } + if err != nil { + return Ring{}, errors.Wrap(err, "describe ring") + } + + rd.setRing(keyspace, table, ring) + return ring, nil +} + +func (rd *ringDescriber) tryGetRing(keyspace, table string) (Ring, bool) { + if rd.cache.Keyspace == keyspace { + if rd.cache.Table == table || !rd.tabletKs.Has(keyspace) { + return rd.cache.Ring, true + } + } + return Ring{}, false +} + +func (rd *ringDescriber) setRing(keyspace, table string, ring Ring) { + rd.cache.Keyspace = keyspace + rd.cache.Table = table + rd.cache.Ring = ring +} + +// getTabletKs returns set of tablet replicated keyspaces. +func getTabletKs(ctx context.Context, client *Client) *strset.Set { + out := strset.New() + // Assume that errors indicate that endpoints rejected 'replication' param, + // which means that given Scylla version does not support tablet API. + // Other errors will be handled on other API calls. + tablets, err := client.ReplicationKeyspaces(ctx, ReplicationTablet) + if err != nil { + return out + } + vnodes, err := client.ReplicationKeyspaces(ctx, ReplicationVnode) + if err != nil { + return out + } + // Even when both API calls succeeded, we need to validate + // that the 'replication' param wasn't silently ignored. + out.Add(tablets...) + if out.HasAny(vnodes...) { + return strset.New() + } + return out +} diff --git a/pkg/service/backup/export_test.go b/pkg/service/backup/export_test.go index c754ac2ed4..610314c864 100644 --- a/pkg/service/backup/export_test.go +++ b/pkg/service/backup/export_test.go @@ -35,13 +35,16 @@ func (s *Service) InitTarget(ctx context.Context, clusterID uuid.UUID, target *T } // Collect ring information + ringDescriber := scyllaclient.NewRingDescriber(ctx, client) rings := make(map[string]scyllaclient.Ring, len(target.Units)) for _, u := range target.Units { - ring, err := client.DescribeRing(ctx, u.Keyspace) - if err != nil { - return errors.Wrap(err, "initialize: describe keyspace ring") + for _, tab := range u.Tables { + ring, err := ringDescriber.DescribeRing(ctx, u.Keyspace, tab) + if err != nil { + return errors.Wrap(err, "initialize: describe keyspace ring") + } + rings[u.Keyspace+"."+tab] = ring } - rings[u.Keyspace] = ring } // Get live nodes diff --git a/pkg/service/backup/service.go b/pkg/service/backup/service.go index 481986e56c..8bacb8bb4a 100644 --- a/pkg/service/backup/service.go +++ b/pkg/service/backup/service.go @@ -220,36 +220,44 @@ func (s *Service) GetTarget(ctx context.Context, clusterID uuid.UUID, properties AllTables: true, } + ringDescriber := scyllaclient.NewRingDescriber(ctx, client) for _, keyspace := range keyspaces { tables, err := client.Tables(ctx, keyspace) if err != nil { return t, errors.Wrapf(err, "keyspace %s: get tables", keyspace) } - // Get the ring description and skip local data - ring, err := client.DescribeRing(ctx, keyspace) - if err != nil { - return t, errors.Wrapf(err, "keyspace %s: get ring description", keyspace) - } - if ring.Replication == scyllaclient.LocalStrategy { - if strings.HasPrefix(keyspace, "system") && keyspace != "system_schema" { - continue + var filteredTables []string + for _, tab := range tables { + // Get the ring description and skip local data + ring, err := ringDescriber.DescribeRing(ctx, keyspace, tab) + if err != nil { + return t, errors.Wrapf(err, "%s.%s: get ring description", keyspace, tab) } - } else { - // Check if keyspace has replica in any DC - if !targetDCs.HasAny(ring.Datacenters()...) { - continue + if ring.Replication == scyllaclient.LocalStrategy { + if strings.HasPrefix(keyspace, "system") && keyspace != "system_schema" { + continue + } + } else { + // Check if keyspace has replica in any DC + if !targetDCs.HasAny(ring.Datacenters()...) { + continue + } } - } - // Collect ring information - rings[keyspace] = ring + // Collect ring information + rings[keyspace+"."+tab] = ring - // Do not filter system_schema - if keyspace == systemSchema { - systemSchemaUnit.Tables = tables - } else { - f.Add(keyspace, tables) + // Do not filter system_schema + if keyspace == systemSchema { + systemSchemaUnit.Tables = append(systemSchemaUnit.Tables, tab) + } else { + filteredTables = append(filteredTables, tab) + } + } + + if len(filteredTables) > 0 { + f.Add(keyspace, filteredTables) } } @@ -305,12 +313,14 @@ func (s *Service) getLiveNodes(ctx context.Context, client *scyllaclient.Client, // Validate that there are enough live nodes to back up all tokens if len(liveNodes) < len(nodes) { hosts := strset.New(liveNodes.Hosts()...) - for i := range target.Units { - r := rings[target.Units[i].Keyspace] - if r.Replication != scyllaclient.LocalStrategy { - for _, rt := range r.ReplicaTokens { - if !hosts.HasAny(rt.ReplicaSet...) { - return nil, errors.Errorf("not enough live nodes to backup keyspace %s", target.Units[i].Keyspace) + for _, ks := range target.Units { + for _, tab := range ks.Tables { + r := rings[ks.Keyspace+"."+tab] + if r.Replication != scyllaclient.LocalStrategy { + for _, rt := range r.ReplicaTokens { + if !hosts.HasAny(rt.ReplicaSet...) { + return nil, errors.Errorf("not enough live nodes to backup keyspace %s", ks.Keyspace) + } } } } diff --git a/pkg/service/repair/plan.go b/pkg/service/repair/plan.go index cd15c8d933..5a4f0059e3 100644 --- a/pkg/service/repair/plan.go +++ b/pkg/service/repair/plan.go @@ -33,7 +33,7 @@ func newPlan(ctx context.Context, target Target, client *scyllaclient.Client) (* p := new(plan) for _, u := range target.Units { - ring, err := client.DescribeRing(ctx, u.Keyspace) + ring, err := client.DescribeVnodeRing(ctx, u.Keyspace) if err != nil { return nil, errors.Wrapf(err, "keyspace %s: get ring description", u.Keyspace) } diff --git a/swagger/gen/scylla/v1/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go b/swagger/gen/scylla/v1/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go index 3daff0b7cd..bc75e1b35c 100644 --- a/swagger/gen/scylla/v1/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go +++ b/swagger/gen/scylla/v1/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go @@ -66,6 +66,11 @@ type StorageServiceDescribeRingByKeyspaceGetParams struct { */ Keyspace string + /*Table + The name of table to fetch information about + + */ + Table *string timeout time.Duration Context context.Context @@ -116,6 +121,17 @@ func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetKeyspace(keyspace str o.Keyspace = keyspace } +// WithTable adds the table to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WithTable(table *string) *StorageServiceDescribeRingByKeyspaceGetParams { + o.SetTable(table) + return o +} + +// SetTable adds the table to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetTable(table *string) { + o.Table = table +} + // WriteToRequest writes these params to a swagger request func (o *StorageServiceDescribeRingByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -129,6 +145,22 @@ func (o *StorageServiceDescribeRingByKeyspaceGetParams) WriteToRequest(r runtime return err } + if o.Table != nil { + + // query param table + var qrTable string + if o.Table != nil { + qrTable = *o.Table + } + qTable := qrTable + if qTable != "" { + if err := r.SetQueryParam("table", qTable); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/swagger/gen/scylla/v1/client/operations/storage_service_keyspaces_get_parameters.go b/swagger/gen/scylla/v1/client/operations/storage_service_keyspaces_get_parameters.go index c5b949204b..19a1b7e915 100644 --- a/swagger/gen/scylla/v1/client/operations/storage_service_keyspaces_get_parameters.go +++ b/swagger/gen/scylla/v1/client/operations/storage_service_keyspaces_get_parameters.go @@ -61,6 +61,11 @@ for the storage service keyspaces get operation typically these are written to a */ type StorageServiceKeyspacesGetParams struct { + /*Replication + Filter keyspaces for the replication used: vnodes or tablets (default: all) + + */ + Replication *string /*Type Which keyspaces to return @@ -105,6 +110,17 @@ func (o *StorageServiceKeyspacesGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithReplication adds the replication to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) WithReplication(replication *string) *StorageServiceKeyspacesGetParams { + o.SetReplication(replication) + return o +} + +// SetReplication adds the replication to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) SetReplication(replication *string) { + o.Replication = replication +} + // WithType adds the typeVar to the storage service keyspaces get params func (o *StorageServiceKeyspacesGetParams) WithType(typeVar *string) *StorageServiceKeyspacesGetParams { o.SetType(typeVar) @@ -124,6 +140,22 @@ func (o *StorageServiceKeyspacesGetParams) WriteToRequest(r runtime.ClientReques } var res []error + if o.Replication != nil { + + // query param replication + var qrReplication string + if o.Replication != nil { + qrReplication = *o.Replication + } + qReplication := qrReplication + if qReplication != "" { + if err := r.SetQueryParam("replication", qReplication); err != nil { + return err + } + } + + } + if o.Type != nil { // query param type diff --git a/swagger/scylla_v1.json b/swagger/scylla_v1.json index 31b463b9c2..ccec3709ba 100644 --- a/swagger/scylla_v1.json +++ b/swagger/scylla_v1.json @@ -9616,6 +9616,13 @@ "required": true, "type": "string", "description": "The keyspace to fetch information about" + }, + { + "name": "table", + "in": "query", + "required": false, + "type": "string", + "description": "The name of table to fetch information about" } ], "responses": { @@ -10929,6 +10936,18 @@ ], "type": "string", "description": "Which keyspaces to return" + }, + { + "name": "replication", + "in": "query", + "required": false, + "enum": [ + "all", + "vnodes", + "tablets" + ], + "type": "string", + "description": "Filter keyspaces for the replication used: vnodes or tablets (default: all)" } ], "responses": { diff --git a/testing/Makefile b/testing/Makefile index 687c81d9c0..56d9e92150 100644 --- a/testing/Makefile +++ b/testing/Makefile @@ -13,6 +13,7 @@ CURRENT_GID := $(shell id -g) SCYLLA_VERSION?=scylla:5.4.1 IP_FAMILY?=IPV4 RAFT_ENABLED?=true +TABLETS?=false SKIP_GOSSIP?=false MINIO_ENDPOINT := https://192.168.200.99:9000 @@ -54,7 +55,7 @@ build: ## Build custom docker image .PHONY: up up: ## Start docker containers up: - @echo "==> Starting testing env with SCYLLA_VERSION=$(SCYLLA_VERSION) and IP_FAMILY=$(IP_FAMILY) and RAFT_ENABLED=$(RAFT_ENABLED)" + @echo "==> Starting testing env with SCYLLA_VERSION=$(SCYLLA_VERSION) and IP_FAMILY=$(IP_FAMILY) and RAFT_ENABLED=$(RAFT_ENABLED) and TABLETS=$(TABLETS)" # Scylla bootstap proceedure have requirements that leads us to follow certain recipe: # 1. Spin up first node on the cluster # 2. Spin up and join other seed node, which is first node from DC2 @@ -74,6 +75,10 @@ endif ifeq ($(RAFT_ENABLED),false) @$(YQ) write -i scylla/scylla.yaml 'consistent_cluster_management' false endif +ifeq ($(TABLETS),true) + @$(YQ) write -i scylla/scylla.yaml 'experimental_features[+]' consistent-topology-changes + @$(YQ) write -i scylla/scylla.yaml 'experimental_features[+]' tablets +endif ifeq ($(SKIP_GOSSIP),true) @$(YQ) write -i scylla/scylla.yaml 'skip_wait_for_gossip_to_settle' 0 @$(YQ) write -i scylla/scylla-second-cluster.yaml 'skip_wait_for_gossip_to_settle' 0 diff --git a/testing/scylla/config/scylla-second-cluster.yaml b/testing/scylla/config/scylla-second-cluster.yaml index 14a1ccc322..e85bde288b 100644 --- a/testing/scylla/config/scylla-second-cluster.yaml +++ b/testing/scylla/config/scylla-second-cluster.yaml @@ -379,7 +379,7 @@ commitlog_total_space_in_mb: -1 # or dropping of column families. The STRONGLY advised default of true # should be used to provide data safety. If you set this flag to false, you will # lose data on truncation or drop. -# auto_snapshot: true +auto_snapshot: false # When executing a scan, within or across a partition, we need to keep the # tombstones seen in memory so we can return them to the coordinator, which diff --git a/testing/scylla/config/scylla.yaml b/testing/scylla/config/scylla.yaml index 8825539732..61a2a69b04 100644 --- a/testing/scylla/config/scylla.yaml +++ b/testing/scylla/config/scylla.yaml @@ -379,7 +379,7 @@ commitlog_total_space_in_mb: -1 # or dropping of column families. The STRONGLY advised default of true # should be used to provide data safety. If you set this flag to false, you will # lose data on truncation or drop. -# auto_snapshot: true +auto_snapshot: false # When executing a scan, within or across a partition, we need to keep the # tombstones seen in memory so we can return them to the coordinator, which