[M] Change in bazel/bazel[master]: Fix race in DynamicConnectionPool. (https://github.com/bazelbuild/baz...

0 views
Skip to first unread message

Copybara Service (Gerrit)

unread,
11:45 AM (4 hours ago) 11:45 AM
to bazel-...@googlegroups.com

Copybara Service submitted the change

Change information

Commit message:
Fix race in DynamicConnectionPool. (https://github.com/bazelbuild/bazel/pull/29693)

numAvailableConnections() is called under lock but the connection creation happens outside of the lock so it's possible for the remote_max_concurrency_per_connection number of rpcs per connection to be exceeded.

This change makes the token acquisition happen under lock, while deferring the connection creation.

Closes #29693.
PiperOrigin-RevId: 926053103
Change-Id: I8cacb67ef7be1ffb338a7880d084b83074974914
Files:
  • M src/main/java/com/google/devtools/build/lib/remote/grpc/DynamicConnectionPool.java
  • M src/main/java/com/google/devtools/build/lib/remote/grpc/SharedConnectionFactory.java
  • M src/main/java/com/google/devtools/build/lib/remote/grpc/TokenBucket.java
  • M src/test/java/com/google/devtools/build/lib/remote/grpc/DynamicConnectionPoolTest.java
Change size: M
Delta: 4 files changed, 82 insertions(+), 29 deletions(-)
Branch: refs/heads/master
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: bazel
Gerrit-Branch: master
Gerrit-Change-Id: I8cacb67ef7be1ffb338a7880d084b83074974914
Gerrit-Change-Number: 329251
Gerrit-PatchSet: 11
Gerrit-Owner: Copybara Service <copybara-wor...@google.com>
open
diffy

Copybara Service (Gerrit)

unread,
11:45 AM (4 hours ago) 11:45 AM
to bazel-...@googlegroups.com

Copybara Service uploaded new patchset

Copybara Service uploaded patch set #11 to this change.
Open in Gerrit

Related details

Attention set is empty
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
open
diffy
Reply all
Reply to author
Forward
0 new messages