Dedicated priority generic thread(s) #7857

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@pveentjer
Member

The OperationExecutor is now by default configured with 1 extra priority generic thread. This thread will only process generic priority operations; which still can be picked up by another regular generic thread if the priority thread for whatever reason is busy. But it can't happen that if only regular generic tasks are running that a priority generic task is not going to be picked up.

This should increase reliability since generic threads are used for all kinds of purposes, e.g. launching and syncing on queries. And stuff like heartbeats, cluster operations etc should be processed asap.

@pveentjer pveentjer added this to the 3.7 milestone Mar 28, 2016
@mdogan
Member
mdogan commented Mar 29, 2016

👍

@tombujok
Contributor

👍

@pveentjer
Member

Thanks guys. I need to wait with merging till the PRD also has been given the green light.

@pveentjer
Member

I made a small adjust in the threadname. Now priority threads get their own sequence. So you get:

hz._hzInstance_1_dev.priority-generic-operation.thread-0
hz._hzInstance_1_dev.priority-generic-operation.thread-1
hz._hzInstance_1_dev.generic-operation.thread-0
hz._hzInstance_1_dev.generic-operation.thread-1
hz._hzInstance_1_dev.generic-operation.thread-2
hz._hzInstance_1_dev.generic-operation.thread-3

Instead of:

hz._hzInstance_1_dev.priority-generic-operation.thread-0
hz._hzInstance_1_dev.priority-generic-operation.thread-1
hz._hzInstance_1_dev.generic-operation.thread-2
hz._hzInstance_1_dev.generic-operation.thread-3
hz._hzInstance_1_dev.generic-operation.thread-4
hz._hzInstance_1_dev.generic-operation.thread-5

This is with 2 priority generic threads configured.

@Donnerbart
Contributor

There was a test failure in com.hazelcast.spi.impl.operationservice.impl.ResponseHandler_NotifyTest.normalResponse_whenBackupMissing_thenEventuallySuccess:
https://hazelcast-l337.ci.cloudbees.com/job/new-lab-fast-pr/2249/testReport/junit/com.hazelcast.spi.impl.operationservice.impl/ResponseHandler_NotifyTest/normalResponse_whenBackupMissing_thenEventuallySuccess/

Let's see if this is repeatable.

@pveentjer
Member

I'm going to close this PR in favor of a simpler approach:

#7913

@pveentjer pveentjer closed this Apr 6, 2016
@pveentjer pveentjer deleted the pveentjer:fix/3.x/dedicated-generic-operationthread-part-2 branch Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment