[
https://issues.apache.org/jira/browse/HBASE-16642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15570951#comment-15570951
]
Hiroshi Ikeda commented on HBASE-16642:
---------------------------------------
You got what I want to say, but don't synchronize per comparison.
It would require magnificent mechanism and execution cost to make a queue
enable to dynamically re-order its elements. In other words, in general a queue
doesn't support such a mechanism and the priory of an element should not be
changed while the element is stored in the queue, otherwise the queue will do
unexpected behavior.
That means, synchronizing per comparison just wastes at the best.
Synchronization requires a bit cost and prevents runtime optimization, and even
though that might be ignorable there is no reason to pay for nothing.
> Use DelayQueue instead of TimeoutBlockingQueue
> ----------------------------------------------
>
> Key: HBASE-16642
> URL: https://issues.apache.org/jira/browse/HBASE-16642
> Project: HBase
> Issue Type: Sub-task
> Components: proc-v2
> Reporter: Hiroshi Ikeda
> Assignee: Matteo Bertozzi
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: HBASE-16642-v2.patch, HBASE-16642-v3.patch,
> HBASE-16642.master.V1.patch
>
>
> Enqueue poisons in order to wake up and end the internal threads.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)