You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scenario is -
a) I have a cluster of Workers (size n) against a Stream (shard count m). m < n. So some Workers are without active lease.
b) On doing requestShutdown(), the worker returns an immediateFuture
c) Since ShutdownFuture is not returned, shutdown() for Worker is never called which is normally done here
d) Worker does not stop.
A work-around I am doing is to always call shutdown() for the worker after doing a get() on the future. However, a proper fix seems to do the following in requestShutdown() -
if (leases == null || leases.isEmpty()) {
//
// If there are no leases shutdown is already completed.
//
shutdown();
return Futures.immediateFuture(null);
}
Since there is no lease, shutdown() should be quick.
An alternate solution will be - to return ShutdownFuture in all scenarios with minor changes.
Suggestions?
The text was updated successfully, but these errors were encountered:
* Fixed an issue building JavaDoc for Java 8.
* [Issue awslabs#18](awslabs#18)
* [PR awslabs#141](awslabs#141)
* Reduce Throttling Messages to WARN, unless throttling occurs 6 times consecutively.
* [Issue awslabs#4](awslabs#4)
* [PR awslabs#140](awslabs#140)
* Fixed two bugs occurring in requestShutdown.
* Fixed a bug that prevented the worker from shutting down, via requestShutdown, when no leases were held.
* [Issue awslabs#128](awslabs#128)
* Fixed a bug that could trigger a NullPointerException if leases changed during requestShutdown.
* [Issue awslabs#129](awslabs#129)
* [PR awslabs#139](awslabs#139)
* Upgraded the AWS SDK Version to 1.11.91
* [PR awslabs#138](awslabs#138)
* Use an executor returned from `ExecutorService.newFixedThreadPool` instead of constructing it by hand.
* [PR awslabs#135](awslabs#135)
* Correctly initialize DynamoDB client, when endpoint is explicitly set.
* [PR awslabs#142](awslabs#142)
* Fixed an issue building JavaDoc for Java 8.
* [Issue #18](#18)
* [PR #141](#141)
* Reduce Throttling Messages to WARN, unless throttling occurs 6 times consecutively.
* [Issue #4](#4)
* [PR #140](#140)
* Fixed two bugs occurring in requestShutdown.
* Fixed a bug that prevented the worker from shutting down, via requestShutdown, when no leases were held.
* [Issue #128](#128)
* Fixed a bug that could trigger a NullPointerException if leases changed during requestShutdown.
* [Issue #129](#129)
* [PR #139](#139)
* Upgraded the AWS SDK Version to 1.11.91
* [PR #138](#138)
* Use an executor returned from `ExecutorService.newFixedThreadPool` instead of constructing it by hand.
* [PR #135](#135)
* Correctly initialize DynamoDB client, when endpoint is explicitly set.
* [PR #142](#142)
The scenario is -
a) I have a cluster of Workers (size n) against a Stream (shard count m). m < n. So some Workers are without active lease.
b) On doing
requestShutdown()
, the worker returns an immediateFuturec) Since ShutdownFuture is not returned,
shutdown()
for Worker is never called which is normally done hered) Worker does not stop.
A work-around I am doing is to always call
shutdown()
for the worker after doing aget()
on the future. However, a proper fix seems to do the following inrequestShutdown()
-Since there is no lease,
shutdown()
should be quick.An alternate solution will be - to return
ShutdownFuture
in all scenarios with minor changes.Suggestions?
The text was updated successfully, but these errors were encountered: