({ clusterID: '', keyspace: '' });
+
+ const selectedKeyspace = keyspaces.find(
+ (ks) => ks.keyspace?.name === params.keyspace && ks.cluster?.id === params.clusterID
+ );
+
+ const transactionsQuery = useTransactions(params, {
+ enabled: !!params.keyspace,
+ });
+
+ const transactions =
+ (transactionsQuery.data && orderBy(transactionsQuery.data.transactions, ['time_created'], 'asc')) || [];
+
+ const renderRows = (rows: query.ITransactionMetadata[]) => {
+ return rows.map((row) => {
+ return (
+
+
+ {row.dtid}
+
+
+ {formatTransactionState(row)}
+
+
+ {row.participants?.map((participant) => {
+ const shard = `${participant.keyspace}/${participant.shard}`;
+ return (
+
+ {shard}
+
+ );
+ })}
+
+
+ {formatDateTime(row.time_created)}
+
+ {formatRelativeTimeInSeconds(row.time_created)}
+
+
+
+ );
+ });
+ };
+
+ return (
+
+
+ In Flight Distributed Transactions
+
+
+
+
+
+ );
+};
diff --git a/web/vtadmin/src/hooks/api.ts b/web/vtadmin/src/hooks/api.ts
index f3772ed4ab0..c60888ef154 100644
--- a/web/vtadmin/src/hooks/api.ts
+++ b/web/vtadmin/src/hooks/api.ts
@@ -81,6 +81,8 @@ import {
ValidateVersionShardParams,
startWorkflow,
stopWorkflow,
+ FetchTransactionsParams,
+ fetchTransactions,
} from '../api/http';
import { vtadmin as pb, vtctldata } from '../proto/vtadmin';
import { formatAlias } from '../util/tablets';
@@ -405,6 +407,16 @@ export const useVSchema = (params: FetchVSchemaParams, options?: UseQueryOptions
return useQuery(['vschema', params], () => fetchVSchema(params));
};
+/**
+ * useTransactions is a query hook that fetches unresolved transactions for the given keyspace.
+ */
+export const useTransactions = (
+ params: FetchTransactionsParams,
+ options?: UseQueryOptions | undefined
+) => {
+ return useQuery(['transactions', params], () => fetchTransactions(params), { ...options });
+};
+
export const useVTExplain = (
params: Parameters[0],
options?: UseQueryOptions | undefined
diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts
index 9d966077cbb..6176b59b550 100644
--- a/web/vtadmin/src/proto/vtadmin.d.ts
+++ b/web/vtadmin/src/proto/vtadmin.d.ts
@@ -443,6 +443,20 @@ export namespace vtadmin {
*/
public getTopologyPath(request: vtadmin.IGetTopologyPathRequest): Promise;
+ /**
+ * Calls GetUnresolvedTransactions.
+ * @param request GetUnresolvedTransactionsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and GetUnresolvedTransactionsResponse
+ */
+ public getUnresolvedTransactions(request: vtadmin.IGetUnresolvedTransactionsRequest, callback: vtadmin.VTAdmin.GetUnresolvedTransactionsCallback): void;
+
+ /**
+ * Calls GetUnresolvedTransactions.
+ * @param request GetUnresolvedTransactionsRequest message or plain object
+ * @returns Promise
+ */
+ public getUnresolvedTransactions(request: vtadmin.IGetUnresolvedTransactionsRequest): Promise;
+
/**
* Calls GetVSchema.
* @param request GetVSchemaRequest message or plain object
@@ -1090,6 +1104,13 @@ export namespace vtadmin {
*/
type GetTopologyPathCallback = (error: (Error|null), response?: vtctldata.GetTopologyPathResponse) => void;
+ /**
+ * Callback as used by {@link vtadmin.VTAdmin#getUnresolvedTransactions}.
+ * @param error Error, if any
+ * @param [response] GetUnresolvedTransactionsResponse
+ */
+ type GetUnresolvedTransactionsCallback = (error: (Error|null), response?: vtctldata.GetUnresolvedTransactionsResponse) => void;
+
/**
* Callback as used by {@link vtadmin.VTAdmin#getVSchema}.
* @param error Error, if any
@@ -8073,6 +8094,109 @@ export namespace vtadmin {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ /** Properties of a GetUnresolvedTransactionsRequest. */
+ interface IGetUnresolvedTransactionsRequest {
+
+ /** GetUnresolvedTransactionsRequest cluster_id */
+ cluster_id?: (string|null);
+
+ /** GetUnresolvedTransactionsRequest keyspace */
+ keyspace?: (string|null);
+ }
+
+ /** Represents a GetUnresolvedTransactionsRequest. */
+ class GetUnresolvedTransactionsRequest implements IGetUnresolvedTransactionsRequest {
+
+ /**
+ * Constructs a new GetUnresolvedTransactionsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: vtadmin.IGetUnresolvedTransactionsRequest);
+
+ /** GetUnresolvedTransactionsRequest cluster_id. */
+ public cluster_id: string;
+
+ /** GetUnresolvedTransactionsRequest keyspace. */
+ public keyspace: string;
+
+ /**
+ * Creates a new GetUnresolvedTransactionsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetUnresolvedTransactionsRequest instance
+ */
+ public static create(properties?: vtadmin.IGetUnresolvedTransactionsRequest): vtadmin.GetUnresolvedTransactionsRequest;
+
+ /**
+ * Encodes the specified GetUnresolvedTransactionsRequest message. Does not implicitly {@link vtadmin.GetUnresolvedTransactionsRequest.verify|verify} messages.
+ * @param message GetUnresolvedTransactionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: vtadmin.IGetUnresolvedTransactionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetUnresolvedTransactionsRequest message, length delimited. Does not implicitly {@link vtadmin.GetUnresolvedTransactionsRequest.verify|verify} messages.
+ * @param message GetUnresolvedTransactionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: vtadmin.IGetUnresolvedTransactionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetUnresolvedTransactionsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetUnresolvedTransactionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetUnresolvedTransactionsRequest;
+
+ /**
+ * Decodes a GetUnresolvedTransactionsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetUnresolvedTransactionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetUnresolvedTransactionsRequest;
+
+ /**
+ * Verifies a GetUnresolvedTransactionsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetUnresolvedTransactionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetUnresolvedTransactionsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): vtadmin.GetUnresolvedTransactionsRequest;
+
+ /**
+ * Creates a plain object from a GetUnresolvedTransactionsRequest message. Also converts values to other types if specified.
+ * @param message GetUnresolvedTransactionsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: vtadmin.GetUnresolvedTransactionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetUnresolvedTransactionsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetUnresolvedTransactionsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
/** Properties of a GetVSchemaRequest. */
interface IGetVSchemaRequest {
@@ -29831,6 +29955,9 @@ export namespace tabletmanagerdata {
/** ReadVReplicationWorkflowResponse options */
options?: (string|null);
+
+ /** ReadVReplicationWorkflowResponse config_overrides */
+ config_overrides?: ({ [k: string]: string }|null);
}
/** Represents a ReadVReplicationWorkflowResponse. */
@@ -29875,6 +30002,9 @@ export namespace tabletmanagerdata {
/** ReadVReplicationWorkflowResponse options. */
public options: string;
+ /** ReadVReplicationWorkflowResponse config_overrides. */
+ public config_overrides: { [k: string]: string };
+
/**
* Creates a new ReadVReplicationWorkflowResponse instance using the specified properties.
* @param [properties] Properties to set
@@ -30880,6 +31010,9 @@ export namespace tabletmanagerdata {
/** UpdateVReplicationWorkflowRequest state */
state?: (binlogdata.VReplicationWorkflowState|null);
+
+ /** UpdateVReplicationWorkflowRequest config_overrides */
+ config_overrides?: ({ [k: string]: string }|null);
}
/** Represents an UpdateVReplicationWorkflowRequest. */
@@ -30909,6 +31042,9 @@ export namespace tabletmanagerdata {
/** UpdateVReplicationWorkflowRequest state. */
public state?: (binlogdata.VReplicationWorkflowState|null);
+ /** UpdateVReplicationWorkflowRequest config_overrides. */
+ public config_overrides: { [k: string]: string };
+
/** UpdateVReplicationWorkflowRequest _tablet_selection_preference. */
public _tablet_selection_preference?: "tablet_selection_preference";
@@ -35220,6 +35356,9 @@ export namespace binlogdata {
/** VStreamOptions internal_tables */
internal_tables?: (string[]|null);
+
+ /** VStreamOptions config_overrides */
+ config_overrides?: ({ [k: string]: string }|null);
}
/** Represents a VStreamOptions. */
@@ -35234,6 +35373,9 @@ export namespace binlogdata {
/** VStreamOptions internal_tables. */
public internal_tables: string[];
+ /** VStreamOptions config_overrides. */
+ public config_overrides: { [k: string]: string };
+
/**
* Creates a new VStreamOptions instance using the specified properties.
* @param [properties] Properties to set
@@ -35559,6 +35701,9 @@ export namespace binlogdata {
/** VStreamRowsRequest lastpk */
lastpk?: (query.IQueryResult|null);
+
+ /** VStreamRowsRequest options */
+ options?: (binlogdata.IVStreamOptions|null);
}
/** Represents a VStreamRowsRequest. */
@@ -35585,6 +35730,9 @@ export namespace binlogdata {
/** VStreamRowsRequest lastpk. */
public lastpk?: (query.IQueryResult|null);
+ /** VStreamRowsRequest options. */
+ public options?: (binlogdata.IVStreamOptions|null);
+
/**
* Creates a new VStreamRowsRequest instance using the specified properties.
* @param [properties] Properties to set
@@ -35813,6 +35961,9 @@ export namespace binlogdata {
/** VStreamTablesRequest target */
target?: (query.ITarget|null);
+
+ /** VStreamTablesRequest options */
+ options?: (binlogdata.IVStreamOptions|null);
}
/** Represents a VStreamTablesRequest. */
@@ -35833,6 +35984,9 @@ export namespace binlogdata {
/** VStreamTablesRequest target. */
public target?: (query.ITarget|null);
+ /** VStreamTablesRequest options. */
+ public options?: (binlogdata.IVStreamOptions|null);
+
/**
* Creates a new VStreamTablesRequest instance using the specified properties.
* @param [properties] Properties to set
@@ -48321,6 +48475,9 @@ export namespace vtctldata {
/** WorkflowOptions shards */
shards?: (string[]|null);
+
+ /** WorkflowOptions config */
+ config?: ({ [k: string]: string }|null);
}
/** Represents a WorkflowOptions. */
@@ -48341,6 +48498,9 @@ export namespace vtctldata {
/** WorkflowOptions shards. */
public shards: string[];
+ /** WorkflowOptions config. */
+ public config: { [k: string]: string };
+
/**
* Creates a new WorkflowOptions instance using the specified properties.
* @param [properties] Properties to set
@@ -67135,6 +67295,9 @@ export namespace vtctldata {
/** ReshardCreateRequest auto_start */
auto_start?: (boolean|null);
+
+ /** ReshardCreateRequest workflow_options */
+ workflow_options?: (vtctldata.IWorkflowOptions|null);
}
/** Represents a ReshardCreateRequest. */
@@ -67182,6 +67345,9 @@ export namespace vtctldata {
/** ReshardCreateRequest auto_start. */
public auto_start: boolean;
+ /** ReshardCreateRequest workflow_options. */
+ public workflow_options?: (vtctldata.IWorkflowOptions|null);
+
/**
* Creates a new ReshardCreateRequest instance using the specified properties.
* @param [properties] Properties to set
diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js
index e9d5ad4d8f3..bef4ccb6cf8 100644
--- a/web/vtadmin/src/proto/vtadmin.js
+++ b/web/vtadmin/src/proto/vtadmin.js
@@ -1038,6 +1038,39 @@ export const vtadmin = $root.vtadmin = (() => {
* @variation 2
*/
+ /**
+ * Callback as used by {@link vtadmin.VTAdmin#getUnresolvedTransactions}.
+ * @memberof vtadmin.VTAdmin
+ * @typedef GetUnresolvedTransactionsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {vtctldata.GetUnresolvedTransactionsResponse} [response] GetUnresolvedTransactionsResponse
+ */
+
+ /**
+ * Calls GetUnresolvedTransactions.
+ * @function getUnresolvedTransactions
+ * @memberof vtadmin.VTAdmin
+ * @instance
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest} request GetUnresolvedTransactionsRequest message or plain object
+ * @param {vtadmin.VTAdmin.GetUnresolvedTransactionsCallback} callback Node-style callback called with the error, if any, and GetUnresolvedTransactionsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(VTAdmin.prototype.getUnresolvedTransactions = function getUnresolvedTransactions(request, callback) {
+ return this.rpcCall(getUnresolvedTransactions, $root.vtadmin.GetUnresolvedTransactionsRequest, $root.vtctldata.GetUnresolvedTransactionsResponse, request, callback);
+ }, "name", { value: "GetUnresolvedTransactions" });
+
+ /**
+ * Calls GetUnresolvedTransactions.
+ * @function getUnresolvedTransactions
+ * @memberof vtadmin.VTAdmin
+ * @instance
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest} request GetUnresolvedTransactionsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
/**
* Callback as used by {@link vtadmin.VTAdmin#getVSchema}.
* @memberof vtadmin.VTAdmin
@@ -18227,6 +18260,233 @@ export const vtadmin = $root.vtadmin = (() => {
return GetTopologyPathRequest;
})();
+ vtadmin.GetUnresolvedTransactionsRequest = (function() {
+
+ /**
+ * Properties of a GetUnresolvedTransactionsRequest.
+ * @memberof vtadmin
+ * @interface IGetUnresolvedTransactionsRequest
+ * @property {string|null} [cluster_id] GetUnresolvedTransactionsRequest cluster_id
+ * @property {string|null} [keyspace] GetUnresolvedTransactionsRequest keyspace
+ */
+
+ /**
+ * Constructs a new GetUnresolvedTransactionsRequest.
+ * @memberof vtadmin
+ * @classdesc Represents a GetUnresolvedTransactionsRequest.
+ * @implements IGetUnresolvedTransactionsRequest
+ * @constructor
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest=} [properties] Properties to set
+ */
+ function GetUnresolvedTransactionsRequest(properties) {
+ if (properties)
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetUnresolvedTransactionsRequest cluster_id.
+ * @member {string} cluster_id
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @instance
+ */
+ GetUnresolvedTransactionsRequest.prototype.cluster_id = "";
+
+ /**
+ * GetUnresolvedTransactionsRequest keyspace.
+ * @member {string} keyspace
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @instance
+ */
+ GetUnresolvedTransactionsRequest.prototype.keyspace = "";
+
+ /**
+ * Creates a new GetUnresolvedTransactionsRequest instance using the specified properties.
+ * @function create
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest=} [properties] Properties to set
+ * @returns {vtadmin.GetUnresolvedTransactionsRequest} GetUnresolvedTransactionsRequest instance
+ */
+ GetUnresolvedTransactionsRequest.create = function create(properties) {
+ return new GetUnresolvedTransactionsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetUnresolvedTransactionsRequest message. Does not implicitly {@link vtadmin.GetUnresolvedTransactionsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest} message GetUnresolvedTransactionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetUnresolvedTransactionsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id);
+ if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GetUnresolvedTransactionsRequest message, length delimited. Does not implicitly {@link vtadmin.GetUnresolvedTransactionsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {vtadmin.IGetUnresolvedTransactionsRequest} message GetUnresolvedTransactionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetUnresolvedTransactionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetUnresolvedTransactionsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {vtadmin.GetUnresolvedTransactionsRequest} GetUnresolvedTransactionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetUnresolvedTransactionsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetUnresolvedTransactionsRequest();
+ while (reader.pos < end) {
+ let tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.cluster_id = reader.string();
+ break;
+ }
+ case 2: {
+ message.keyspace = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GetUnresolvedTransactionsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {vtadmin.GetUnresolvedTransactionsRequest} GetUnresolvedTransactionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetUnresolvedTransactionsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetUnresolvedTransactionsRequest message.
+ * @function verify
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetUnresolvedTransactionsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cluster_id != null && message.hasOwnProperty("cluster_id"))
+ if (!$util.isString(message.cluster_id))
+ return "cluster_id: string expected";
+ if (message.keyspace != null && message.hasOwnProperty("keyspace"))
+ if (!$util.isString(message.keyspace))
+ return "keyspace: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a GetUnresolvedTransactionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {vtadmin.GetUnresolvedTransactionsRequest} GetUnresolvedTransactionsRequest
+ */
+ GetUnresolvedTransactionsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.vtadmin.GetUnresolvedTransactionsRequest)
+ return object;
+ let message = new $root.vtadmin.GetUnresolvedTransactionsRequest();
+ if (object.cluster_id != null)
+ message.cluster_id = String(object.cluster_id);
+ if (object.keyspace != null)
+ message.keyspace = String(object.keyspace);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetUnresolvedTransactionsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {vtadmin.GetUnresolvedTransactionsRequest} message GetUnresolvedTransactionsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetUnresolvedTransactionsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ let object = {};
+ if (options.defaults) {
+ object.cluster_id = "";
+ object.keyspace = "";
+ }
+ if (message.cluster_id != null && message.hasOwnProperty("cluster_id"))
+ object.cluster_id = message.cluster_id;
+ if (message.keyspace != null && message.hasOwnProperty("keyspace"))
+ object.keyspace = message.keyspace;
+ return object;
+ };
+
+ /**
+ * Converts this GetUnresolvedTransactionsRequest to JSON.
+ * @function toJSON
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetUnresolvedTransactionsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetUnresolvedTransactionsRequest
+ * @function getTypeUrl
+ * @memberof vtadmin.GetUnresolvedTransactionsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetUnresolvedTransactionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/vtadmin.GetUnresolvedTransactionsRequest";
+ };
+
+ return GetUnresolvedTransactionsRequest;
+ })();
+
vtadmin.GetVSchemaRequest = (function() {
/**
@@ -68266,6 +68526,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
* @property {boolean|null} [defer_secondary_keys] ReadVReplicationWorkflowResponse defer_secondary_keys
* @property {Array.|null} [streams] ReadVReplicationWorkflowResponse streams
* @property {string|null} [options] ReadVReplicationWorkflowResponse options
+ * @property {Object.|null} [config_overrides] ReadVReplicationWorkflowResponse config_overrides
*/
/**
@@ -68279,6 +68540,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
function ReadVReplicationWorkflowResponse(properties) {
this.tablet_types = [];
this.streams = [];
+ this.config_overrides = {};
if (properties)
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -68373,6 +68635,14 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
*/
ReadVReplicationWorkflowResponse.prototype.options = "";
+ /**
+ * ReadVReplicationWorkflowResponse config_overrides.
+ * @member {Object.} config_overrides
+ * @memberof tabletmanagerdata.ReadVReplicationWorkflowResponse
+ * @instance
+ */
+ ReadVReplicationWorkflowResponse.prototype.config_overrides = $util.emptyObject;
+
/**
* Creates a new ReadVReplicationWorkflowResponse instance using the specified properties.
* @function create
@@ -68424,6 +68694,9 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
$root.tabletmanagerdata.ReadVReplicationWorkflowResponse.Stream.encode(message.streams[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
writer.uint32(/* id 12, wireType 2 =*/98).string(message.options);
+ if (message.config_overrides != null && Object.hasOwnProperty.call(message, "config_overrides"))
+ for (let keys = Object.keys(message.config_overrides), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.config_overrides[keys[i]]).ldelim();
return writer;
};
@@ -68454,7 +68727,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
ReadVReplicationWorkflowResponse.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReadVReplicationWorkflowResponse();
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReadVReplicationWorkflowResponse(), key, value;
while (reader.pos < end) {
let tag = reader.uint32();
switch (tag >>> 3) {
@@ -68511,6 +68784,29 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
message.options = reader.string();
break;
}
+ case 13: {
+ if (message.config_overrides === $util.emptyObject)
+ message.config_overrides = {};
+ let end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ let tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.config_overrides[key] = value;
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -68624,6 +68920,14 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
if (message.options != null && message.hasOwnProperty("options"))
if (!$util.isString(message.options))
return "options: string expected";
+ if (message.config_overrides != null && message.hasOwnProperty("config_overrides")) {
+ if (!$util.isObject(message.config_overrides))
+ return "config_overrides: object expected";
+ let key = Object.keys(message.config_overrides);
+ for (let i = 0; i < key.length; ++i)
+ if (!$util.isString(message.config_overrides[key[i]]))
+ return "config_overrides: string{k:string} expected";
+ }
return null;
};
@@ -68790,6 +69094,13 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
}
if (object.options != null)
message.options = String(object.options);
+ if (object.config_overrides) {
+ if (typeof object.config_overrides !== "object")
+ throw TypeError(".tabletmanagerdata.ReadVReplicationWorkflowResponse.config_overrides: object expected");
+ message.config_overrides = {};
+ for (let keys = Object.keys(object.config_overrides), i = 0; i < keys.length; ++i)
+ message.config_overrides[keys[i]] = String(object.config_overrides[keys[i]]);
+ }
return message;
};
@@ -68810,6 +69121,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
object.tablet_types = [];
object.streams = [];
}
+ if (options.objects || options.defaults)
+ object.config_overrides = {};
if (options.defaults) {
object.workflow = "";
object.cells = "";
@@ -68849,6 +69162,12 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
}
if (message.options != null && message.hasOwnProperty("options"))
object.options = message.options;
+ let keys2;
+ if (message.config_overrides && (keys2 = Object.keys(message.config_overrides)).length) {
+ object.config_overrides = {};
+ for (let j = 0; j < keys2.length; ++j)
+ object.config_overrides[keys2[j]] = message.config_overrides[keys2[j]];
+ }
return object;
};
@@ -71439,6 +71758,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
* @property {tabletmanagerdata.TabletSelectionPreference|null} [tablet_selection_preference] UpdateVReplicationWorkflowRequest tablet_selection_preference
* @property {binlogdata.OnDDLAction|null} [on_ddl] UpdateVReplicationWorkflowRequest on_ddl
* @property {binlogdata.VReplicationWorkflowState|null} [state] UpdateVReplicationWorkflowRequest state
+ * @property {Object.|null} [config_overrides] UpdateVReplicationWorkflowRequest config_overrides
*/
/**
@@ -71452,6 +71772,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
function UpdateVReplicationWorkflowRequest(properties) {
this.cells = [];
this.tablet_types = [];
+ this.config_overrides = {};
if (properties)
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -71506,6 +71827,14 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
*/
UpdateVReplicationWorkflowRequest.prototype.state = null;
+ /**
+ * UpdateVReplicationWorkflowRequest config_overrides.
+ * @member {Object.} config_overrides
+ * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest
+ * @instance
+ */
+ UpdateVReplicationWorkflowRequest.prototype.config_overrides = $util.emptyObject;
+
// OneOf field names bound to virtual getters and setters
let $oneOfFields;
@@ -71583,6 +71912,9 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.on_ddl);
if (message.state != null && Object.hasOwnProperty.call(message, "state"))
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state);
+ if (message.config_overrides != null && Object.hasOwnProperty.call(message, "config_overrides"))
+ for (let keys = Object.keys(message.config_overrides), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.config_overrides[keys[i]]).ldelim();
return writer;
};
@@ -71613,7 +71945,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
UpdateVReplicationWorkflowRequest.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UpdateVReplicationWorkflowRequest();
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UpdateVReplicationWorkflowRequest(), key, value;
while (reader.pos < end) {
let tag = reader.uint32();
switch (tag >>> 3) {
@@ -71650,6 +71982,29 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
message.state = reader.int32();
break;
}
+ case 8: {
+ if (message.config_overrides === $util.emptyObject)
+ message.config_overrides = {};
+ let end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ let tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.config_overrides[key] = value;
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -71755,6 +72110,14 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
break;
}
}
+ if (message.config_overrides != null && message.hasOwnProperty("config_overrides")) {
+ if (!$util.isObject(message.config_overrides))
+ return "config_overrides: object expected";
+ let key = Object.keys(message.config_overrides);
+ for (let i = 0; i < key.length; ++i)
+ if (!$util.isString(message.config_overrides[key[i]]))
+ return "config_overrides: string{k:string} expected";
+ }
return null;
};
@@ -71916,6 +72279,13 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
message.state = 6;
break;
}
+ if (object.config_overrides) {
+ if (typeof object.config_overrides !== "object")
+ throw TypeError(".tabletmanagerdata.UpdateVReplicationWorkflowRequest.config_overrides: object expected");
+ message.config_overrides = {};
+ for (let keys = Object.keys(object.config_overrides), i = 0; i < keys.length; ++i)
+ message.config_overrides[keys[i]] = String(object.config_overrides[keys[i]]);
+ }
return message;
};
@@ -71936,6 +72306,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
object.cells = [];
object.tablet_types = [];
}
+ if (options.objects || options.defaults)
+ object.config_overrides = {};
if (options.defaults)
object.workflow = "";
if (message.workflow != null && message.hasOwnProperty("workflow"))
@@ -71965,6 +72337,12 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => {
if (options.oneofs)
object._state = "state";
}
+ let keys2;
+ if (message.config_overrides && (keys2 = Object.keys(message.config_overrides)).length) {
+ object.config_overrides = {};
+ for (let j = 0; j < keys2.length; ++j)
+ object.config_overrides[keys2[j]] = message.config_overrides[keys2[j]];
+ }
return object;
};
@@ -83495,6 +83873,7 @@ export const binlogdata = $root.binlogdata = (() => {
* @memberof binlogdata
* @interface IVStreamOptions
* @property {Array.|null} [internal_tables] VStreamOptions internal_tables
+ * @property {Object.|null} [config_overrides] VStreamOptions config_overrides
*/
/**
@@ -83507,6 +83886,7 @@ export const binlogdata = $root.binlogdata = (() => {
*/
function VStreamOptions(properties) {
this.internal_tables = [];
+ this.config_overrides = {};
if (properties)
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -83521,6 +83901,14 @@ export const binlogdata = $root.binlogdata = (() => {
*/
VStreamOptions.prototype.internal_tables = $util.emptyArray;
+ /**
+ * VStreamOptions config_overrides.
+ * @member {Object.} config_overrides
+ * @memberof binlogdata.VStreamOptions
+ * @instance
+ */
+ VStreamOptions.prototype.config_overrides = $util.emptyObject;
+
/**
* Creates a new VStreamOptions instance using the specified properties.
* @function create
@@ -83548,6 +83936,9 @@ export const binlogdata = $root.binlogdata = (() => {
if (message.internal_tables != null && message.internal_tables.length)
for (let i = 0; i < message.internal_tables.length; ++i)
writer.uint32(/* id 1, wireType 2 =*/10).string(message.internal_tables[i]);
+ if (message.config_overrides != null && Object.hasOwnProperty.call(message, "config_overrides"))
+ for (let keys = Object.keys(message.config_overrides), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.config_overrides[keys[i]]).ldelim();
return writer;
};
@@ -83578,7 +83969,7 @@ export const binlogdata = $root.binlogdata = (() => {
VStreamOptions.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamOptions();
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamOptions(), key, value;
while (reader.pos < end) {
let tag = reader.uint32();
switch (tag >>> 3) {
@@ -83588,6 +83979,29 @@ export const binlogdata = $root.binlogdata = (() => {
message.internal_tables.push(reader.string());
break;
}
+ case 2: {
+ if (message.config_overrides === $util.emptyObject)
+ message.config_overrides = {};
+ let end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ let tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.config_overrides[key] = value;
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -83630,6 +84044,14 @@ export const binlogdata = $root.binlogdata = (() => {
if (!$util.isString(message.internal_tables[i]))
return "internal_tables: string[] expected";
}
+ if (message.config_overrides != null && message.hasOwnProperty("config_overrides")) {
+ if (!$util.isObject(message.config_overrides))
+ return "config_overrides: object expected";
+ let key = Object.keys(message.config_overrides);
+ for (let i = 0; i < key.length; ++i)
+ if (!$util.isString(message.config_overrides[key[i]]))
+ return "config_overrides: string{k:string} expected";
+ }
return null;
};
@@ -83652,6 +84074,13 @@ export const binlogdata = $root.binlogdata = (() => {
for (let i = 0; i < object.internal_tables.length; ++i)
message.internal_tables[i] = String(object.internal_tables[i]);
}
+ if (object.config_overrides) {
+ if (typeof object.config_overrides !== "object")
+ throw TypeError(".binlogdata.VStreamOptions.config_overrides: object expected");
+ message.config_overrides = {};
+ for (let keys = Object.keys(object.config_overrides), i = 0; i < keys.length; ++i)
+ message.config_overrides[keys[i]] = String(object.config_overrides[keys[i]]);
+ }
return message;
};
@@ -83670,11 +84099,19 @@ export const binlogdata = $root.binlogdata = (() => {
let object = {};
if (options.arrays || options.defaults)
object.internal_tables = [];
+ if (options.objects || options.defaults)
+ object.config_overrides = {};
if (message.internal_tables && message.internal_tables.length) {
object.internal_tables = [];
for (let j = 0; j < message.internal_tables.length; ++j)
object.internal_tables[j] = message.internal_tables[j];
}
+ let keys2;
+ if (message.config_overrides && (keys2 = Object.keys(message.config_overrides)).length) {
+ object.config_overrides = {};
+ for (let j = 0; j < keys2.length; ++j)
+ object.config_overrides[keys2[j]] = message.config_overrides[keys2[j]];
+ }
return object;
};
@@ -84331,6 +84768,7 @@ export const binlogdata = $root.binlogdata = (() => {
* @property {query.ITarget|null} [target] VStreamRowsRequest target
* @property {string|null} [query] VStreamRowsRequest query
* @property {query.IQueryResult|null} [lastpk] VStreamRowsRequest lastpk
+ * @property {binlogdata.IVStreamOptions|null} [options] VStreamRowsRequest options
*/
/**
@@ -84388,6 +84826,14 @@ export const binlogdata = $root.binlogdata = (() => {
*/
VStreamRowsRequest.prototype.lastpk = null;
+ /**
+ * VStreamRowsRequest options.
+ * @member {binlogdata.IVStreamOptions|null|undefined} options
+ * @memberof binlogdata.VStreamRowsRequest
+ * @instance
+ */
+ VStreamRowsRequest.prototype.options = null;
+
/**
* Creates a new VStreamRowsRequest instance using the specified properties.
* @function create
@@ -84422,6 +84868,8 @@ export const binlogdata = $root.binlogdata = (() => {
writer.uint32(/* id 4, wireType 2 =*/34).string(message.query);
if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk"))
$root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.binlogdata.VStreamOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
return writer;
};
@@ -84476,6 +84924,10 @@ export const binlogdata = $root.binlogdata = (() => {
message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32());
break;
}
+ case 6: {
+ message.options = $root.binlogdata.VStreamOptions.decode(reader, reader.uint32());
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -84534,6 +84986,11 @@ export const binlogdata = $root.binlogdata = (() => {
if (error)
return "lastpk." + error;
}
+ if (message.options != null && message.hasOwnProperty("options")) {
+ let error = $root.binlogdata.VStreamOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
return null;
};
@@ -84571,6 +85028,11 @@ export const binlogdata = $root.binlogdata = (() => {
throw TypeError(".binlogdata.VStreamRowsRequest.lastpk: object expected");
message.lastpk = $root.query.QueryResult.fromObject(object.lastpk);
}
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".binlogdata.VStreamRowsRequest.options: object expected");
+ message.options = $root.binlogdata.VStreamOptions.fromObject(object.options);
+ }
return message;
};
@@ -84593,6 +85055,7 @@ export const binlogdata = $root.binlogdata = (() => {
object.target = null;
object.query = "";
object.lastpk = null;
+ object.options = null;
}
if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id"))
object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options);
@@ -84604,6 +85067,8 @@ export const binlogdata = $root.binlogdata = (() => {
object.query = message.query;
if (message.lastpk != null && message.hasOwnProperty("lastpk"))
object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options);
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.binlogdata.VStreamOptions.toObject(message.options, options);
return object;
};
@@ -85080,6 +85545,7 @@ export const binlogdata = $root.binlogdata = (() => {
* @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamTablesRequest effective_caller_id
* @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamTablesRequest immediate_caller_id
* @property {query.ITarget|null} [target] VStreamTablesRequest target
+ * @property {binlogdata.IVStreamOptions|null} [options] VStreamTablesRequest options
*/
/**
@@ -85121,6 +85587,14 @@ export const binlogdata = $root.binlogdata = (() => {
*/
VStreamTablesRequest.prototype.target = null;
+ /**
+ * VStreamTablesRequest options.
+ * @member {binlogdata.IVStreamOptions|null|undefined} options
+ * @memberof binlogdata.VStreamTablesRequest
+ * @instance
+ */
+ VStreamTablesRequest.prototype.options = null;
+
/**
* Creates a new VStreamTablesRequest instance using the specified properties.
* @function create
@@ -85151,6 +85625,8 @@ export const binlogdata = $root.binlogdata = (() => {
$root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
if (message.target != null && Object.hasOwnProperty.call(message, "target"))
$root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.binlogdata.VStreamOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
return writer;
};
@@ -85197,6 +85673,10 @@ export const binlogdata = $root.binlogdata = (() => {
message.target = $root.query.Target.decode(reader, reader.uint32());
break;
}
+ case 4: {
+ message.options = $root.binlogdata.VStreamOptions.decode(reader, reader.uint32());
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -85247,6 +85727,11 @@ export const binlogdata = $root.binlogdata = (() => {
if (error)
return "target." + error;
}
+ if (message.options != null && message.hasOwnProperty("options")) {
+ let error = $root.binlogdata.VStreamOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
return null;
};
@@ -85277,6 +85762,11 @@ export const binlogdata = $root.binlogdata = (() => {
throw TypeError(".binlogdata.VStreamTablesRequest.target: object expected");
message.target = $root.query.Target.fromObject(object.target);
}
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".binlogdata.VStreamTablesRequest.options: object expected");
+ message.options = $root.binlogdata.VStreamOptions.fromObject(object.options);
+ }
return message;
};
@@ -85297,6 +85787,7 @@ export const binlogdata = $root.binlogdata = (() => {
object.effective_caller_id = null;
object.immediate_caller_id = null;
object.target = null;
+ object.options = null;
}
if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id"))
object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options);
@@ -85304,6 +85795,8 @@ export const binlogdata = $root.binlogdata = (() => {
object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options);
if (message.target != null && message.hasOwnProperty("target"))
object.target = $root.query.Target.toObject(message.target, options);
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.binlogdata.VStreamOptions.toObject(message.options, options);
return object;
};
@@ -119354,6 +119847,7 @@ export const vtctldata = $root.vtctldata = (() => {
* @property {string|null} [tenant_id] WorkflowOptions tenant_id
* @property {boolean|null} [strip_sharded_auto_increment] WorkflowOptions strip_sharded_auto_increment
* @property {Array.|null} [shards] WorkflowOptions shards
+ * @property {Object.|null} [config] WorkflowOptions config
*/
/**
@@ -119366,6 +119860,7 @@ export const vtctldata = $root.vtctldata = (() => {
*/
function WorkflowOptions(properties) {
this.shards = [];
+ this.config = {};
if (properties)
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -119396,6 +119891,14 @@ export const vtctldata = $root.vtctldata = (() => {
*/
WorkflowOptions.prototype.shards = $util.emptyArray;
+ /**
+ * WorkflowOptions config.
+ * @member {Object.} config
+ * @memberof vtctldata.WorkflowOptions
+ * @instance
+ */
+ WorkflowOptions.prototype.config = $util.emptyObject;
+
/**
* Creates a new WorkflowOptions instance using the specified properties.
* @function create
@@ -119427,6 +119930,9 @@ export const vtctldata = $root.vtctldata = (() => {
if (message.shards != null && message.shards.length)
for (let i = 0; i < message.shards.length; ++i)
writer.uint32(/* id 3, wireType 2 =*/26).string(message.shards[i]);
+ if (message.config != null && Object.hasOwnProperty.call(message, "config"))
+ for (let keys = Object.keys(message.config), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.config[keys[i]]).ldelim();
return writer;
};
@@ -119457,7 +119963,7 @@ export const vtctldata = $root.vtctldata = (() => {
WorkflowOptions.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowOptions();
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.WorkflowOptions(), key, value;
while (reader.pos < end) {
let tag = reader.uint32();
switch (tag >>> 3) {
@@ -119475,6 +119981,29 @@ export const vtctldata = $root.vtctldata = (() => {
message.shards.push(reader.string());
break;
}
+ case 4: {
+ if (message.config === $util.emptyObject)
+ message.config = {};
+ let end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ let tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.config[key] = value;
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -119523,6 +120052,14 @@ export const vtctldata = $root.vtctldata = (() => {
if (!$util.isString(message.shards[i]))
return "shards: string[] expected";
}
+ if (message.config != null && message.hasOwnProperty("config")) {
+ if (!$util.isObject(message.config))
+ return "config: object expected";
+ let key = Object.keys(message.config);
+ for (let i = 0; i < key.length; ++i)
+ if (!$util.isString(message.config[key[i]]))
+ return "config: string{k:string} expected";
+ }
return null;
};
@@ -119549,6 +120086,13 @@ export const vtctldata = $root.vtctldata = (() => {
for (let i = 0; i < object.shards.length; ++i)
message.shards[i] = String(object.shards[i]);
}
+ if (object.config) {
+ if (typeof object.config !== "object")
+ throw TypeError(".vtctldata.WorkflowOptions.config: object expected");
+ message.config = {};
+ for (let keys = Object.keys(object.config), i = 0; i < keys.length; ++i)
+ message.config[keys[i]] = String(object.config[keys[i]]);
+ }
return message;
};
@@ -119567,6 +120111,8 @@ export const vtctldata = $root.vtctldata = (() => {
let object = {};
if (options.arrays || options.defaults)
object.shards = [];
+ if (options.objects || options.defaults)
+ object.config = {};
if (options.defaults) {
object.tenant_id = "";
object.strip_sharded_auto_increment = false;
@@ -119580,6 +120126,12 @@ export const vtctldata = $root.vtctldata = (() => {
for (let j = 0; j < message.shards.length; ++j)
object.shards[j] = message.shards[j];
}
+ let keys2;
+ if (message.config && (keys2 = Object.keys(message.config)).length) {
+ object.config = {};
+ for (let j = 0; j < keys2.length; ++j)
+ object.config[keys2[j]] = message.config[keys2[j]];
+ }
return object;
};
@@ -164250,6 +164802,7 @@ export const vtctldata = $root.vtctldata = (() => {
* @property {boolean|null} [stop_after_copy] ReshardCreateRequest stop_after_copy
* @property {boolean|null} [defer_secondary_keys] ReshardCreateRequest defer_secondary_keys
* @property {boolean|null} [auto_start] ReshardCreateRequest auto_start
+ * @property {vtctldata.IWorkflowOptions|null} [workflow_options] ReshardCreateRequest workflow_options
*/
/**
@@ -164367,6 +164920,14 @@ export const vtctldata = $root.vtctldata = (() => {
*/
ReshardCreateRequest.prototype.auto_start = false;
+ /**
+ * ReshardCreateRequest workflow_options.
+ * @member {vtctldata.IWorkflowOptions|null|undefined} workflow_options
+ * @memberof vtctldata.ReshardCreateRequest
+ * @instance
+ */
+ ReshardCreateRequest.prototype.workflow_options = null;
+
/**
* Creates a new ReshardCreateRequest instance using the specified properties.
* @function create
@@ -164422,6 +164983,8 @@ export const vtctldata = $root.vtctldata = (() => {
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.defer_secondary_keys);
if (message.auto_start != null && Object.hasOwnProperty.call(message, "auto_start"))
writer.uint32(/* id 12, wireType 0 =*/96).bool(message.auto_start);
+ if (message.workflow_options != null && Object.hasOwnProperty.call(message, "workflow_options"))
+ $root.vtctldata.WorkflowOptions.encode(message.workflow_options, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
return writer;
};
@@ -164517,6 +165080,10 @@ export const vtctldata = $root.vtctldata = (() => {
message.auto_start = reader.bool();
break;
}
+ case 13: {
+ message.workflow_options = $root.vtctldata.WorkflowOptions.decode(reader, reader.uint32());
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -164624,6 +165191,11 @@ export const vtctldata = $root.vtctldata = (() => {
if (message.auto_start != null && message.hasOwnProperty("auto_start"))
if (typeof message.auto_start !== "boolean")
return "auto_start: boolean expected";
+ if (message.workflow_options != null && message.hasOwnProperty("workflow_options")) {
+ let error = $root.vtctldata.WorkflowOptions.verify(message.workflow_options);
+ if (error)
+ return "workflow_options." + error;
+ }
return null;
};
@@ -164751,6 +165323,11 @@ export const vtctldata = $root.vtctldata = (() => {
message.defer_secondary_keys = Boolean(object.defer_secondary_keys);
if (object.auto_start != null)
message.auto_start = Boolean(object.auto_start);
+ if (object.workflow_options != null) {
+ if (typeof object.workflow_options !== "object")
+ throw TypeError(".vtctldata.ReshardCreateRequest.workflow_options: object expected");
+ message.workflow_options = $root.vtctldata.WorkflowOptions.fromObject(object.workflow_options);
+ }
return message;
};
@@ -164782,6 +165359,7 @@ export const vtctldata = $root.vtctldata = (() => {
object.stop_after_copy = false;
object.defer_secondary_keys = false;
object.auto_start = false;
+ object.workflow_options = null;
}
if (message.workflow != null && message.hasOwnProperty("workflow"))
object.workflow = message.workflow;
@@ -164819,6 +165397,8 @@ export const vtctldata = $root.vtctldata = (() => {
object.defer_secondary_keys = message.defer_secondary_keys;
if (message.auto_start != null && message.hasOwnProperty("auto_start"))
object.auto_start = message.auto_start;
+ if (message.workflow_options != null && message.hasOwnProperty("workflow_options"))
+ object.workflow_options = $root.vtctldata.WorkflowOptions.toObject(message.workflow_options, options);
return object;
};
diff --git a/web/vtadmin/src/util/time.ts b/web/vtadmin/src/util/time.ts
index c9f0017d011..82703d60281 100644
--- a/web/vtadmin/src/util/time.ts
+++ b/web/vtadmin/src/util/time.ts
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import * as dayjs from 'dayjs';
+import dayjs from 'dayjs';
import localizedFormat from 'dayjs/plugin/localizedFormat';
import relativeTime from 'dayjs/plugin/relativeTime';
@@ -44,3 +44,11 @@ export const formatRelativeTime = (timestamp: number | Long | null | undefined):
export const formatDateTimeShort = (timestamp: number | Long | null | undefined): string | null => {
return format(timestamp, 'MM/DD/YY HH:mm:ss Z');
};
+
+export const formatRelativeTimeInSeconds = (timestamp: number | Long | null | undefined): string | null => {
+ const u = parse(timestamp);
+ if (!u) return null;
+ const currentTime = dayjs();
+ const secondsElapsed = currentTime.diff(u, 'second');
+ return `${secondsElapsed} seconds ago`;
+};
diff --git a/web/vtadmin/src/util/transactions.ts b/web/vtadmin/src/util/transactions.ts
new file mode 100644
index 00000000000..10d18cb6173
--- /dev/null
+++ b/web/vtadmin/src/util/transactions.ts
@@ -0,0 +1,28 @@
+/**
+ * Copyright 2024 The Vitess Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { invertBy } from 'lodash-es';
+import { query } from '../proto/vtadmin';
+
+/**
+ * TRANSACTION_STATES maps numeric transaction state back to human readable strings.
+ */
+export const TRANSACTION_STATES = Object.entries(invertBy(query.TransactionState)).reduce((acc, [k, vs]) => {
+ acc[k] = vs[0];
+ return acc;
+}, {} as { [k: string]: string });
+
+export const formatTransactionState = (transaction: query.ITransactionMetadata) =>
+ transaction.state && TRANSACTION_STATES[transaction.state];