Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: use user flags for ghost sync task & check (#9083)

p0ny5f56ee57e6c0
diff --git a/backend/api/v1/rollout_service_plan_check.go b/backend/api/v1/rollout_service_plan_check.go
index 380edbae73..65cd0bbfc8 100644
--- a/backend/api/v1/rollout_service_plan_check.go
+++ b/backend/api/v1/rollout_service_plan_check.go
@@ -367,6 +367,7 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
InstanceUid: int32(instance.UID),
DatabaseName: database.DatabaseName,
DatabaseGroupUid: databaseGroupUID,
+ GhostFlags: config.GhostFlags,
},
})
}
diff --git a/backend/component/ghost/config.go b/backend/component/ghost/config.go
index 809237813b..d52655530b 100644
--- a/backend/component/ghost/config.go
+++ b/backend/component/ghost/config.go
@@ -47,9 +47,9 @@ var defaultConfig = struct {
type UserFlags struct {
maxLoad *string
- chunkSize *int
+ chunkSize *int64
initiallyDropGhostTable *bool
- maxLagMillis *int
+ maxLagMillis *int64
allowOnMaster *bool
switchToRBR *bool
}
@@ -64,13 +64,17 @@ var knownKeys = map[string]bool{
}
func GetUserFlags(flags map[string]string) (*UserFlags, error) {
+ f := &UserFlags{}
+ if flags == nil {
+ return f, nil
+ }
+
for k := range flags {
if !knownKeys[k] {
return nil, errors.Errorf("unsupported flag: %s", k)
}
}
- f := &UserFlags{}
if v, ok := flags["max-load"]; ok {
if _, err := base.ParseLoadMap(v); err != nil {
return nil, errors.Wrapf(err, "failed to parse max-load %q", v)
@@ -78,7 +82,7 @@ func GetUserFlags(flags map[string]string) (*UserFlags, error) {
f.maxLoad = &v
}
if v, ok := flags["chunk-size"]; ok {
- chunkSize, err := strconv.Atoi(v)
+ chunkSize, err := strconv.ParseInt(v, 10, 64)
if err != nil {
return nil, errors.Wrapf(err, "failed to convert chunk-size %q to int", v)
}
@@ -92,7 +96,7 @@ func GetUserFlags(flags map[string]string) (*UserFlags, error) {
f.initiallyDropGhostTable = &initiallyDropGhostTable
}
if v, ok := flags["max-lag-millis"]; ok {
- maxLagMillis, err := strconv.Atoi(v)
+ maxLagMillis, err := strconv.ParseInt(v, 10, 64)
if err != nil {
return nil, errors.Wrapf(err, "failed to convert max-lag-millis %q to int", v)
}
@@ -125,7 +129,7 @@ func GetPostponeFlagFilename(taskID int, databaseID int, databaseName string, ta
}
// NewMigrationContext is the context for gh-ost migration.
-func NewMigrationContext(taskID int, database *store.DatabaseMessage, dataSource *store.DataSourceMessage, secret string, tableName string, statement string, noop bool, serverIDOffset uint) (*base.MigrationContext, error) {
+func NewMigrationContext(taskID int, database *store.DatabaseMessage, dataSource *store.DataSourceMessage, secret string, tableName string, statement string, noop bool, flags map[string]string, serverIDOffset uint) (*base.MigrationContext, error) {
password, err := common.Unobfuscate(dataSource.ObfuscatedPassword, secret)
if err != nil {
return nil, errors.Wrapf(err, "failed to get password")
@@ -197,6 +201,35 @@ func NewMigrationContext(taskID int, database *store.DatabaseMessage, dataSource
if err := migrationContext.SetExponentialBackoffMaxInterval(defaultConfig.exponentialBackoffMaxInterval); err != nil {
return nil, err
}
+
+ userFlags, err := GetUserFlags(flags)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get user flags")
+ }
+ if v := userFlags.maxLoad; v != nil {
+ if err := migrationContext.ReadMaxLoad(*v); err != nil {
+ return nil, errors.Wrapf(err, "failed to parse max load %q", *v)
+ }
+ }
+ if v := userFlags.chunkSize; v != nil {
+ migrationContext.SetChunkSize(*v)
+ }
+ if v := userFlags.initiallyDropGhostTable; v != nil {
+ migrationContext.InitiallyDropGhostTable = *v
+ }
+ if v := userFlags.maxLagMillis; v != nil {
+ migrationContext.SetMaxLagMillisecondsThrottleThreshold(*v)
+ }
+ if v := userFlags.allowOnMaster; v != nil {
+ migrationContext.AllowedRunningOnMaster = *v
+ }
+ if v := userFlags.switchToRBR; v != nil {
+ migrationContext.SwitchToRowBinlogFormat = *v
+ }
+
+ if migrationContext.SwitchToRowBinlogFormat && migrationContext.AssumeRBR {
+ return nil, errors.Errorf("switchToRBR and assumeRBR are mutually exclusive")
+ }
return migrationContext, nil
}
diff --git a/backend/runner/plancheck/ghost_sync_executor.go b/backend/runner/plancheck/ghost_sync_executor.go
index 23accf9768..ace7be1169 100644
--- a/backend/runner/plancheck/ghost_sync_executor.go
+++ b/backend/runner/plancheck/ghost_sync_executor.go
@@ -102,7 +102,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
return nil, common.Wrapf(err, common.Internal, "failed to parse table name from statement, statement: %v", statement)
}
- migrationContext, err := ghost.NewMigrationContext(rand.Intn(10000000), database, adminDataSource, e.secret, tableName, renderedStatement, true, 20000000)
+ migrationContext, err := ghost.NewMigrationContext(rand.Intn(10000000), database, adminDataSource, e.secret, tableName, renderedStatement, true, config.GhostFlags, 20000000)
if err != nil {
return nil, common.Wrapf(err, common.Internal, "failed to create migration context")
}
diff --git a/backend/runner/taskrun/schema_update_ghost_sync_executor.go b/backend/runner/taskrun/schema_update_ghost_sync_executor.go
index 37c100f6f4..045fbabb94 100644
--- a/backend/runner/taskrun/schema_update_ghost_sync_executor.go
+++ b/backend/runner/taskrun/schema_update_ghost_sync_executor.go
@@ -56,7 +56,7 @@ func (exec *SchemaUpdateGhostSyncExecutor) RunOnce(ctx context.Context, _ contex
return true, nil, err
}
- return exec.runGhostMigration(ctx, task, statement)
+ return exec.runGhostMigration(ctx, task, statement, payload.Flags)
}
type sharedGhostState struct {
@@ -64,7 +64,7 @@ type sharedGhostState struct {
errCh <-chan error
}
-func (exec *SchemaUpdateGhostSyncExecutor) runGhostMigration(ctx context.Context, task *store.TaskMessage, statement string) (terminated bool, result *api.TaskRunResultPayload, err error) {
+func (exec *SchemaUpdateGhostSyncExecutor) runGhostMigration(ctx context.Context, task *store.TaskMessage, statement string, flags map[string]string) (terminated bool, result *api.TaskRunResultPayload, err error) {
syncDone := make(chan struct{})
// set buffer size to 1 to unblock the sender because there is no listner if the task is canceled.
// see PR #2919.
@@ -101,7 +101,7 @@ func (exec *SchemaUpdateGhostSyncExecutor) runGhostMigration(ctx context.Context
// To avoid leaking the rendered statement, the error message should use the original statement and not the rendered statement.
renderedStatement := utils.RenderStatement(statement, materials)
- migrationContext, err := ghost.NewMigrationContext(task.ID, database, adminDataSource, exec.secret, tableName, renderedStatement, false, 10000000)
+ migrationContext, err := ghost.NewMigrationContext(task.ID, database, adminDataSource, exec.secret, tableName, renderedStatement, false, flags, 10000000)
if err != nil {
return true, nil, errors.Wrap(err, "failed to init migrationContext for gh-ost")
}
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 35f1f97507..2bc6930aee 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -12,6 +12,7 @@ export interface PlanCheckRunConfig {
databaseName: string;
/** database_group_uid is optional. If it's set, it means the database is part of a database group. */
databaseGroupUid?: number | undefined;
+ ghostFlags: { [key: string]: string };
}
export enum PlanCheckRunConfig_ChangeDatabaseType {
@@ -59,6 +60,11 @@ export function planCheckRunConfig_ChangeDatabaseTypeToJSON(object: PlanCheckRun
}
}
+export interface PlanCheckRunConfig_GhostFlagsEntry {
+ key: string;
+ value: string;
+}
+
export interface PlanCheckRunResult {
results: PlanCheckRunResult_Result[];
error: string;
@@ -135,7 +141,14 @@ export interface PlanCheckRunResult_Result_SqlReviewReport {
}
function createBasePlanCheckRunConfig(): PlanCheckRunConfig {
- return { sheetUid: 0, changeDatabaseType: 0, instanceUid: 0, databaseName: "", databaseGroupUid: undefined };
+ return {
+ sheetUid: 0,
+ changeDatabaseType: 0,
+ instanceUid: 0,
+ databaseName: "",
+ databaseGroupUid: undefined,
+ ghostFlags: {},
+ };
}
export const PlanCheckRunConfig = {
@@ -155,6 +168,9 @@ export const PlanCheckRunConfig = {
if (message.databaseGroupUid !== undefined) {
writer.uint32(40).int64(message.databaseGroupUid);
}
+ Object.entries(message.ghostFlags).forEach(([key, value]) => {
+ PlanCheckRunConfig_GhostFlagsEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).ldelim();
+ });
return writer;
},
@@ -200,6 +216,16 @@ export const PlanCheckRunConfig = {
message.databaseGroupUid = longToNumber(reader.int64() as Long);
continue;
+ case 6:
+ if (tag !== 50) {
+ break;
+ }
+
+ const entry6 = PlanCheckRunConfig_GhostFlagsEntry.decode(reader, reader.uint32());
+ if (entry6.value !== undefined) {
+ message.ghostFlags[entry6.key] = entry6.value;
+ }
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -218,6 +244,12 @@ export const PlanCheckRunConfig = {
instanceUid: isSet(object.instanceUid) ? Number(object.instanceUid) : 0,
databaseName: isSet(object.databaseName) ? String(object.databaseName) : "",
databaseGroupUid: isSet(object.databaseGroupUid) ? Number(object.databaseGroupUid) : undefined,
+ ghostFlags: isObject(object.ghostFlags)
+ ? Object.entries(object.ghostFlags).reduce<{ [key: string]: string }>((acc, [key, value]) => {
+ acc[key] = String(value);
+ return acc;
+ }, {})
+ : {},
};
},
@@ -229,6 +261,12 @@ export const PlanCheckRunConfig = {
message.instanceUid !== undefined && (obj.instanceUid = Math.round(message.instanceUid));
message.databaseName !== undefined && (obj.databaseName = message.databaseName);
message.databaseGroupUid !== undefined && (obj.databaseGroupUid = Math.round(message.databaseGroupUid));
+ obj.ghostFlags = {};
+ if (message.ghostFlags) {
+ Object.entries(message.ghostFlags).forEach(([k, v]) => {
+ obj.ghostFlags[k] = v;
+ });
+ }
return obj;
},
@@ -243,6 +281,83 @@ export const PlanCheckRunConfig = {
message.instanceUid = object.instanceUid ?? 0;
message.databaseName = object.databaseName ?? "";
message.databaseGroupUid = object.databaseGroupUid ?? undefined;
+ message.ghostFlags = Object.entries(object.ghostFlags ?? {}).reduce<{ [key: string]: string }>(
+ (acc, [key, value]) => {
+ if (value !== undefined) {
+ acc[key] = String(value);
+ }
+ return acc;
+ },
+ {},
+ );
+ return message;
+ },
+};
+
+function createBasePlanCheckRunConfig_GhostFlagsEntry(): PlanCheckRunConfig_GhostFlagsEntry {
+ return { key: "", value: "" };
+}
+
+export const PlanCheckRunConfig_GhostFlagsEntry = {
+ encode(message: PlanCheckRunConfig_GhostFlagsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.key !== "") {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== "") {
+ writer.uint32(18).string(message.value);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunConfig_GhostFlagsEntry {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePlanCheckRunConfig_GhostFlagsEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.key = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): PlanCheckRunConfig_GhostFlagsEntry {
+ return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ },
+
+ toJSON(message: PlanCheckRunConfig_GhostFlagsEntry): unknown {
+ const obj: any = {};
+ message.key !== undefined && (obj.key = message.key);
+ message.value !== undefined && (obj.value = message.value);
+ return obj;
+ },
+
+ create(base?: DeepPartial<PlanCheckRunConfig_GhostFlagsEntry>): PlanCheckRunConfig_GhostFlagsEntry {
+ return PlanCheckRunConfig_GhostFlagsEntry.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<PlanCheckRunConfig_GhostFlagsEntry>): PlanCheckRunConfig_GhostFlagsEntry {
+ const message = createBasePlanCheckRunConfig_GhostFlagsEntry();
+ message.key = object.key ?? "";
+ message.value = object.value ?? "";
return message;
},
};
@@ -702,6 +817,10 @@ if (_m0.util.Long !== Long) {
_m0.configure();
}
+function isObject(value: any): boolean {
+ return typeof value === "object" && value !== null;
+}
+
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index f4b16b9a98..4ed06fb320 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -116,6 +116,7 @@
- [store/plan_check_run.proto](#store_plan_check_run-proto)
- [PlanCheckRunConfig](#bytebase-store-PlanCheckRunConfig)
+ - [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry)
- [PlanCheckRunResult](#bytebase-store-PlanCheckRunResult)
- [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result)
- [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport)
@@ -1845,6 +1846,23 @@ Type is the database change type.
| instance_uid | [int32](#int32) | | |
| database_name | [string](#string) | | |
| database_group_uid | [int64](#int64) | optional | database_group_uid is optional. If it&#39;s set, it means the database is part of a database group. |
+| ghost_flags | [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry) | repeated | |
+
+
+
+
+
+
+<a name="bytebase-store-PlanCheckRunConfig-GhostFlagsEntry"></a>
+
+### PlanCheckRunConfig.GhostFlagsEntry
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.go
index cad0c3b80f..d3818da369 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -134,7 +134,8 @@ type PlanCheckRunConfig struct {
InstanceUid int32 `protobuf:"varint,3,opt,name=instance_uid,json=instanceUid,proto3" json:"instance_uid,omitempty"`
DatabaseName string `protobuf:"bytes,4,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
// database_group_uid is optional. If it's set, it means the database is part of a database group.
- DatabaseGroupUid *int64 `protobuf:"varint,5,opt,name=database_group_uid,json=databaseGroupUid,proto3,oneof" json:"database_group_uid,omitempty"`
+ DatabaseGroupUid *int64 `protobuf:"varint,5,opt,name=database_group_uid,json=databaseGroupUid,proto3,oneof" json:"database_group_uid,omitempty"`
+ GhostFlags map[string]string `protobuf:"bytes,6,rep,name=ghost_flags,json=ghostFlags,proto3" json:"ghost_flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *PlanCheckRunConfig) Reset() {
@@ -204,6 +205,13 @@ func (x *PlanCheckRunConfig) GetDatabaseGroupUid() int64 {
return 0
}
+func (x *PlanCheckRunConfig) GetGhostFlags() map[string]string {
+ if x != nil {
+ return x.GhostFlags
+ }
+ return nil
+}
+
type PlanCheckRunResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -278,7 +286,7 @@ type PlanCheckRunResult_Result struct {
func (x *PlanCheckRunResult_Result) Reset() {
*x = PlanCheckRunResult_Result{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_plan_check_run_proto_msgTypes[2]
+ mi := &file_store_plan_check_run_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -291,7 +299,7 @@ func (x *PlanCheckRunResult_Result) String() string {
func (*PlanCheckRunResult_Result) ProtoMessage() {}
func (x *PlanCheckRunResult_Result) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_check_run_proto_msgTypes[2]
+ mi := &file_store_plan_check_run_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -387,7 +395,7 @@ type PlanCheckRunResult_Result_SqlSummaryReport struct {
func (x *PlanCheckRunResult_Result_SqlSummaryReport) Reset() {
*x = PlanCheckRunResult_Result_SqlSummaryReport{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_plan_check_run_proto_msgTypes[3]
+ mi := &file_store_plan_check_run_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -400,7 +408,7 @@ func (x *PlanCheckRunResult_Result_SqlSummaryReport) String() string {
func (*PlanCheckRunResult_Result_SqlSummaryReport) ProtoMessage() {}
func (x *PlanCheckRunResult_Result_SqlSummaryReport) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_check_run_proto_msgTypes[3]
+ mi := &file_store_plan_check_run_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -459,7 +467,7 @@ type PlanCheckRunResult_Result_SqlReviewReport struct {
func (x *PlanCheckRunResult_Result_SqlReviewReport) Reset() {
*x = PlanCheckRunResult_Result_SqlReviewReport{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_plan_check_run_proto_msgTypes[4]
+ mi := &file_store_plan_check_run_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -472,7 +480,7 @@ func (x *PlanCheckRunResult_Result_SqlReviewReport) String() string {
func (*PlanCheckRunResult_Result_SqlReviewReport) ProtoMessage() {}
func (x *PlanCheckRunResult_Result_SqlReviewReport) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_check_run_proto_msgTypes[4]
+ mi := &file_store_plan_check_run_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -524,7 +532,7 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x23, 0x73, 0x74,
0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x22, 0x83, 0x03, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+ 0x6f, 0x22, 0x97, 0x04, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x65, 0x65,
0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x68, 0x65,
0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x67, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f,
@@ -541,70 +549,79 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x48, 0x00, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x55, 0x69, 0x64, 0x88, 0x01, 0x01, 0x22, 0x55, 0x0a, 0x12, 0x43, 0x68, 0x61,
- 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
- 0x24, 0x0a, 0x20, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
- 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01, 0x12, 0x07,
- 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x44, 0x4c, 0x10, 0x03,
- 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x06, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e,
- 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x43,
- 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
- 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xed, 0x05, 0x0a, 0x06, 0x52, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
- 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e,
- 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14,
- 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12,
- 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f,
- 0x64, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72,
- 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a,
+ 0x6f, 0x75, 0x70, 0x55, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x0b, 0x67, 0x68, 0x6f,
+ 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
+ 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x0a, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x3d,
+ 0x0a, 0x0f, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a,
+ 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x44, 0x41,
+ 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c,
+ 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53,
+ 0x44, 0x4c, 0x10, 0x03, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x06, 0x0a, 0x12,
0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x6d,
- 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x71,
- 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x67,
- 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x72, 0x65, 0x70,
- 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65,
- 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65,
- 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xc3, 0x01, 0x0a, 0x10, 0x53, 0x71, 0x6c, 0x53,
- 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04,
- 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
- 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x66, 0x66,
- 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x4d,
- 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x68, 0x61,
- 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x69, 0x0a,
- 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
- 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
- 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06,
- 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65,
- 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52,
- 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47,
- 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x42,
- 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75,
+ 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07,
+ 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xed, 0x05,
+ 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68,
+ 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73,
+ 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75,
+ 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e,
+ 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71,
+ 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00,
+ 0x52, 0x10, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f,
+ 0x72, 0x74, 0x12, 0x67, 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
+ 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+ 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c,
+ 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69,
+ 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52,
+ 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xc3, 0x01, 0x0a, 0x10,
+ 0x53, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+ 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a,
+ 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f,
+ 0x77, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
+ 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x1a, 0x69, 0x0a, 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65,
+ 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75,
+ 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
+ 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
+ 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52,
+ 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53,
+ 0x53, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, 0x5a,
+ 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -620,29 +637,31 @@ func file_store_plan_check_run_proto_rawDescGZIP() []byte {
}
var file_store_plan_check_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_store_plan_check_run_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_store_plan_check_run_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_store_plan_check_run_proto_goTypes = []interface{}{
(PlanCheckRunConfig_ChangeDatabaseType)(0), // 0: bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
(PlanCheckRunResult_Result_Status)(0), // 1: bytebase.store.PlanCheckRunResult.Result.Status
(*PlanCheckRunConfig)(nil), // 2: bytebase.store.PlanCheckRunConfig
(*PlanCheckRunResult)(nil), // 3: bytebase.store.PlanCheckRunResult
- (*PlanCheckRunResult_Result)(nil), // 4: bytebase.store.PlanCheckRunResult.Result
- (*PlanCheckRunResult_Result_SqlSummaryReport)(nil), // 5: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
- (*PlanCheckRunResult_Result_SqlReviewReport)(nil), // 6: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
- (*ChangedResources)(nil), // 7: bytebase.store.ChangedResources
+ nil, // 4: bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
+ (*PlanCheckRunResult_Result)(nil), // 5: bytebase.store.PlanCheckRunResult.Result
+ (*PlanCheckRunResult_Result_SqlSummaryReport)(nil), // 6: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
+ (*PlanCheckRunResult_Result_SqlReviewReport)(nil), // 7: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
+ (*ChangedResources)(nil), // 8: bytebase.store.ChangedResources
}
var file_store_plan_check_run_proto_depIdxs = []int32{
0, // 0: bytebase.store.PlanCheckRunConfig.change_database_type:type_name -> bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
- 4, // 1: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
- 1, // 2: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.PlanCheckRunResult.Result.Status
- 5, // 3: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
- 6, // 4: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
- 7, // 5: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.store.ChangedResources
- 6, // [6:6] is the sub-list for method output_type
- 6, // [6:6] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 4, // 1: bytebase.store.PlanCheckRunConfig.ghost_flags:type_name -> bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
+ 5, // 2: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
+ 1, // 3: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.PlanCheckRunResult.Result.Status
+ 6, // 4: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
+ 7, // 5: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
+ 8, // 6: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.store.ChangedResources
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
}
func init() { file_store_plan_check_run_proto_init() }
@@ -676,7 +695,7 @@ func file_store_plan_check_run_proto_init() {
return nil
}
}
- file_store_plan_check_run_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ file_store_plan_check_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlanCheckRunResult_Result); i {
case 0:
return &v.state
@@ -688,7 +707,7 @@ func file_store_plan_check_run_proto_init() {
return nil
}
}
- file_store_plan_check_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ file_store_plan_check_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlanCheckRunResult_Result_SqlSummaryReport); i {
case 0:
return &v.state
@@ -700,7 +719,7 @@ func file_store_plan_check_run_proto_init() {
return nil
}
}
- file_store_plan_check_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ file_store_plan_check_run_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlanCheckRunResult_Result_SqlReviewReport); i {
case 0:
return &v.state
@@ -714,7 +733,7 @@ func file_store_plan_check_run_proto_init() {
}
}
file_store_plan_check_run_proto_msgTypes[0].OneofWrappers = []interface{}{}
- file_store_plan_check_run_proto_msgTypes[2].OneofWrappers = []interface{}{
+ file_store_plan_check_run_proto_msgTypes[3].OneofWrappers = []interface{}{
(*PlanCheckRunResult_Result_SqlSummaryReport_)(nil),
(*PlanCheckRunResult_Result_SqlReviewReport_)(nil),
}
@@ -724,7 +743,7 @@ func file_store_plan_check_run_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_plan_check_run_proto_rawDesc,
NumEnums: 2,
- NumMessages: 5,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.proto
index 9d97d0d457..c900322e87 100644
--- a/proto/store/plan_check_run.proto
+++ b/proto/store/plan_check_run.proto
@@ -14,6 +14,8 @@ message PlanCheckRunConfig {
// database_group_uid is optional. If it's set, it means the database is part of a database group.
optional int64 database_group_uid = 5;
+ map<string, string> ghost_flags = 6;
+
enum ChangeDatabaseType {
CHANGE_DATABASE_TYPE_UNSPECIFIED = 0;
DDL = 1;