Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 53628 invoked from network); 23 Mar 2011 19:00:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2011 19:00:31 -0000 Received: (qmail 49882 invoked by uid 500); 23 Mar 2011 19:00:46 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 49815 invoked by uid 500); 23 Mar 2011 19:00:46 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 49618 invoked by uid 99); 23 Mar 2011 19:00:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 19:00:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 19:00:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BC8994AD40 for ; Wed, 23 Mar 2011 19:00:05 +0000 (UTC) Date: Wed, 23 Mar 2011 19:00:05 +0000 (UTC) From: "Mark Thomas (JIRA)" To: issues@commons.apache.org Message-ID: <1009052293.6815.1300906805768.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <232965496.5801.1296677309129.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (POOL-182) Issues with org.apache.commons.pool2.performance. PerformanceTest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/POOL-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Thomas updated POOL-182: ----------------------------- Fix Version/s: 2.0 > Issues with org.apache.commons.pool2.performance. PerformanceTest > ----------------------------------------------------------------- > > Key: POOL-182 > URL: https://issues.apache.org/jira/browse/POOL-182 > Project: Commons Pool > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Zoltan Farkas > Priority: Trivial > Fix For: 2.0 > > Attachments: PerformanceTest.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > the use volatiles : waiting,complete,totalBorrowTime, totalReturnTime, nrSamples > is not correct. > for ex the following totalBorrowTime += borrowTime is not atomic resulting in a > race condition. > one way to fix this is using the java.util.concurent Atomic variants or even > better, > make these variables members of MyThread and aggregate them at the end of the > test, > this way there will be no need to use Atomic and thus increasing efficiency, and > accuracy of the test of the test. > also: > private boolean start; > needs to be volatile, due to visibility issue. > (when updating start other threads might not pick up the value) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira