tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-243) When transaction log sync is slow, the warning message should contain more information
Date Wed, 13 Sep 2017 17:55:02 GMT

    [ https://issues.apache.org/jira/browse/TEPHRA-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16165036#comment-16165036
] 

ASF GitHub Bot commented on TEPHRA-243:
---------------------------------------

Github user anew commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/53#discussion_r138692966
  
    --- Diff: tephra-core/src/main/java/org/apache/tephra/persist/AbstractTransactionLog.java
---
    @@ -48,21 +51,30 @@
       protected long timestamp;
       private volatile boolean initialized;
       private volatile boolean closed;
    -  private AtomicLong syncedUpTo = new AtomicLong();
    -  private List<Entry> pendingWrites = Lists.newLinkedList();
    +  private long writtenUpTo = 0L;
    +  private volatile long syncedUpTo = 0L;
    +  private final Queue<Entry> pendingWrites = new ConcurrentLinkedQueue<>();
       private TransactionLogWriter writer;
     
    -  public AbstractTransactionLog(long timestamp, MetricsCollector metricsCollector) {
    +  private int countSinceLastSync = 0;
    +  private long positionBeforeWrite = -1L;
    +  private final Stopwatch stopWatch = new Stopwatch();
    +
    +  private final long slowAppendThreshold;
    +
    +  AbstractTransactionLog(long timestamp, MetricsCollector metricsCollector, Configuration
conf) {
         this.timestamp = timestamp;
         this.metricsCollector = metricsCollector;
    +    this.slowAppendThreshold = conf.getLong(TxConstants.TransactionLog.CFG_SLOW_APPEND_THRESHOLD,
    +                                            TxConstants.TransactionLog.DEFAULT_SLOW_APPEND_THRESHOLD);
       }
     
       /**
        * Initializes the log file, opening a file writer.  Clients calling {@code init()}
should ensure that they
        * also call {@link HDFSTransactionLog#close()}.
        * @throws java.io.IOException If an error is encountered initializing the file writer.
        */
    -  public synchronized void init() throws IOException {
    +  private synchronized void init() throws IOException {
    --- End diff --
    
    yes, I noticed that, too, that's why I made it private, but forgot to update the Javadoc


> 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)

Mime
View raw message