This repository was archived by the owner on Apr 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,16 +367,14 @@ public void halfClose() {
367367 public void cancel (@ Nullable String message , @ Nullable Throwable cause ) {
368368 if (delegate != null ) {
369369 delegate .cancel (message , cause );
370- } else if (responseListener != null ) {
371- responseListener .onClose (
372- io .grpc .Status .CANCELLED .withDescription (message ).withCause (cause ), new Metadata ());
373- cancelled = true ;
374- cancelMessage = message ;
375- cancelCause = cause ;
376370 } else {
377371 cancelled = true ;
378372 cancelMessage = message ;
379373 cancelCause = cause ;
374+ if (responseListener != null ) {
375+ responseListener .onClose (
376+ io .grpc .Status .CANCELLED .withDescription (message ).withCause (cause ), new Metadata ());
377+ }
380378 }
381379 }
382380
@@ -493,6 +491,9 @@ public void onMessage(ResponseT message) {
493491 transactionId = transactionIdFromMetadata (response );
494492 } else if (message instanceof ResultSet ) {
495493 ResultSet response = (ResultSet ) message ;
494+ if (response .hasCacheUpdate () && call .channelFinder != null ) {
495+ call .channelFinder .update (response .getCacheUpdate ());
496+ }
496497 transactionId = transactionIdFromMetadata (response );
497498 } else if (message instanceof Transaction ) {
498499 Transaction response = (Transaction ) message ;
You can’t perform that action at this time.
0 commit comments