Skip to content

Instantly share code, notes, and snippets.

@mattlord
Last active November 11, 2024 02:09
Show Gist options
  • Save mattlord/07c66b069d81c56fce684d2ce2f22c36 to your computer and use it in GitHub Desktop.
Save mattlord/07c66b069d81c56fce684d2ce2f22c36 to your computer and use it in GitHub Desktop.

Proto: https://github.com/vitessio/vitess/blob/655f7fa15b097ca591b0534ff0abd11cedb13ec3/proto/topodata.proto#L259-L301

diff --git a/proto/topodata.proto b/proto/topodata.proto
index 1e549ea4ff..c15d505142 100644
--- a/proto/topodata.proto
+++ b/proto/topodata.proto
@@ -298,6 +298,9 @@ message Keyspace {
   // used for various system metadata that is stored in each
   // tablet's mysqld instance.
   string sidecar_db_name = 10;
+
+  bool test_field1 = 50;
+  bool test_field2 = 25;
 }
 
 // ShardReplication describes the MySQL replication relationships


make proto && make vtctldclient && make vtadmin_web_proto_types && make build

cd examples/local

./101_initial_cluster.sh

❯ vtctldclient GetKeyspace commerce
{
  "name": "commerce",
  "keyspace": {
    "keyspace_type": "NORMAL",
    "base_keyspace": "",
    "snapshot_time": null,
    "durability_policy": "semi_sync",
    "throttler_config": null,
    "sidecar_db_name": "_vt",
    "test_field1": false,
    "test_field2": false
  }
}

❯ etcdctl get --prefix -w protobuf /vitess/global/keyspaces/commerce/Keyspace | protoc --decode_raw
1 {
  1: 14841639068965178418
  2: 10276657743932975437
  3: 35
  4: 2
}
2 {
  1: "/vitess/global/keyspaces/commerce/Keyspace"
  2: 3
  3: 3
  4: 1
  5 {
    8: "semi_sync"
    10: "_vt"
  }
}
4: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment