Skip to content

Commit

Permalink
Make a copy of the gaxOpts parameter
Browse files Browse the repository at this point in the history
Don’t modify the gaxOptions parameter in place and pass it down. This change makes it so that changes to gax options downstream will not affect gaxOptions in this layer of the call stack which is desirable and which also allows the failing test to pass.
  • Loading branch information
danieljbruce committed Jan 22, 2024
1 parent 9d80615 commit aa0c46b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
reqOpts.rowsLimit = rowsLimit - rowsRead;
}

options.gaxOptions = populateAttemptHeader(
const gaxOpts = populateAttemptHeader(
numRequestsMade,
options.gaxOptions
);
Expand All @@ -903,7 +903,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
client: 'BigtableClient',
method: 'readRows',
reqOpts,
gaxOpts: options.gaxOptions,
gaxOpts,
retryOpts,
});

Expand Down

0 comments on commit aa0c46b

Please sign in to comment.