Skip to content

Commit e9f9678

Browse files
committed
---
yaml --- r: 28283 b: refs/heads/pubsub-ordering-keys c: 5a81613 h: refs/heads/master i: 28281: 35ce695 28279: 06b3d1a
1 parent 9607497 commit e9f9678

3 files changed

Lines changed: 3 additions & 4 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: 6073e7e317625ade532e102957008d589337d236
158+
refs/heads/pubsub-ordering-keys: 5a81613ddec372b6848806d09c69b337c1ad76f3
159159
refs/tags/v0.75.0: c3673089ae09a897c1b4cf7dfe167fe4f8ab32fb
160160
refs/tags/v0.76.0: 395b016826d3ddf9cb8b34919636df15a4dbd032
161161
refs/tags/v0.77.0: 28a85a77883ccf5d48f297fd0ef3b3dca6ce01f0

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ private Publisher(Builder builder) throws IOException {
142142
retrySettingsBuilder.setMaxAttempts(Integer.MAX_VALUE);
143143
}
144144
if (enableMessageOrdering) {
145+
// TODO: is there a way to have the default retry settings for requests without an ordering key?
145146
retrySettingsBuilder
146147
.setMaxAttempts(Integer.MAX_VALUE)
147148
.setTotalTimeout(Duration.ofNanos(Long.MAX_VALUE));

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ public void onSuccess(T msg) {
223223
// Step 5.2: on failure
224224
@Override
225225
public void onFailure(Throwable e) {
226-
keysWithErrors.add(key);
227226
future.setException(e);
228227
cancelQueuedTasks(key, CANCELLATION_EXCEPTION);
229228
}
@@ -250,8 +249,7 @@ void resumePublish(String key) {
250249

251250
/** Cancels every task in the queue associated with {@code key}. */
252251
private void cancelQueuedTasks(final String key, Throwable e) {
253-
// TODO(kimkyung-goog): Ensure execute() fails once cancelQueueTasks() has been ever invoked,
254-
// so that no more tasks are scheduled.
252+
keysWithErrors.add(key);
255253
synchronized (tasksByKey) {
256254
final Queue<CancellableRunnable> tasks = tasksByKey.get(key);
257255
if (tasks != null) {

0 commit comments

Comments
 (0)