Skip to content

Commit e8bfb49

Browse files
committed
Merge branch 'main' of github.com:googleapis/java-datastore into mutli-db-to-main
2 parents 4ce03c2 + 1d77292 commit e8bfb49

File tree

19 files changed

+1160
-48
lines changed

19 files changed

+1160
-48
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [2.14.7](https://github.com/googleapis/java-datastore/compare/v2.14.6...v2.14.7) (2023-05-29)
4+
5+
6+
### Documentation
7+
8+
* Marking Transaction, Batch and DatastoreBatchWriter class with 'NotThreadSafe' annotation ([#1082](https://github.com/googleapis/java-datastore/issues/1082)) ([9e96650](https://github.com/googleapis/java-datastore/commit/9e966506c1e860f10e82d34bd6a705c1cae71764))
9+
10+
11+
### Dependencies
12+
13+
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.10.0 ([#1085](https://github.com/googleapis/java-datastore/issues/1085)) ([47df1b8](https://github.com/googleapis/java-datastore/commit/47df1b8a4b54eae0bb42e261e02d64aee7b95e7a))
14+
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.10.1 ([#1086](https://github.com/googleapis/java-datastore/issues/1086)) ([e3ad866](https://github.com/googleapis/java-datastore/commit/e3ad86614a2462054bfb800613f2456f6f98102d))
15+
* Update dependency com.google.errorprone:error_prone_core to v2.19.1 ([#1069](https://github.com/googleapis/java-datastore/issues/1069)) ([2390016](https://github.com/googleapis/java-datastore/commit/239001682bd1284be39d4646ce0594274070c143))
16+
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.22 ([#1074](https://github.com/googleapis/java-datastore/issues/1074)) ([c0cc456](https://github.com/googleapis/java-datastore/commit/c0cc4565cc0e34098f5bc97c031ae671af44fcf3))
17+
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.22 ([#1075](https://github.com/googleapis/java-datastore/issues/1075)) ([a4db895](https://github.com/googleapis/java-datastore/commit/a4db89502e9611bf5f9760bfceb1025cc99a9830))
18+
319
## [2.14.6](https://github.com/googleapis/java-datastore/compare/v2.14.5...v2.14.6) (2023-05-09)
420

521

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.15.0</version>
22+
<version>26.16.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -42,28 +42,28 @@ If you are using Maven without the BOM, add this to your dependencies:
4242
<dependency>
4343
<groupId>com.google.cloud</groupId>
4444
<artifactId>google-cloud-datastore</artifactId>
45-
<version>2.14.6</version>
45+
<version>2.14.7</version>
4646
</dependency>
4747

4848
```
4949

5050
If you are using Gradle 5.x or later, add this to your dependencies:
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.15.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.16.0')
5454
5555
implementation 'com.google.cloud:google-cloud-datastore'
5656
```
5757
If you are using Gradle without BOM, add this to your dependencies:
5858

5959
```Groovy
60-
implementation 'com.google.cloud:google-cloud-datastore:2.14.6'
60+
implementation 'com.google.cloud:google-cloud-datastore:2.14.7'
6161
```
6262

6363
If you are using SBT, add this to your dependencies:
6464

6565
```Scala
66-
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.14.6"
66+
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.14.7"
6767
```
6868
<!-- {x-version-update-end} -->
6969

@@ -370,7 +370,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
370370
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datastore/java11.html
371371
[stability-image]: https://img.shields.io/badge/stability-stable-green
372372
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datastore.svg
373-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastore/2.14.6
373+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastore/2.14.7
374374
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
375375
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
376376
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

datastore-v1-proto-client/pom.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<modelVersion>4.0.0</modelVersion>
2020
<groupId>com.google.cloud.datastore</groupId>
2121
<artifactId>datastore-v1-proto-client</artifactId>
22-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
22+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
2323

2424
<parent>
2525
<groupId>com.google.cloud</groupId>
2626
<artifactId>google-cloud-datastore-parent</artifactId>
27-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
27+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
2828
</parent>
2929

3030
<packaging>jar</packaging>
@@ -98,7 +98,7 @@
9898
<dependency>
9999
<groupId>com.google.truth</groupId>
100100
<artifactId>truth</artifactId>
101-
<version>1.1.3</version>
101+
<version>1.1.4</version>
102102
<scope>test</scope>
103103
<exclusions>
104104
<exclusion>
@@ -121,4 +121,14 @@
121121
</plugins>
122122
</build>
123123

124+
<profiles>
125+
<profile>
126+
<id>native</id>
127+
<properties>
128+
<!-- skip native tests for this module, it will be tested in google-cloud-datastore-->
129+
<skipTests>true</skipTests>
130+
</properties>
131+
</profile>
132+
</profiles>
133+
124134
</project>

google-cloud-datastore-bom/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-datastore-bom</artifactId>
6-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
6+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
77
<packaging>pom</packaging>
88
<parent>
99
<groupId>com.google.cloud</groupId>
1010
<artifactId>google-cloud-shared-config</artifactId>
11-
<version>1.5.5</version>
11+
<version>1.5.6</version>
1212
</parent>
1313

1414
<name>Google Cloud datastore BOM</name>
@@ -52,22 +52,22 @@
5252
<dependency>
5353
<groupId>com.google.cloud</groupId>
5454
<artifactId>google-cloud-datastore</artifactId>
55-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
55+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
5656
</dependency>
5757
<dependency>
5858
<groupId>com.google.api.grpc</groupId>
5959
<artifactId>grpc-google-cloud-datastore-admin-v1</artifactId>
60-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-datastore-admin-v1:current} -->
60+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-datastore-admin-v1:current} -->
6161
</dependency>
6262
<dependency>
6363
<groupId>com.google.api.grpc</groupId>
6464
<artifactId>proto-google-cloud-datastore-v1</artifactId>
65-
<version>0.105.7-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
65+
<version>0.105.8-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
6666
</dependency>
6767
<dependency>
6868
<groupId>com.google.api.grpc</groupId>
6969
<artifactId>proto-google-cloud-datastore-admin-v1</artifactId>
70-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-admin-v1:current} -->
70+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-admin-v1:current} -->
7171
</dependency>
7272
</dependencies>
7373
</dependencyManagement>

google-cloud-datastore/pom.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-datastore</artifactId>
5-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
5+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud Datastore</name>
88
<url>https://github.com/googleapis/java-datastore</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-datastore-parent</artifactId>
15-
<version>2.14.7-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
15+
<version>2.14.8-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-datastore</site.installationModule>
@@ -106,6 +106,10 @@
106106
<groupId>io.opencensus</groupId>
107107
<artifactId>opencensus-api</artifactId>
108108
</dependency>
109+
<dependency>
110+
<groupId>com.google.code.findbugs</groupId>
111+
<artifactId>jsr305</artifactId>
112+
</dependency>
109113

110114
<!-- Test dependencies -->
111115
<dependency>
@@ -146,7 +150,7 @@
146150
<dependency>
147151
<groupId>com.google.truth</groupId>
148152
<artifactId>truth</artifactId>
149-
<version>1.1.3</version>
153+
<version>1.1.4</version>
150154
<scope>test</scope>
151155
</dependency>
152156
</dependencies>
@@ -159,4 +163,16 @@
159163
</plugin>
160164
</plugins>
161165
</build>
166+
<profiles>
167+
<profile>
168+
<id>native</id>
169+
<properties>
170+
<!--
171+
Override the default match pattern for native image tests since we have a custom
172+
test specifically for native image validation.
173+
-->
174+
<test>com.google.cloud.datastore.it.ITDatastoreConceptsTest</test>
175+
</properties>
176+
</profile>
177+
</profiles>
162178
</project>

google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.datastore;
1818

1919
import java.util.List;
20+
import javax.annotation.concurrent.NotThreadSafe;
2021

2122
/**
2223
* An interface to represent a batch of write operations. Any write operation that is applied on a
@@ -32,7 +33,15 @@
3233
* batch.add(entity2, entity3);
3334
* batch.submit();
3435
* }</pre>
36+
*
37+
* <p><b> WARNING: This class maintains an internal state in terms of {@link
38+
* java.util.LinkedHashMap} and {@link java.util.LinkedHashSet} which gets updated on every method
39+
* call performing CRUD operations to record the mutations. Since {@link java.util.LinkedHashMap} is
40+
* not thread safe as per its <a
41+
* href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html">documentation</a>,
42+
* This class too should not be treated as a thread safe class. </b>
3543
*/
44+
@NotThreadSafe
3645
public interface Batch extends DatastoreBatchWriter {
3746

3847
interface Response {

google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreBatchWriter.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,20 @@
1717
package com.google.cloud.datastore;
1818

1919
import java.util.List;
20+
import javax.annotation.concurrent.NotThreadSafe;
2021

2122
/**
2223
* An interface to represent a batch of write operations. All write operation for a batch writer
2324
* will be applied to the Datastore in one RPC call.
25+
*
26+
* <p><b> WARNING: This class maintains an internal state in terms of {@link
27+
* java.util.LinkedHashMap} and {@link java.util.LinkedHashSet} which gets updated on every method
28+
* call performing CRUD operations to record the mutations. Since {@link java.util.LinkedHashMap} is
29+
* not thread safe as per its <a
30+
* href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html">documentation</a>,
31+
* This class too should not be treated as a thread safe class. </b>
2432
*/
33+
@NotThreadSafe
2534
public interface DatastoreBatchWriter extends DatastoreWriter {
2635

2736
/**

google-cloud-datastore/src/main/java/com/google/cloud/datastore/Transaction.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
import com.google.protobuf.ByteString;
2020
import java.util.Iterator;
2121
import java.util.List;
22+
import javax.annotation.concurrent.NotThreadSafe;
2223

2324
/**
2425
* A Google cloud datastore transaction. Similar to {@link Batch} any write operation that is
2526
* applied on a transaction will only be sent to the Datastore upon {@link #commit}. A call to
2627
* {@link #rollback} will invalidate the transaction and discard the changes. Any read operation
2728
* that is done by a transaction will be part of it and therefore a {@code commit} is guaranteed to
28-
* fail if an entity was modified outside of the transaction after it was read. Write operation on
29-
* this transaction will not be reflected by read operation (as the changes are only sent to the
29+
* fail if an entity was modified outside the transaction after it was read. Write operation on this
30+
* transaction will not be reflected by read operation (as the changes are only sent to the
3031
* Datastore upon {@code commit}. A usage example:
3132
*
3233
* <pre>{@code
@@ -52,7 +53,14 @@
5253
*
5354
* @see <a href="https://cloud.google.com/datastore/docs/concepts/transactions">Google Cloud
5455
* Datastore transactions</a>
56+
* <p><b> WARNING: This class maintains an internal state in terms of {@link
57+
* java.util.LinkedHashMap} and {@link java.util.LinkedHashSet} which gets updated on every
58+
* method call performing CRUD operations to record the mutations. Since {@link
59+
* java.util.LinkedHashMap} is not thread safe as per its <a
60+
* href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html">documentation</a>,
61+
* This class too should not be treated as a thread safe class. </b>
5562
*/
63+
@NotThreadSafe
5664
public interface Transaction extends DatastoreBatchWriter, DatastoreReaderWriter {
5765

5866
interface Response {

0 commit comments

Comments
 (0)