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 09960200CF3 for ; Wed, 13 Sep 2017 10:51:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0803D1609CA; Wed, 13 Sep 2017 08:51:04 +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 4DCBB1609C9 for ; Wed, 13 Sep 2017 10:51:03 +0200 (CEST) Received: (qmail 262 invoked by uid 500); 13 Sep 2017 08:51:02 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 251 invoked by uid 99); 13 Sep 2017 08:51:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Sep 2017 08:51:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DCE0A1857A1 for ; Wed, 13 Sep 2017 08:51:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id H3nyzIsVKh2i for ; Wed, 13 Sep 2017 08:51:01 +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 E52695F6D3 for ; Wed, 13 Sep 2017 08:51:00 +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 780B8E010F for ; Wed, 13 Sep 2017 08:51:00 +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 3582F25382 for ; Wed, 13 Sep 2017 08:51:00 +0000 (UTC) Date: Wed, 13 Sep 2017 08:51:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@tephra.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEPHRA-243) When transaction log sync is slow, the warning message should contain more information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 13 Sep 2017 08:51:04 -0000 [ https://issues.apache.org/jira/browse/TEPHRA-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164333#comment-16164333 ] ASF GitHub Bot commented on TEPHRA-243: --------------------------------------- Github user chtyim commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/53#discussion_r138559674 --- Diff: tephra-core/src/main/java/org/apache/tephra/persist/AbstractTransactionLog.java --- @@ -48,21 +52,30 @@ protected long timestamp; private volatile boolean initialized; private volatile boolean closed; + private AtomicLong writtenUpTo = new AtomicLong(); private AtomicLong syncedUpTo = new AtomicLong(); - private List pendingWrites = Lists.newLinkedList(); + private Queue pendingWrites = new ConcurrentLinkedQueue<>(); private TransactionLogWriter writer; - public AbstractTransactionLog(long timestamp, MetricsCollector metricsCollector) { + private final AtomicLong positionBeforeAppend = new AtomicLong(0); --- End diff -- This can be just a `long` field, right? Since it is only used by the start/stop timer method, which only gets called inside the writer sync block. > When transaction log sync is slow, the warning message should contain more information > -------------------------------------------------------------------------------------- > > Key: TEPHRA-243 > URL: https://issues.apache.org/jira/browse/TEPHRA-243 > Project: Tephra > Issue Type: Improvement > Affects Versions: 0.12.0-incubating > Reporter: Andreas Neumann > Assignee: Andreas Neumann > Fix For: 0.13.0-incubating > > > Currently we get this message: > {noformat} > 2017-08-12 00:59:46,938 - INFO [TTransactionServer-rpc-857:o.a.t.p.AbstractTransactionLog@102] - Slow append to log txlog.1502517541689, took 1431 msec. > {noformat} > It would be more useful to know how many bytes were written, how many edits were in this sync. -- This message was sent by Atlassian JIRA (v6.4.14#64029)