Skip to content

Commit af8b46f

Browse files
authored
Merge branch 'main' into renovate/org.easymock-easymock-5.x
2 parents db9841a + 3de67d5 commit af8b46f

File tree

26 files changed

+241
-166
lines changed

26 files changed

+241
-166
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,4 @@ updates:
1717
# If a security vulnerability comes in, we will be notified about
1818
# it via template in the synthtool repository.
1919
ignore:
20-
- dependency-name: "*"
21-
22-
# rules for the `V3-experimental` branch
23-
- package-ecosystem: maven
24-
directory: "/"
25-
schedule:
26-
interval: daily
27-
commit-message:
28-
# Prefix all commit messages with "deps: "
29-
prefix: "deps"
30-
open-pull-requests-limit: 10
31-
target-branch: "V3-experimental"
20+
- dependency-name: "*"

.github/sync-repo-settings.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ branchProtectionRules:
1818
- 'Kokoro - Test: Java GraalVM Native Image'
1919
- 'Kokoro - Test: Java 17 GraalVM Native Image'
2020
- javadoc
21+
- library_generation
22+
- unmanaged_dependency_check
2123
- pattern: 1.106.5-sp
2224
isAdminEnforced: true
2325
requiredApprovingReviewCount: 1
@@ -107,22 +109,6 @@ branchProtectionRules:
107109
- cla/google
108110
- 'Kokoro - Test: Java GraalVM Native Image'
109111
- 'Kokoro - Test: Java 17 GraalVM Native Image'
110-
- pattern: V3-experimental
111-
isAdminEnforced: true
112-
requiredApprovingReviewCount: 1
113-
requiresCodeOwnerReviews: true
114-
requiresStrictStatusChecks: false
115-
requiredStatusCheckContexts:
116-
- dependencies (17)
117-
- lint
118-
- clirr
119-
- units (8)
120-
- units (11)
121-
- 'Kokoro - Test: Integration'
122-
- cla/google
123-
- 'Kokoro - Test: Java GraalVM Native Image'
124-
- 'Kokoro - Test: Java 17 GraalVM Native Image'
125-
- javadoc
126112
- pattern: 2.15.x
127113
isAdminEnforced: true
128114
requiredApprovingReviewCount: 1

.readme-partials.yaml

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -110,28 +110,33 @@ custom_content: |
110110
-------
111111
In this feature launch, the [Java Datastore client](https://github.com/googleapis/java-datastore) now offers gRPC as a transport layer option with experimental support. Using [gRPC connection pooling](https://grpc.io/docs/guides/performance/) enables distributing RPCs over multiple connections which may improve performance.
112112
113-
#### Download Instructions
114-
Instructions:
115-
1. Clone the grpc-experimental branch from GitHub:
116-
```python
117-
git clone -b grpc-experimental https://github.com/googleapis/java-datastore.git
118-
```
119-
2. Run the following commands to build the library:
120-
```python
121-
# Go to the directory the code was downloaded to
122-
cd java-datastore/
123-
124-
# Build the library
125-
mvn clean install -DskipTests=true
126-
```
127-
3. Add the following dependency to your project:
128-
```xml
129-
<dependency>
113+
#### Installation Instructions
114+
The client can be built from the `grpc-experimental` branch on GitHub. For private preview, you can also download the artifact with the instructions provided below.
115+
116+
1. Download the datastore private preview package with dependencies:
117+
```
118+
curl -o <path-to-downloaded-jar> https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
119+
```
120+
2. Run the following commands to install JDK locally:
121+
```
122+
mvn install:install-file -Dfile=<path-to-downloaded-jar> -DgroupId=com.google.cloud -DartifactId=google-cloud-datastore -Dversion=2.20.0-grpc
123+
```
124+
3. Edit your pom.xml to add above package to `<dependencies/>` section:
125+
```xml
126+
<dependency>
130127
<groupId>com.google.cloud</groupId>
131128
<artifactId>google-cloud-datastore</artifactId>
132129
<version>2.20.0-grpc-experimental-1-SNAPSHOT</version>
133-
</dependency>
134-
```
130+
</dependency>
131+
```
132+
133+
And if you have not yet, add below to `<repositories/>` section:
134+
```xml
135+
<repository>
136+
<id>local-repo</id>
137+
<url>file://${user.home}/.m2/repository</url>
138+
</repository>
139+
```
135140
136141
#### How to Use
137142
To opt-in to the gRPC transport behavior, simply add the below line of code (`setTransportOptions`) to your Datastore client instantiation.
@@ -181,11 +186,44 @@ custom_content: |
181186
#### New Features
182187
There are new gRPC specific features available to use in this update.
183188
184-
##### Channel Pooling
185-
To customize the number of channels your client uses, you can update the channel provider in the DatastoreOptions.
189+
##### Connection Pool
190+
A connection pool, also known as a channel pool, is a cache of database connections that are shared and reused to improve connection latency and performance. With this update, now you will be able to configure the channel pool to improve application performance. This section guides you in determining the optimal connection pool size and configuring it within the Java datastore client.
191+
To customize the number of channels your client uses, you can update the channel provider in the DatastoreOptions.
192+
###### Determine the best connection pool size
193+
The default connection pool size is right for most applications, and in most cases there's no need to change it.
194+
195+
However sometimes you may want to change your connection pool size due to high throughput or buffered requests. Ideally, to leave room for traffic fluctuations, a connection pool has about twice the number of connections it takes for maximum saturation. Because a connection can handle a maximum of 100 concurrent requests, between 10 and 50 outstanding requests per connection is optimal. The limit of 100 concurrent streams per gRPC connection is enforced in Google's middleware layer, and you are not able to reconfigure this number.
196+
197+
The following steps help you calculate the optimal number of connections in your channel pool using estimate per-client QPS and average latency numbers.
198+
199+
To calculate the optimal connections, gather the following information:
200+
201+
1. The maximum number of queries per second (QPS) per client when your application is running a typical workload.
202+
2. The average latency (the response time for a single request) in ms.
203+
3. Determine the number of requests that you can send serially per second by dividing 1,000 by the average latency value.
204+
4. Divide the QPS in seconds by the number of serial requests per second.
205+
5. Divide the result by 50 requests per channel to determine the minimum optimal channel pool size. (If your calculation is less than 2, use at least 2 channels anyway, to ensure redundancy.)
206+
6. Divide the same result by 10 requests per channel to determine the maximum optimal channel pool size.
207+
208+
These steps are expressed in the following equations:
209+
```java
210+
(QPS ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
211+
(QPS ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
212+
```
213+
214+
###### Example
215+
Your application typically sends 50,000 requests per second, and the average latency is 10 ms. Divide 1,000 by 10 ms to determine that you can send 100 requests serially per second.
216+
Divide that number into 50,000 to get the parallelism needed to send 50,000 QPS: 500. Each channel can have at most 100 requests out concurrently, and your target channel utilization
217+
is between 10 and 50 concurrent streams. Therefore, to calculate the minimum, divide 500 by 50 to get 10. To find the maximum, divide 500 by 10 to get 50. This means that your channel
218+
pool size for this example should be between 10 and 50 connections.
219+
220+
It is also important to monitor your traffic after making changes and adjust the number of connections in your pool if necessary.
221+
222+
###### Set the pool size
223+
The following code sample demonstrates how to configure the channel pool in the client libraries using `DatastoreOptions`.
186224
See [ChannelPoolSettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.grpc.ChannelPoolSettings) and [Performance Best Practices](https://grpc.io/docs/guides/performance/) for more information on channel pools and best practices for performance.
187225
188-
Example:
226+
Code Example
189227
```java
190228
InstantiatingGrpcChannelProvider channelProvider =
191229
DatastoreSettings.defaultGrpcTransportProviderBuilder()

CHANGELOG.md

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

3+
## [2.24.3](https://github.com/googleapis/java-datastore/compare/v2.24.2...v2.24.3) (2024-11-18)
4+
5+
6+
### Dependencies
7+
8+
* Update sdk platform java dependencies ([#1662](https://github.com/googleapis/java-datastore/issues/1662)) ([b4d3ab9](https://github.com/googleapis/java-datastore/commit/b4d3ab9a72bb2a4dff59bf54abcc5d9536b2596b))
9+
310
## [2.24.2](https://github.com/googleapis/java-datastore/compare/v2.24.1...v2.24.2) (2024-11-06)
411

512

README.md

Lines changed: 64 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ If you are using Maven without the BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.50.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.51.0')
5353
5454
implementation 'com.google.cloud:google-cloud-datastore'
5555
```
5656
If you are using Gradle without BOM, add this to your dependencies:
5757

5858
```Groovy
59-
implementation 'com.google.cloud:google-cloud-datastore:2.24.2'
59+
implementation 'com.google.cloud:google-cloud-datastore:2.24.3'
6060
```
6161

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

6464
```Scala
65-
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.24.2"
65+
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.24.3"
6666
```
6767

6868
## Authentication
@@ -208,28 +208,33 @@ gRPC Java Datastore Client User Guide
208208
-------
209209
In this feature launch, the [Java Datastore client](https://github.com/googleapis/java-datastore) now offers gRPC as a transport layer option with experimental support. Using [gRPC connection pooling](https://grpc.io/docs/guides/performance/) enables distributing RPCs over multiple connections which may improve performance.
210210

211-
#### Download Instructions
212-
Instructions:
213-
1. Clone the grpc-experimental branch from GitHub:
214-
```python
215-
git clone -b grpc-experimental https://github.com/googleapis/java-datastore.git
216-
```
217-
2. Run the following commands to build the library:
218-
```python
219-
# Go to the directory the code was downloaded to
220-
cd java-datastore/
221-
222-
# Build the library
223-
mvn clean install -DskipTests=true
224-
```
225-
3. Add the following dependency to your project:
226-
```xml
227-
<dependency>
211+
#### Installation Instructions
212+
The client can be built from the `grpc-experimental` branch on GitHub. For private preview, you can also download the artifact with the instructions provided below.
213+
214+
1. Download the datastore private preview package with dependencies:
215+
```
216+
curl -o <path-to-downloaded-jar> https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
217+
```
218+
2. Run the following commands to install JDK locally:
219+
```
220+
mvn install:install-file -Dfile=<path-to-downloaded-jar> -DgroupId=com.google.cloud -DartifactId=google-cloud-datastore -Dversion=2.20.0-grpc
221+
```
222+
3. Edit your pom.xml to add above package to `<dependencies/>` section:
223+
```xml
224+
<dependency>
228225
<groupId>com.google.cloud</groupId>
229226
<artifactId>google-cloud-datastore</artifactId>
230227
<version>2.20.0-grpc-experimental-1-SNAPSHOT</version>
231-
</dependency>
232-
```
228+
</dependency>
229+
```
230+
231+
And if you have not yet, add below to `<repositories/>` section:
232+
```xml
233+
<repository>
234+
<id>local-repo</id>
235+
<url>file://${user.home}/.m2/repository</url>
236+
</repository>
237+
```
233238

234239
#### How to Use
235240
To opt-in to the gRPC transport behavior, simply add the below line of code (`setTransportOptions`) to your Datastore client instantiation.
@@ -279,11 +284,44 @@ boolean isHTTP = datastore.getOptions().getTransportOptions() instanceof HTTPTra
279284
#### New Features
280285
There are new gRPC specific features available to use in this update.
281286

282-
##### Channel Pooling
283-
To customize the number of channels your client uses, you can update the channel provider in the DatastoreOptions.
287+
##### Connection Pool
288+
A connection pool, also known as a channel pool, is a cache of database connections that are shared and reused to improve connection latency and performance. With this update, now you will be able to configure the channel pool to improve application performance. This section guides you in determining the optimal connection pool size and configuring it within the Java datastore client.
289+
To customize the number of channels your client uses, you can update the channel provider in the DatastoreOptions.
290+
###### Determine the best connection pool size
291+
The default connection pool size is right for most applications, and in most cases there's no need to change it.
292+
293+
However sometimes you may want to change your connection pool size due to high throughput or buffered requests. Ideally, to leave room for traffic fluctuations, a connection pool has about twice the number of connections it takes for maximum saturation. Because a connection can handle a maximum of 100 concurrent requests, between 10 and 50 outstanding requests per connection is optimal. The limit of 100 concurrent streams per gRPC connection is enforced in Google's middleware layer, and you are not able to reconfigure this number.
294+
295+
The following steps help you calculate the optimal number of connections in your channel pool using estimate per-client QPS and average latency numbers.
296+
297+
To calculate the optimal connections, gather the following information:
298+
299+
1. The maximum number of queries per second (QPS) per client when your application is running a typical workload.
300+
2. The average latency (the response time for a single request) in ms.
301+
3. Determine the number of requests that you can send serially per second by dividing 1,000 by the average latency value.
302+
4. Divide the QPS in seconds by the number of serial requests per second.
303+
5. Divide the result by 50 requests per channel to determine the minimum optimal channel pool size. (If your calculation is less than 2, use at least 2 channels anyway, to ensure redundancy.)
304+
6. Divide the same result by 10 requests per channel to determine the maximum optimal channel pool size.
305+
306+
These steps are expressed in the following equations:
307+
```java
308+
(QPS ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
309+
(QPS ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
310+
```
311+
312+
###### Example
313+
Your application typically sends 50,000 requests per second, and the average latency is 10 ms. Divide 1,000 by 10 ms to determine that you can send 100 requests serially per second.
314+
Divide that number into 50,000 to get the parallelism needed to send 50,000 QPS: 500. Each channel can have at most 100 requests out concurrently, and your target channel utilization
315+
is between 10 and 50 concurrent streams. Therefore, to calculate the minimum, divide 500 by 50 to get 10. To find the maximum, divide 500 by 10 to get 50. This means that your channel
316+
pool size for this example should be between 10 and 50 connections.
317+
318+
It is also important to monitor your traffic after making changes and adjust the number of connections in your pool if necessary.
319+
320+
###### Set the pool size
321+
The following code sample demonstrates how to configure the channel pool in the client libraries using `DatastoreOptions`.
284322
See [ChannelPoolSettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.grpc.ChannelPoolSettings) and [Performance Best Practices](https://grpc.io/docs/guides/performance/) for more information on channel pools and best practices for performance.
285323

286-
Example:
324+
Code Example
287325
```java
288326
InstantiatingGrpcChannelProvider channelProvider =
289327
DatastoreSettings.defaultGrpcTransportProviderBuilder()
@@ -479,7 +517,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
479517
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-datastore/java11.html
480518
[stability-image]: https://img.shields.io/badge/stability-stable-green
481519
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datastore.svg
482-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastore/2.24.2
520+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastore/2.24.3
483521
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
484522
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
485523
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

datastore-v1-proto-client/pom.xml

Lines changed: 2 additions & 2 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.24.3-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
22+
<version>2.24.3</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.24.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
27+
<version>2.24.3</version><!-- {x-version-update:google-cloud-datastore:current} -->
2828
</parent>
2929

3030
<packaging>jar</packaging>

generation_config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
gapic_generator_version: 2.49.0
2-
googleapis_commitish: 5257378f52352e70b8995713f0d4484bdab7e71d
3-
libraries_bom_version: 26.50.0
1+
gapic_generator_version: 2.50.0
2+
googleapis_commitish: 0f3a20ebd29fb1deb2bd1f75c7ba55500d35457d
3+
libraries_bom_version: 26.51.0
44
libraries:
55
- api_shortname: datastore
66
name_pretty: Cloud Datastore

google-cloud-datastore-bom/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-datastore-bom</artifactId>
6-
<version>2.24.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
6+
<version>2.24.3</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
77
<packaging>pom</packaging>
88
<parent>
99
<groupId>com.google.cloud</groupId>
@@ -52,22 +52,22 @@
5252
<dependency>
5353
<groupId>com.google.cloud</groupId>
5454
<artifactId>google-cloud-datastore</artifactId>
55-
<version>2.24.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
55+
<version>2.24.3</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.24.3-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-datastore-admin-v1:current} -->
60+
<version>2.24.3</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.115.3-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
65+
<version>0.115.3</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.24.3-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-admin-v1:current} -->
70+
<version>2.24.3</version><!-- {x-version-update:proto-google-cloud-datastore-admin-v1:current} -->
7171
</dependency>
7272
</dependencies>
7373
</dependencyManagement>

google-cloud-datastore/pom.xml

Lines changed: 2 additions & 2 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.24.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
5+
<version>2.24.3</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.24.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
15+
<version>2.24.3</version><!-- {x-version-update:google-cloud-datastore:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-datastore</site.installationModule>

0 commit comments

Comments
 (0)