Feature Description
Replace the SQL based VReplicationExec API with 1+ properly encapsulated RPCs to meet any remaining use cases.
Details
vtctld makes fairly heavy use of the VReplicationExec RPC. This client-server interface (vtctld->vttablet) needs to be replaced because it does not do proper encapsulation and instead exposes the raw SQL interface. This causes problems for upgrades/downgrades where the internal schema changes as e.g. shown in #11535. As you can see from that bug report this RPC is used internally by, among other things, the implementation of the Workflow client command.
Using the Workflow command as an example, vtctld should instead leverage a new tabletmanager RPC, something like WorkflowAction where it passes the keyspace.workflow value, the action, and optional parameters such as the tablet-types or cells values for the update action (this still needs to be spec'd out). All other internal uses of the VReplicationExec RPC (primarily by vtctld via the wrangler component) would also be replaced.
Similarly, all other internal uses of the VReplicationExec RPC should be replaced by 1+ new purpose-built RPCs that support the use case with proper encapsulation.
The end result being that the raw SQL client-server interface for executing VReplication commands will be gone and replaced by 1 or more new RPCs with proper encapsulation.
Work
Related Issues
Feature Description
Replace the SQL based
VReplicationExecAPI with 1+ properly encapsulated RPCs to meet any remaining use cases.Details
vtctldmakes fairly heavy use of theVReplicationExecRPC. This client-server interface (vtctld->vttablet) needs to be replaced because it does not do proper encapsulation and instead exposes the raw SQL interface. This causes problems for upgrades/downgrades where the internal schema changes as e.g. shown in #11535. As you can see from that bug report this RPC is used internally by, among other things, the implementation of the Workflow client command.Using the
Workflowcommand as an example,vtctldshould instead leverage a new tabletmanager RPC, something likeWorkflowActionwhere it passes thekeyspace.workflowvalue, theaction, and optional parameters such as thetablet-typesorcellsvalues for theupdateaction (this still needs to be spec'd out). All other internal uses of theVReplicationExecRPC (primarily byvtctldvia thewranglercomponent) would also be replaced.Similarly, all other internal uses of the
VReplicationExecRPC should be replaced by 1+ new purpose-built RPCs that support the use case with proper encapsulation.The end result being that the raw SQL client-server interface for executing VReplication commands will be gone and replaced by 1 or more new RPCs with proper encapsulation.
Work
VReplicationExecRPC usage (can be broken down by component if needed)VReplicationExecRPC usage for the _vt.vreplication table #15439VReplicationExecclient command: Add Workflow Update Client Command #12622VReplicationExecclient commandRelated Issues
SwitchTrafficin v15 not backwards compatible with v14 tablets #12100