Conversation
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Show resolved
Hide resolved
|
The Documentation QA site for this branch has been built: |
|
More thought is required for BulkWorkerThreadPool |
worker-test/src/test/java/com/github/workerframework/workertest/ShutdownDeveloperTest.java
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/BulkWorkerThreadPool.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/StreamingWorkerThreadPool.java
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerThreadPool.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/BulkWorkerThreadPool.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/BulkWorkerThreadPool.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Outdated
Show resolved
Hide resolved
worker-core/src/main/java/com/github/workerframework/core/WorkerApplication.java
Outdated
Show resolved
Hide resolved
|
|
||
| final long startTime = System.currentTimeMillis(); | ||
|
|
||
| while(wtp.getBacklogSize() > 0 && System.currentTimeMillis() - startTime < SHUTDOWN_DURATION) { |
There was a problem hiding this comment.
Are we sure about this strategy of trying to clear the backlog during shutdown? Trying to complete in-progress tasks makes sense but if I'm understanding this right it is intentionally allowing new tasks to begin that haven't been passed to the worker code yet. Wouldn't we be better to clear these backlog queues and let the next worker instance pick them up?
There was a problem hiding this comment.
The prefetched message have their delivery count increased and this goes towards the poison message identification.
I take your point that starting more messages increases the chances they get terminated after the timeout.
Let's aim to talk it through at some stage.
Deadlock was caused by the use of System.exit in the test worker, using this opportunity to simplify shutdown logic and use a non-configurable timeout.
Update the shutdownIncoming method to make the shutdown permanent so GatedHealthProvider does not trigger a reconnect.