Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/utils/mutateInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ import * as is from 'is';
import {Mutation} from '../mutation';
import arrify = require('arrify');

/**
* Applies a set of changes to be atomically applied to the specified row(s).
* Mutations are applied in order, meaning that earlier mutations can be masked
* by later ones. This internal function handles the retry logic and metrics collection
* for the mutate operation.
*
* @param {TabularApiSurface} table The table or authorized view to perform the mutation on.
* @param {OperationMetricsCollector} metricsCollector The metrics collector for the operation.
* @param {Entry | Entry[]} entriesRaw List of entities to be inserted or deleted.
* @param {MutateOptions | MutateCallback} [optionsOrCallback] Configuration object or callback function.
* @param {MutateCallback} [cb] The callback function.
*/
export function mutateInternal(
table: TabularApiSurface,
metricsCollector: OperationMetricsCollector,
Expand Down
10 changes: 5 additions & 5 deletions system-test/client-side-metrics-all-methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getHandlerFromExporter(Exporter: typeof CloudMonitoringExporter) {
}).GCPMetricsHandler;
}

function readRowsAssertionCheck(
function metricsAssertionCheck(
projectId: string,
requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [],
method: string,
Expand Down Expand Up @@ -171,7 +171,7 @@ function checkMultiRowCall(
projectId: string,
requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [],
) {
readRowsAssertionCheck(
metricsAssertionCheck(
projectId,
requestsHandled,
'Bigtable.ReadRows',
Expand All @@ -183,7 +183,7 @@ function checkMutateRowsCall(
projectId: string,
requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [],
) {
readRowsAssertionCheck(
metricsAssertionCheck(
projectId,
requestsHandled,
'Bigtable.MutateRows',
Expand All @@ -195,7 +195,7 @@ function checkMutateRowCall(
projectId: string,
requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [],
) {
readRowsAssertionCheck(
metricsAssertionCheck(
projectId,
requestsHandled,
'Bigtable.MutateRow',
Expand All @@ -207,7 +207,7 @@ function checkSingleRowCall(
projectId: string,
requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [],
) {
readRowsAssertionCheck(
metricsAssertionCheck(
projectId,
requestsHandled,
'Bigtable.ReadRow',
Expand Down
Loading