Skip to content

Commit ea9f041

Browse files
authored
---
yaml --- r: 27249 b: refs/heads/pubsub-ordering-keys c: cd4d635 h: refs/heads/master i: 27247: 39a72d2
1 parent d9c140d commit ea9f041

9 files changed

Lines changed: 142 additions & 826 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ refs/tags/v0.72.0: a7703f2593ba312c0b2dde6fdfd4f5c764bb55ac
155155
refs/tags/v0.73.0: 21241ea8be9439cc5764c4944cdce21d34ce4f9e
156156
refs/tags/v0.74.0: 9d1f733dbbf790de7b494418523b69c4a9a57638
157157
refs/heads/ignoretest: 23c412ae07af3d0ab1caa2d44d5bc5c0ccb8b31d
158-
refs/heads/pubsub-ordering-keys: d661492d527b8081dafb25734c6e270e56c59bf2
158+
refs/heads/pubsub-ordering-keys: cd4d6359d131b1d23af2045d0c5d1c3f8cd7a8f2
159159
"refs/heads/update_mvn_badge": ae2d773814db0f71197ccf5a8612ee1d8056f8de
160160
refs/tags/v0.75.0: c3673089ae09a897c1b4cf7dfe167fe4f8ab32fb
161161
refs/tags/v0.76.0: 395b016826d3ddf9cb8b34919636df15a4dbd032
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
env_vars: {
3+
key: "STAGING_BUCKET"
4+
value: "docs_staging"
5+
}
6+
7+
env_vars: {
8+
key: "TRAMPOLINE_BUILD_FILE"
9+
value: "github/google-cloud-java/.kokoro/release/publish_javadoc.sh"
10+
}
11+
12+
before_action {
13+
fetch_keystore {
14+
keystore_resource {
15+
keystore_config_id: 73713
16+
keyname: "docuploader_service_account"
17+
}
18+
}
19+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/bin/bash
2+
# Copyright 2019 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
if [[ -z "${CREDENTIALS}" ]]; then
19+
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713-docuploader_service_account
20+
fi
21+
22+
if [[ -z "${STAGING_BUCKET}" ]]; then
23+
echo "Need to set STAGING_BUCKET environment variable"
24+
exit 1
25+
fi
26+
27+
# work from the git root directory
28+
pushd $(dirname "$0")/../../
29+
30+
# install docuploader package
31+
python3 -m pip install gcp-docuploader
32+
33+
# compile all packages
34+
mvn clean install -B -DskipTests=true
35+
36+
build_and_publish_site() {
37+
DIRECTORY=$1
38+
NAME=$1
39+
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
40+
41+
pushd ${DIRECTORY}
42+
43+
# build the docs
44+
mvn site
45+
mvn site:stage -DtopSiteURL=https://googleapis.dev/java/${NAME}/${VERSION}
46+
47+
pushd target/staging/site/${NAME}/apidocs
48+
49+
# create metadata
50+
python3 -m docuploader create-metadata \
51+
--name ${NAME} \
52+
--version ${VERSION} \
53+
--language java
54+
55+
# upload docs
56+
python3 -m docuploader upload . \
57+
--credentials ${CREDENTIALS} \
58+
--staging-bucket ${STAGING_BUCKET}
59+
60+
popd
61+
popd
62+
}
63+
64+
# TODO (chingor): split all the artifacts
65+
build_and_publish_site google-api-grpc
66+
build_and_publish_site google-cloud-clients

branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class MessageDispatcher {
6262
@InternalApi static final Duration PENDING_ACKS_SEND_DELAY = Duration.ofMillis(100);
6363

6464
private final Executor executor;
65-
private final SequentialExecutorService.AutoExecutor sequentialExecutor;
6665
private final ScheduledExecutorService systemExecutor;
6766
private final ApiClock clock;
6867

@@ -206,7 +205,6 @@ void sendAckOperations(
206205
jobLock = new ReentrantLock();
207206
messagesWaiter = new MessageWaiter();
208207
this.clock = clock;
209-
this.sequentialExecutor = new SequentialExecutorService.AutoExecutor(executor);
210208
}
211209

212210
void start() {
@@ -351,7 +349,7 @@ public void nack() {
351349
}
352350
};
353351
ApiFutures.addCallback(response, ackHandler, MoreExecutors.directExecutor());
354-
Runnable deliverMessageTask =
352+
executor.execute(
355353
new Runnable() {
356354
@Override
357355
public void run() {
@@ -372,12 +370,7 @@ public void run() {
372370
response.setException(e);
373371
}
374372
}
375-
};
376-
if (message.getOrderingKey().isEmpty()) {
377-
executor.execute(deliverMessageTask);
378-
} else {
379-
sequentialExecutor.submit(message.getOrderingKey(), deliverMessageTask);
380-
}
373+
});
381374
}
382375

383376
/** Compute the ideal deadline, set subsequent modacks to this deadline, and return it. */

0 commit comments

Comments
 (0)