Skip to content

Conversation

@arpan14
Copy link
Contributor

@arpan14 arpan14 commented Nov 14, 2023

Issue - When we invoke copyBackup RPC across two different instances, we are getting the below error. The PR first reproduces the error and then provides a fix. This PR removes the validation checks in client in favor of validation checks implemented on server. Also added an unit test (which was earlier failing)

.util.concurrent.ExecutionException: com.google.cloud.spanner.SpannerException: UNKNOWN: The instance of the source database must be equal to the instance of the backup.	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:592)	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:551)	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)	at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:67)	at com.google.api.gax.longrunning.OperationFutureImpl.get(OperationFutureImpl.java:125)	at com.google.cloud.spanner.DatabaseAdminClientImplTest.copyBackupWithBackupObject(DatabaseAdminClientImplTest.java:597)	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.base/java.lang.reflect.Method.invoke(Method.java:568)	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) 
@arpan14 arpan14 requested a review from a team as a code owner November 14, 2023 05:55
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Nov 14, 2023
@arpan14 arpan14 marked this pull request as draft November 14, 2023 05:56
@arpan14 arpan14 marked this pull request as ready for review November 14, 2023 06:54
@arpan14 arpan14 added the owlbot:run Add this label to trigger the Owlbot post processor. label Nov 14, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Nov 14, 2023
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner November 14, 2023 17:08
@arpan14 arpan14 merged commit 7f6b158 into googleapis:main Nov 14, 2023
@arpan14 arpan14 deleted the backup-bug branch November 14, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.

2 participants