Skip to content

Commit

Permalink
vtctl: Add interface for atomic VSchema operations
Browse files Browse the repository at this point in the history
  • Loading branch information
anshikavashistha committed Feb 3, 2025
1 parent 43f7823 commit bd17b6c
Show file tree
Hide file tree
Showing 6 changed files with 338 additions and 0 deletions.
40 changes: 40 additions & 0 deletions go/vt/topo/vschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,43 @@ func (ts *Server) SaveMirrorRules(ctx context.Context, mirrorRules *vschemapb.Mi
_, err = ts.globalCell.Update(ctx, MirrorRulesFile, data, nil)
return err
}

type VSchemaInfo struct {
keyspace string
version Version
*vschemapb.Keyspace
}

func (ts *Server) GetVSchema(ctx context.Context, keyspace string) (*VSchemaInfo, error) {
ksvs, err := ts.GetVSchema(ctx, keyspace)
if err != nil {
return nil, err
}
return &VSchemaInfo{
keyspace: ksvs.Name,
version: ksvs.version,
Keyspace: ksvs.Keyspace,
}, nil
}

func (ts *Server) SaveVSchema(ctx context.Context, keyspace string, vschema *VSchemaInfo) error {
if err := ctx.Err(); err != nil {
return err
}

nodePath := path.Join(KeyspacesPath, keyspace, VSchemaFile)
data, err := vschema.MarshalVT()
if err != nil {
return err
}

version, err := ts.globalCell.Update(ctx, nodePath, data, vschema.version)
if err != nil {
log.Errorf("failed to update vschema for keyspace %s: %v", keyspace, err)
return err
}
vschema.version = version
log.Infof("successfully updated vschema for keyspace %s: %+v", keyspace, vschema.Keyspace)

return nil
}
14 changes: 14 additions & 0 deletions go/vt/vtctl/vtctlclient/client_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package vtctlclient

import (
"testing"
)

func TestVSchemaAtomicOperations(t *testing.T) {
// Test cases for:
// - Concurrent modifications
// - Version conflicts
// - Successful atomic updates
// - Invalid inputs
// - Error conditions
}
34 changes: 34 additions & 0 deletions go/vt/vtctl/vtctlclient/grpc_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package vtctlclient

import (
"context"

"github.com/your-project/vschemapb"

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Local example using etcd on Ubuntu

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Local example using zk2 on Ubuntu

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Local example using consul on Ubuntu

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / End-to-End Test (Race)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Region Sharding example using etcd on Ubuntu

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / End-to-End Test

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / VTop Example

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_queries)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_unsharded)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_gen4)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_copy_parallel)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (topo_connection_cache)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_godriver)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_multi_tenant)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_across_db_versions)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_concurrentdml)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_transaction)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (schemadiff_vrepl)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_etcd)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_foreignkey_stress)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_general_heavy)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (12)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtbackup)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_reservedconn)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_foreign_key_stress)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (13)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_cellalias)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema_tracker)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_revert)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (ers_prs_newfeatures_heavy)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (21)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql80)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_scheduler)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_partial_keyspace)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_mariadb_to_mysql)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_partial_movetables_and_materialize)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Java Docker Test

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Java Docker Test

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_tablet_healthcheck_cache)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_plantests)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_readafterwrite)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_mysqlshell)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtorc)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vttablet_prscomplex)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_xtrabackup)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (15)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_throttler_topo)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_recovery)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vschema)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql_server_vault)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (18)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_consul)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_backup)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql57)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_v2)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql57)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_tablegc)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql84)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_consul)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Vitess Tester (vtgate)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql80)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql80)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql84)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vindex_heavy)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_basic)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - E2E

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Queries)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_suite)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_migrate)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Schema)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Code Coverage

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Queries - 2)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Semi Sync Upgrade Downgrade Test

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_vtctldclient_vdiff2_movetables_tz)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - Manual

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Online DDL flow

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old VTTablet

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old Vtctl

no required module provides package github.com/your-project/vschemapb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlclient/grpc_client.go

View workflow job for this annotation

GitHub Actions / Unit Test (Evalengine_Race)

no required module provides package github.com/your-project/vschemapb; to add it:
)

type gRPCVSchemaOperations struct {
client *gRPCClient
keyspace string
}

func (ops *gRPCVSchemaOperations) AddTable(ctx context.Context, keyspace, tableName string, tableSpec interface{}) error {
// 1. Get current VSchema with version
vschema, version, err := ops.client.GetVSchema(ctx, keyspace)
if err != nil {
return err
}

// 2. Validate table spec
spec, err := validateTableSpec(tableSpec)
if err != nil {
return err
}

// 3. Modify VSchema
// Add table to vschema.Tables map

// 4. Save with version check
return ops.client.SaveVSchema(ctx, keyspace, vschema, version)
}

// Implement other VSchemaOperations methods similarly
29 changes: 29 additions & 0 deletions go/vt/vtctl/vtctlclient/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,35 @@ type VtctlClient interface {
Close()
}


// VSchemaOperations defines the interface for atomic VSchema modifications
type VSchemaOperations interface {
// AddTable atomically adds a table to the VSchema
AddTable(ctx context.Context, keyspace, tableName string, tableSpec interface{}) error

// RemoveTable atomically removes a table from the VSchema
RemoveTable(ctx context.Context, keyspace, tableName string) error

// AddVindex atomically adds a vindex to the VSchema
AddVindex(ctx context.Context, keyspace, vindexName string, vindexSpec interface{}) error

// RemoveVindex atomically removes a vindex from the VSchema
RemoveVindex(ctx context.Context, keyspace, vindexName string) error
}

// VtctlClient defines the interface used to send remote vtctl commands
type VtctlClient interface {
// ExecuteVtctlCommand will execute the command remotely
ExecuteVtctlCommand(ctx context.Context, args []string, actionTimeout time.Duration) (logutil.EventStream, error)

// VSchema returns the VSchema operations interface
VSchema() VSchemaOperations

// Close will terminate the connection. This object won't be
// used after this.
Close()
}

// Factory functions are registered by client implementations
type Factory func(ctx context.Context, addr string) (VtctlClient, error)

Expand Down
205 changes: 205 additions & 0 deletions go/vt/vtctl/vtctlclient/vschema_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
package vtctlclient

import (
"context"
"fmt"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/topo/memorytopo"
vschemapb "vitess.io/vitess/go/vt/proto/vschema"
)

func TestVSchemaAtomicOperations(t *testing.T) {
ctx := context.Background()
ts := memorytopo.NewServer("")
client := newTestClient(ts)

tests := []struct {
name string
setup func(t *testing.T)
operation func(t *testing.T) error
concurrent func(t *testing.T)
wantErr bool
errContains string
}{
{
name: "successful_add_table",
setup: func(t *testing.T) {
// Initialize empty vschema
initEmptyVSchema(t, ts, "test_keyspace")
},
operation: func(t *testing.T) error {
return client.VSchema().AddTable(ctx, "test_keyspace", "test_table", &vschemapb.Table{})
},
wantErr: false,
},
{
name: "concurrent_modification",
setup: func(t *testing.T) {
initEmptyVSchema(t, ts, "test_keyspace")
},
operation: func(t *testing.T) error {
return client.VSchema().AddTable(ctx, "test_keyspace", "test_table", &vschemapb.Table{})
},
concurrent: func(t *testing.T) {
// Simulate concurrent modification
client2 := newTestClient(ts)
err := client2.VSchema().AddTable(ctx, "test_keyspace", "other_table", &vschemapb.Table{})
require.NoError(t, err)
},
wantErr: true,
errContains: "version mismatch",
},
{
name: "retry_success",
setup: func(t *testing.T) {
initEmptyVSchema(t, ts, "test_keyspace")
},
operation: func(t *testing.T) error {
return client.VSchema().AddTable(ctx, "test_keyspace", "test_table", &vschemapb.Table{})
},
concurrent: func(t *testing.T) {
// Simulate temporary interference
time.Sleep(10 * time.Millisecond)
client2 := newTestClient(ts)
err := client2.VSchema().AddTable(ctx, "test_keyspace", "other_table", &vschemapb.Table{})
require.NoError(t, err)
},
wantErr: false, // Should succeed after retry
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.setup(t)

if tt.concurrent != nil {
go tt.concurrent(t)
}

err := tt.operation(t)

if tt.wantErr {
require.Error(t, err)
assert.Contains(t, err.Error(), tt.errContains)
} else {
require.NoError(t, err)
// Verify final state
vschema, err := ts.GetVSchema(ctx, "test_keyspace")
require.NoError(t, err)
assert.NotNil(t, vschema)
}
})
}
}

func TestVSchemaVersionConflicts(t *testing.T) {
ctx := context.Background()
ts := memorytopo.NewServer("")
client := newTestClient(ts)

// Test multiple concurrent modifications
t.Run("multiple_concurrent_modifications", func(t *testing.T) {
initEmptyVSchema(t, ts, "test_keyspace")

// Launch multiple goroutines attempting modifications
const numGoroutines = 5
errChan := make(chan error, numGoroutines)

for i := 0; i < numGoroutines; i++ {
go func(idx int) {
err := client.VSchema().AddTable(ctx, "test_keyspace",
fmt.Sprintf("table_%d", idx), &vschemapb.Table{})
errChan <- err
}(i)
}

// Collect results
successCount := 0
for i := 0; i < numGoroutines; i++ {
err := <-errChan
if err == nil {
successCount++
}
}

// At least one should succeed, others should fail with version conflict
assert.True(t, successCount >= 1)
assert.True(t, successCount < numGoroutines)
})
}

func TestVSchemaErrorConditions(t *testing.T) {
ctx := context.Background()
ts := memorytopo.NewServer("")
client := newTestClient(ts)

tests := []struct {
name string
operation func() error
errContains string
}{
{
name: "invalid_keyspace",
operation: func() error {
return client.VSchema().AddTable(ctx, "", "table", &vschemapb.Table{})
},
errContains: "invalid keyspace",
},
{
name: "invalid_table_name",
operation: func() error {
return client.VSchema().AddTable(ctx, "keyspace", "", &vschemapb.Table{})
},
errContains: "invalid table name",
},
{
name: "nil_table_spec",
operation: func() error {
return client.VSchema().AddTable(ctx, "keyspace", "table", nil)
},
errContains: "nil table spec",
},
{
name: "keyspace_not_found",
operation: func() error {
return client.VSchema().AddTable(ctx, "nonexistent", "table", &vschemapb.Table{})
},
errContains: "keyspace not found",
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := tt.operation()
require.Error(t, err)
assert.Contains(t, err.Error(), tt.errContains)
})
}
}

// Helper functions

func initEmptyVSchema(t *testing.T, ts *memorytopo.Server, keyspace string) {
ctx := context.Background()
err := ts.CreateKeyspace(ctx, keyspace, &vschemapb.Keyspace{})
require.NoError(t, err)
}

func newTestClient(ts *memorytopo.Server) VtctlClient {
// Create a test client implementation
return &testVtctlClient{
ts: ts,
}
}

type testVtctlClient struct {
ts *memorytopo.Server
}

// Implement VtctlClient interface methods...
16 changes: 16 additions & 0 deletions go/vt/vtctl/vtctlserver/server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package vtctlserver

import (
"context"

"github.com/your-project/vtctlservicepb"

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Local example using etcd on Ubuntu

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Local example using zk2 on Ubuntu

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Local example using consul on Ubuntu

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / End-to-End Test (Race)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Region Sharding example using etcd on Ubuntu

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / End-to-End Test

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / VTop Example

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_queries)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_unsharded)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_gen4)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_copy_parallel)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (topo_connection_cache)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_godriver)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_multi_tenant)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_across_db_versions)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_concurrentdml)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_transaction)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (schemadiff_vrepl)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_etcd)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_foreignkey_stress)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_general_heavy)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (12)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtbackup)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_reservedconn)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_foreign_key_stress)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (13)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_cellalias)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema_tracker)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_revert)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (ers_prs_newfeatures_heavy)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (21)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql80)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_scheduler)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_partial_keyspace)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_mariadb_to_mysql)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_partial_movetables_and_materialize)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Java Docker Test

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Java Docker Test

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_tablet_healthcheck_cache)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_plantests)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_readafterwrite)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_mysqlshell)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtorc)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vttablet_prscomplex)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_xtrabackup)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (15)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_throttler_topo)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_recovery)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vschema)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql_server_vault)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (18)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_consul)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_backup)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql57)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_v2)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql57)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_tablegc)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql84)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_consul)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Vitess Tester (vtgate)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (evalengine_mysql80)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql80)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql84)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vindex_heavy)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_basic)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - E2E

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Queries)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_suite)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_migrate)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Schema)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Code Coverage

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Queries - 2)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Semi Sync Upgrade Downgrade Test

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_vtctldclient_vdiff2_movetables_tz)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - Manual

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Online DDL flow

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old VTTablet

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old Vtctl

no required module provides package github.com/your-project/vtctlservicepb; to add it:

Check failure on line 6 in go/vt/vtctl/vtctlserver/server.go

View workflow job for this annotation

GitHub Actions / Unit Test (Evalengine_Race)

no required module provides package github.com/your-project/vtctlservicepb; to add it:
)

type VtctlServer struct {
// Add any necessary fields here
}

func (s *VtctlServer) AddVSchemaTable(ctx context.Context, req *vtctlservicepb.AddVSchemaTableRequest) (*vtctlservicepb.AddVSchemaTableResponse, error) {
// Implement server-side handling of atomic VSchema modifications
return nil, nil // Placeholder return, actual implementation needed
}

0 comments on commit bd17b6c

Please sign in to comment.