-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an interface for v schema #17686
base: main
Are you sure you want to change the base?
Adding an interface for v schema #17686
Conversation
…s Operator Compatibility Matrix Removed specific Kubernetes version instructions from examples/operator/README.md. Added a link to the Vitess Operator Compatibility Matrix for up-to-date Kubernetes version information. This change centralizes Kubernetes version recommendations and ensures users are directed to the most current documentation. Related Issue: [vitessio#1022](vitessio/website#1022) Signed-off-by: Anshika Vashistha <[email protected]>
…s Operator Compatibility Matrix Signed-off-by: Anshika Vashistha <[email protected]>
Co-authored-by: Matt Lord <[email protected]> Signed-off-by: Anshika Vashistha <[email protected]>
Signed-off-by: Anshika Vashistha <[email protected]>
Signed-off-by: anshikavashistha <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Implemented
gRPCVSchemaOperations
struct - Added atomic operations with version checking
- Implemented retry logic for concurrent modifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added basic client operation tests
- Added validation tests
- Added error condition tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Implemented
gRPCVSchemaOperations
struct - Added atomic operations with version checking
- Implemented retry logic for concurrent modifications
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added new
VSchemaOperations
interface for atomic VSchema modifications - Extended
VtctlClient
interface to include VSchema operations - Added methods for AddTable, RemoveTable, AddVindex, RemoveVindex
ts *memorytopo.Server | ||
} | ||
|
||
// Implement VtctlClient interface methods... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added comprehensive test suite for atomic operations
- Added concurrent modification tests
- Added version conflict tests
- Added integration tests with memory topo
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Added comprehensive test suite for atomic operations
- Added concurrent modification tests
- Added version conflict tests
- Added integration tests with memory topo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes are needed in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vtctlclient is deprecated so no changes needed there. I'm also not sure what this is supposed to be used for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see how the ApplyVSchema
command is implemented here on the vtctldclient
side: https://github.com/vitessio/vitess/blob/main/go/cmd/vtctldclient/command/vschemas.go
And on the VtctldServer
side: https://github.com/vitessio/vitess/blob/main/go/vt/vtctl/grpcvtctldserver/server.go
You can see a recent PR that added a couple of simple new commands here: #17442
Description
Related Issue(s)
Add an interface for modifying discrete parts of the VSchema via concrete actions: AddTable, AddVindex, RemoveTable, etc. #17663
Checklist
Deployment Notes