Skip to content

Commit 1ef575a

Browse files
authored
---
yaml --- r: 8107 b: refs/heads/tswast-patch-1 c: 65d5aad h: refs/heads/master i: 8105: 3cab05f 8103: 8bd33c4
1 parent 62653d3 commit 1ef575a

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: c4c80f54f707f4bce8debf17dd9fd475628e42f1
60+
refs/heads/tswast-patch-1: 65d5aad677ebcfeb81165b02051a44244c44e576
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/Subscriber.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,10 @@ private void startConnections(
335335
List<? extends ApiService> connections, final ApiService.Listener connectionsListener) {
336336
for (ApiService subscriber : connections) {
337337
subscriber.addListener(connectionsListener, executor);
338-
// Starting each connection submits a blocking task to the executor.
339-
// We start connections one at a time to avoid swamping executor with blocking tasks.
340-
subscriber.startAsync().awaitRunning();
338+
subscriber.startAsync();
339+
}
340+
for (ApiService subscriber : connections) {
341+
subscriber.awaitRunning();
341342
}
342343
}
343344

@@ -468,10 +469,10 @@ public Builder setCredentialsProvider(CredentialsProvider credentialsProvider) {
468469
}
469470

470471
/**
471-
* Gives the ability to set a custom executor for managing lease extensions. If none is provided
472-
* a shared one will be used by all {@link Subscriber} instances.
472+
* Gives the ability to set a custom executor for polling and managing lease extensions. If none
473+
* is provided a shared one will be used by all {@link Subscriber} instances.
473474
*/
474-
public Builder setLeaseAlarmsExecutorProvider(ExecutorProvider executorProvider) {
475+
public Builder setSystemExecutorProvider(ExecutorProvider executorProvider) {
475476
this.systemExecutorProvider = Preconditions.checkNotNull(executorProvider);
476477
return this;
477478
}

branches/tswast-patch-1/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/SubscriberTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ private void sendMessages(Iterable<String> ackIds) throws InterruptedException {
536536
private Builder getTestSubscriberBuilder(MessageReceiver receiver) {
537537
return Subscriber.defaultBuilder(TEST_SUBSCRIPTION, receiver)
538538
.setExecutorProvider(FixedExecutorProvider.create(fakeExecutor))
539-
.setLeaseAlarmsExecutorProvider(FixedExecutorProvider.create(fakeExecutor))
539+
.setSystemExecutorProvider(FixedExecutorProvider.create(fakeExecutor))
540540
.setChannelProvider(FixedChannelProvider.create(testChannel))
541541
.setCredentialsProvider(PublisherImplTest.NO_CREDENTIALS_PROVIDER)
542542
.setClock(fakeExecutor.getClock());

0 commit comments

Comments
 (0)