Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1A92D200BAA for ; Thu, 13 Oct 2016 07:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 17925160AEE; Thu, 13 Oct 2016 05:53:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 82FB0160ACA for ; Thu, 13 Oct 2016 07:53:21 +0200 (CEST) Received: (qmail 11631 invoked by uid 500); 13 Oct 2016 05:53:20 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 11608 invoked by uid 99); 13 Oct 2016 05:53:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 05:53:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7843F2C4C73 for ; Thu, 13 Oct 2016 05:53:20 +0000 (UTC) Date: Thu, 13 Oct 2016 05:53:20 +0000 (UTC) From: "Hiroshi Ikeda (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16642) Use DelayQueue instead of TimeoutBlockingQueue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Oct 2016 05:53:22 -0000 [ 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)