Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit c86d456

Browse files
Revert "fix: Remove custom readrows retry logic and rely on gax for retries" (#1434)
* Revert "fix: Remove custom readrows retry logic and rely on gax for retries (…" This reverts commit 3e0a46e. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3e0a46e commit c86d456

12 files changed

Lines changed: 732 additions & 1520 deletions

File tree

src/index.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface RequestOptions {
6969
| 'BigtableTableAdminClient'
7070
| 'BigtableClient';
7171
reqOpts?: {};
72+
retryOpts?: {};
7273
gaxOpts?: {};
7374
method?: string;
7475
}
@@ -444,11 +445,6 @@ export class Bigtable {
444445
{},
445446
baseOptions,
446447
{
447-
// Setting gaxServerStreamingRetries to true ensures that for readrows,
448-
// sampleRowKeys, mutateRows, generateInitialChangeStreamPartitions and
449-
// readChangeStream calls in the data client that the new streaming
450-
// retries functionality will be used.
451-
gaxServerStreamingRetries: true,
452448
servicePath: customEndpointBaseUrl || defaultBaseUrl,
453449
'grpc.callInvocationTransformer': grpcGcp.gcpCallInvocationTransformer,
454450
'grpc.channelFactoryOverride': grpcGcp.gcpChannelFactoryOverride,
@@ -850,6 +846,18 @@ export class Bigtable {
850846
}
851847

852848
function makeRequestStream() {
849+
const retryRequestOptions = Object.assign(
850+
{
851+
currentRetryAttempt: 0,
852+
noResponseRetries: 0,
853+
objectMode: true,
854+
},
855+
config.retryOpts
856+
);
857+
858+
config.gaxOpts = Object.assign(config.gaxOpts || {}, {
859+
retryRequestOptions,
860+
});
853861
prepareGaxRequest((err, requestFn) => {
854862
if (err) {
855863
stream.destroy(err);

0 commit comments

Comments
 (0)