Skip to content

Regenerate iamcredentials client#4239

Closed
yoshi-automation wants to merge 1 commit intomasterfrom
autosynth-iamcredentials
Closed

Regenerate iamcredentials client#4239
yoshi-automation wants to merge 1 commit intomasterfrom
autosynth-iamcredentials

Conversation

@yoshi-automation
Copy link
Copy Markdown
Contributor

This PR was generated using Autosynth. 🌈

Here's the log from Synthtool:

synthtool > Executing /tmpfs/src/git/autosynth/working_repo/google-cloud-clients/google-cloud-iamcredentials/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:bfb92654b4a77368471f70e2808eaf4e60f263b9559f27bb3284097322787bf1
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/iam/credentials/artman_iamcredentials_v1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java.
synthtool > Running java formatter on 10 files
synthtool > Running java formatter on 2 files
synthtool > Running java formatter on 42 files
synthtool > Cleaned up 0 temporary directories.
synthtool > Wrote metadata to synth.metadata.

@yoshi-automation yoshi-automation requested a review from a team December 18, 2018 08:47
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 18, 2018
@chingor13 chingor13 self-assigned this Dec 19, 2018
@chingor13 chingor13 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 19, 2018
@chingor13 chingor13 closed this Jan 2, 2019
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
This PR enables the gRPC-GCP channel pool extension by default for Cloud Spanner Java client.

**What's Changing for Customers**

**Before this change**

- gRPC-GCP extension was disabled by default
- Default number of channels: 4
- Channel pooling was handled by GAX

**After this change**

- gRPC-GCP extension is enabled by default
- Default number of channels: 8
- Channel pooling is handled by gRPC-GCP extension

**Benefits of gRPC-GCP**

- **Improved resilience:** When a network connection fails on a particular channel, operations can be automatically retried on a different gRPC channel
- **Better channel management:** gRPC-GCP provides more sophisticated channel affinity and load balancing

**How to Disable gRPC-GCP (Switch Back to GAX Channel Pool)**

If you need to disable gRPC-GCP and use the previous GAX channel pooling behavior, use the `disableGrpcGcpExtension()` method:
```
SpannerOptions options = SpannerOptions.newBuilder()
    .setProjectId("my-project")
    .disableGrpcGcpExtension()
    .build();
```

When disabled, the default number of channels reverts to 4 (the previous default).

**When You Might Want to Disable gRPC-GCP**

- **Maintaining previous behavior:** If you want to keep the exact same behavior as before this change (GAX channel pool with 4 default channels).
- **Troubleshooting**: If you experience any unexpected behavior, disabling gRPC-GCP can help isolate whether the issue is related to the channel pooling mechanism.
akash329d added a commit to akash329d/google-cloud-java that referenced this pull request Apr 9, 2026
The static-pool path bounded the affinity key to (-numChannels..numChannels)
distinct values. Under a high-concurrency cold start, all keys race through
GcpManagedChannel.pickLeastBusyChannel before any caller's start() has
incremented activeStreamsCount, so they all tie to channelRefs[0] and bind
there permanently. The result is most RPCs route through a single HTTP/2
connection and queue at MAX_CONCURRENT_STREAMS (~100), capping per-client
throughput. Regression became default-path behavior in 6.105.0 (googleapis#4239).

With multiplexed sessions there is no per-transaction locality benefit from
sticky channel affinity. Dropping the key for the static-pool case makes
GcpManagedChannel.getChannelRef(null) do a fresh per-call least-busy pick
with no sticky bind, which self-corrects and matches the dynamic-pool /
disableGrpcGcpExtension() throughput curve.
akash329d added a commit to akash329d/google-cloud-java that referenced this pull request Apr 9, 2026
Under grpc-gcp (default since 6.105.0, googleapis#4239), newCallContext set
GcpManagedChannel.AFFINITY_KEY on every data RPC. GcpManagedChannel
binds each new key via pickLeastBusyChannel, which reads
activeStreamsCount before any concurrent caller's start() has
incremented it (tiebreak channelRefs[0]). A high-concurrency cold start
therefore binds keys to channel 0 and the bindings are sticky, so RPCs
funnel through one HTTP/2 connection and queue at MAX_CONCURRENT_STREAMS.

The static-numChannels path bounded the key to ~2*numChannels-1 distinct
values, making the collapse permanent (~6x throughput regression at 400
concurrent). The dynamic-channel-pool path used per-transaction random
keys and largely self-corrected, but a few BitSet-recycled hints still
sticky-bound, leaving a p99 tail.

Multiplexed sessions get no backend-locality benefit from sticky
per-transaction channel affinity, so don't set the key under grpc-gcp at
all. getChannelRef(null) does a fresh per-call least-busy pick with no
sticky binding and no affinity-map growth.

Drops the now-unobservable distinct-AFFINITY_KEY assertions from
RetryOnDifferentGrpcChannelMockServerTest; the request-count and session
assertions still cover the retry loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants