Skip to content

Commit eb50e40

Browse files
authored
---
yaml --- r: 17099 b: refs/heads/autosynth-scheduler c: f28bbcc h: refs/heads/master i: 17097: 2f5feb8 17095: 4bec557
1 parent 5a65490 commit eb50e40

4 files changed

Lines changed: 1 addition & 21 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ refs/heads/autosynth-kms: 4fff8f3cf6c830f7706ac4ef272f036bb87fbaf8
138138
refs/heads/autosynth-language: 6262e2eb76944f01972c887b3e684aaf65ec999a
139139
refs/heads/autosynth-os-login: a88a337797996a205873040a63abe1d3116f5789
140140
refs/heads/autosynth-redis: 0cdb2e47359d51b73763bcea8af3de62aa99119b
141-
refs/heads/autosynth-scheduler: 978f3b7aa6a1bf74641af684aa4aaff4468178e3
141+
refs/heads/autosynth-scheduler: f28bbcce35c6d178e36cd50d3e4daf4f81717919
142142
refs/heads/autosynth-securitycenter: 8e95447ccb176c3648880ee0cb926cd1f4065156
143143
refs/heads/autosynth-spanner: 563dc6c78c6a2579b681f441f0a9b59005212394
144144
refs/heads/autosynth-speech: 878243784f42771467d7cf52bd59e4a6a7950ee9

branches/autosynth-scheduler/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ public interface AckReplyConsumer {
2929
* message.
3030
*/
3131
void nack();
32-
33-
void abandon();
3432
}

branches/autosynth-scheduler/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ private class AckHandler implements ApiFutureCallback<AckReply> {
133133
private final int outstandingBytes;
134134
private final long receivedTimeMillis;
135135
private final Instant totalExpiration;
136-
private boolean extending = true;
137136

138137
AckHandler(String ackId, int outstandingBytes, Instant totalExpiration) {
139138
this.ackId = ackId;
@@ -152,7 +151,6 @@ private void forget() {
152151
*/
153152
return;
154153
}
155-
extending = false;
156154
flowController.release(1, outstandingBytes);
157155
messagesWaiter.incrementPendingMessages(-1);
158156
processOutstandingBatches();
@@ -419,11 +417,6 @@ public void ack() {
419417
public void nack() {
420418
response.set(AckReply.NACK);
421419
}
422-
423-
@Override
424-
public void abandon() {
425-
ackHandler.forget();
426-
}
427420
};
428421
ApiFutures.addCallback(response, ackHandler, MoreExecutors.directExecutor());
429422
executor.execute(
@@ -478,9 +471,6 @@ void extendDeadlines() {
478471
Instant extendTo = now.plusSeconds(extendSeconds);
479472

480473
for (Map.Entry<String, AckHandler> entry : pendingMessages.entrySet()) {
481-
if (!entry.getValue().extending) {
482-
continue;
483-
}
484474
String ackId = entry.getKey();
485475
Instant totalExpiration = entry.getValue().totalExpiration;
486476
if (totalExpiration.isAfter(extendTo)) {

branches/autosynth-scheduler/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,6 @@ public void testNack() throws Exception {
148148
assertThat(sentModAcks).contains(ModAckItem.of(TEST_MESSAGE.getAckId(), 0));
149149
}
150150

151-
@Test
152-
public void testAbandon() throws Exception {
153-
dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE), NOOP_RUNNABLE);
154-
consumers.take().abandon();
155-
dispatcher.extendDeadlines();
156-
assertThat(sentModAcks).doesNotContain(TEST_MESSAGE.getAckId());
157-
}
158-
159151
@Test
160152
public void testExtension() throws Exception {
161153
dispatcher.processReceivedMessages(Collections.singletonList(TEST_MESSAGE), NOOP_RUNNABLE);

0 commit comments

Comments
 (0)