Skip to content

Commit

Permalink
fix: using context from call in ReadRowsRetryingCallable (#2560)
Browse files Browse the repository at this point in the history
  • Loading branch information
isha97 authored Jul 19, 2024
1 parent 2f45fa2 commit eeb19b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ public void call(
ReadRowsRequest request,
final ResponseObserver<ReadRowsResponse> responseObserver,
ApiCallContext context) {
ApiCallContext actualContext = this.context.merge(context);
ReadRowsAttemptCallable attemptCallable =
new ReadRowsAttemptCallable(
innerCallable,
resumptionStrategyPrototype.createNew(),
request,
this.context,
actualContext,
responseObserver);

RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, this.context);
RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, actualContext);
attemptCallable.setExternalFuture(retryingFuture);
attemptCallable.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ public void call(
ReadRowsRequest request,
final ResponseObserver<ReadRowsResponse> responseObserver,
ApiCallContext context) {
ApiCallContext actualContext = this.context.merge(context);
ReadRowsAttemptCallable attemptCallable =
new ReadRowsAttemptCallable(
innerCallable,
resumptionStrategyPrototype.createNew(),
request,
this.context,
actualContext,
responseObserver);

RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, this.context);
RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, actualContext);
attemptCallable.setExternalFuture(retryingFuture);
attemptCallable.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ public void call(
ReadRowsRequest request,
final ResponseObserver<ReadRowsResponse> responseObserver,
ApiCallContext context) {
ApiCallContext actualContext = this.context.merge(context);
ReadRowsAttemptCallable attemptCallable =
new ReadRowsAttemptCallable(
innerCallable,
resumptionStrategyPrototype.createNew(),
request,
this.context,
actualContext,
responseObserver);

RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, this.context);
RetryingFuture<Void> retryingFuture = executor.createFuture(attemptCallable, actualContext);
attemptCallable.setExternalFuture(retryingFuture);
attemptCallable.start();

Expand Down

0 comments on commit eeb19b7

Please sign in to comment.