GeezerVison is showing github.com (truncated) — Max ack extension by davidtorres · Pull Request #1898 · googleapis/google-cloud-java
Conversation
davidtorres
commented
Apr 11, 2017
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…on to (googleapis#1645)".
Compression is not fully supported in gRPC, can't have it in the library
yet.
This reverts commit a599972.
…Consumer interface, it really is
no useful to be able to set an exception as ack reply, since the result
is the same as nack, if we ever require another result then we can just
add one more value to the AckReply enum.
Also adding a fail-safe catch so if the receiver ever throws an
exception we will interpret that as a nack and keep going.
This prevents the library extending messages infinitevely if the user
code has lost track of the ack consumer handle.
the next extension surpasses it.
|

Changes Unknown when pulling 4883e6f on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return new ModifyAckDeadline(ack, 2); // 2 seconds is the initial mod ack deadline
|
|
|
}
|
|
|
});
|
|
|
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
});
|
|
|
|
|
|
int timeIncrement = 4; // Second time increment
|
|
|
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
while (fakeExecutor.getClock().millisTime() + (timeIncrement * 1000) < 1000 * 60 * 60) {
|
|
|
fakeExecutor.advanceTime(Duration.standardSeconds(timeIncrement));
|
|
|
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
* Adding units to new tests variables
* Making a constant for the first time modify ack deadline extension
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@davidtorres I have a concern that the new test might be flaky - could you check the Travis failures?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
manifest only certain github testing environments.
|
Yes I'm pushing a change now to address the issue, the tests should/might have been flaky before as well (or the expectations too lax), this is an old bug in the tests because of thread scheduling and the latest changes to the tests just exposed the bug.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Changes Unknown when pulling 09172a6 on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Changes Unknown when pulling 6a21a54 on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Tests are now passing PTAL
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
private Deque<Duration> expectedWorkQueue = new LinkedList<>();
|
|
|
|
|
|
public void setupScheduleExpectation(Duration delay) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
// Send messages to be acked
|
|
|
List<String> testAckIdsBatch = ImmutableList.of("A", "B", "C");
|
|
|
testReceiver.setExplicitAck(true);
|
|
|
// A modify ack deadline should be schedule for the next 9s
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
pendingCallables.add(callable);
|
|
|
}
|
|
|
work();
|
|
|
synchronized (expectedWorkQueue) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
}
|
|
|
work();
|
|
|
synchronized (expectedWorkQueue) {
|
|
|
if (!expectedWorkQueue.isEmpty() && expectedWorkQueue.peek().equals(callable.delay)) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
FakeScheduledExecutor that allow you to set expectations on scheduled
work.
|

Changes Unknown when pulling 204438c on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Apr 12, 2017
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 11, 2026
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
|