Skip to content

Commit 0d9d2ea

Browse files
committed
Merge branch 'main' into PR #4026 to update
2 parents 4f93d5d + 18293ba commit 0d9d2ea

22 files changed

+12183
-660
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

77
# The @googleapis/spanner-client-libraries-java is the default owner for changes in this repo
8-
* @googleapis/yoshi-java @googleapis/spanner-client-libraries-java
8+
* @googleapis/cloud-sdk-java-team @googleapis/spanner-client-libraries-java

google-cloud-spanner/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525

2626

2727
<build>
28+
<extensions>
29+
<extension>
30+
<groupId>kr.motd.maven</groupId>
31+
<artifactId>os-maven-plugin</artifactId>
32+
<version>1.7.1</version>
33+
</extension>
34+
</extensions>
2835
<plugins>
2936
<plugin>
3037
<groupId>org.jacoco</groupId>
@@ -147,6 +154,25 @@
147154
<excludes>com/google/cloud/spanner/spi/v1/**</excludes>
148155
</configuration>
149156
</plugin>
157+
<plugin>
158+
<groupId>org.xolstice.maven.plugins</groupId>
159+
<artifactId>protobuf-maven-plugin</artifactId>
160+
<version>0.6.1</version>
161+
<configuration>
162+
<protocArtifact>com.google.protobuf:protoc:4.33.2:exe:${os.detected.classifier}</protocArtifact>
163+
<additionalProtoPathElements>
164+
<additionalProtoPathElement>${project.basedir}/../proto-google-cloud-spanner-v1/src/main/proto</additionalProtoPathElement>
165+
</additionalProtoPathElements>
166+
</configuration>
167+
<executions>
168+
<execution>
169+
<id>test-compile</id>
170+
<goals>
171+
<goal>test-compile</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
150176
</plugins>
151177
<pluginManagement>
152178
<plugins>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,15 @@ ByteString getTransactionId() {
404404
}
405405
}
406406

407+
@Override
408+
public void close() {
409+
ByteString id = getTransactionId();
410+
if (id != null && !id.isEmpty()) {
411+
rpc.clearTransactionAffinity(id);
412+
}
413+
super.close();
414+
}
415+
407416
/**
408417
* Initializes the transaction with the timestamp specified within MultiUseReadOnlyTransaction.
409418
* This is used only for fallback of PartitionQueryRequest and PartitionReadRequest with

0 commit comments

Comments
 (0)