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 CF1C2200CF0 for ; Thu, 7 Sep 2017 08:45:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CDAD0161CDC; Thu, 7 Sep 2017 06:45:05 +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 21BCA161CAD for ; Thu, 7 Sep 2017 08:45:04 +0200 (CEST) Received: (qmail 23494 invoked by uid 500); 7 Sep 2017 06:45:04 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 23485 invoked by uid 99); 7 Sep 2017 06:45:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 06:45:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D100ED7AFC for ; Thu, 7 Sep 2017 06:45:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id kqa2hjfVVulm for ; Thu, 7 Sep 2017 06:45:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id BE07F61273 for ; Thu, 7 Sep 2017 06:45:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D54BBE0ED9 for ; Thu, 7 Sep 2017 06:45:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 41C4E24158 for ; Thu, 7 Sep 2017 06:45:00 +0000 (UTC) Date: Thu, 7 Sep 2017 06:45:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-1393) CriticalAnalyzer timeout uses System::currentTimeMillis MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 07 Sep 2017 06:45:06 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16156568#comment-16156568 ] ASF GitHub Bot commented on ARTEMIS-1393: ----------------------------------------- Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1515#discussion_r137457338 --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalMeasure.java --- @@ -17,28 +17,39 @@ package org.apache.activemq.artemis.utils.critical; -import org.jboss.logging.Logger; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLongFieldUpdater; -public class CriticalMeasure { +final class CriticalMeasure { --- End diff -- It is a good point for sure, but I agree only on the second half: is out of scope for the change so I can push a different PR just with it (and for the atomic changes too I can say). For the first half I do not agree: is not a personal taste, but the explicit declaration of the original intent. That class wasn't designed to be extended or used in other points in the code. > CriticalAnalyzer timeout uses System::currentTimeMillis > ------------------------------------------------------- > > Key: ARTEMIS-1393 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1393 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Francesco Nigro > Assignee: Francesco Nigro > > To compute timeouts of the CriticalAnalyzer Instead of System::currentTimeMillis is preferrable to use System::nanoTime, that is not sensible to OS changes on the system clock (eg NTP compensation). -- This message was sent by Atlassian JIRA (v6.4.14#64029)