Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F31BB192C8 for ; Thu, 7 Apr 2016 14:50:25 +0000 (UTC) Received: (qmail 63077 invoked by uid 500); 7 Apr 2016 14:50:25 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 63045 invoked by uid 500); 7 Apr 2016 14:50:25 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 63034 invoked by uid 99); 7 Apr 2016 14:50:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2016 14:50:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 788902C1F5A for ; Thu, 7 Apr 2016 14:50:25 +0000 (UTC) Date: Thu, 7 Apr 2016 14:50:25 +0000 (UTC) From: "Ariel Weisberg (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-11517) o.a.c.utils.UUIDGen could handle contention better MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228936#comment-15228936 ] Ariel Weisberg edited comment on CASSANDRA-11517 at 4/7/16 2:50 PM: -------------------------------------------------------------------- |[trunk code|https://github.com/apache/cassandra/compare/trunk...aweisberg:CASSANDRA-11517-trunk?expand=1]|[utests|http://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-trunk-testall/2/]|[dtests|https://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-trunk-dtest/2/]| |[3.0 code|https://github.com/apache/cassandra/compare/cassandra-3.0...aweisberg:CASSANDRA-11517-3.0?expand=1]|[utests|http://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-3.0-testall/2/]|[dtests|https://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-3.0-dtest/2/]| Not proof of any real performance benefit in context, but the unit test runs in 250 milliseconds with the CAS loop and 1.4 seconds without the CAS loop. was (Author: aweisberg): |[trunk code|https://github.com/apache/cassandra/compare/trunk...aweisberg:CASSANDRA-11517-trunk?expand=1]|[utests|http://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-trunk-testall/1/]|[dtests|https://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-trunk-dtest/1/]| |[3.0 code|https://github.com/apache/cassandra/compare/cassandra-3.0...aweisberg:CASSANDRA-11517-3.0?expand=1]|[utests|http://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-3.0-testall/1/]|[dtests|https://cassci.datastax.com/view/Dev/view/aweisberg/job/aweisberg-CASSANDRA-11517-3.0-dtest/1/]| Not proof of any real performance benefit in context, but the unit test runs in 250 milliseconds with the CAS loop and 1.4 seconds without the CAS loop. > o.a.c.utils.UUIDGen could handle contention better > -------------------------------------------------- > > Key: CASSANDRA-11517 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11517 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Ariel Weisberg > Assignee: Ariel Weisberg > Priority: Minor > Fix For: 3.0.x, 3.x > > > I noticed this profiling a query handler implementation that uses UUIDGen to get handles to track queries for logging purposes. > Under contention threads are being unscheduled instead of spinning until the lock is available. I would have expected intrinsic locks to be able to adapt to this based on profiling information. > Either way it's seems pretty straightforward to rewrite this to use a CAS loop and test that it generally produces unique values. -- This message was sent by Atlassian JIRA (v6.3.4#6332)