tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtyim <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #53: (TEPHRA-243) Improve logging for slow log...
Date Wed, 13 Sep 2017 08:51:15 GMT
Github user chtyim commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/53#discussion_r138559950
  
    --- 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<Entry> pendingWrites = Lists.newLinkedList();
    +  private Queue<Entry> pendingWrites = new ConcurrentLinkedQueue<>();
       private TransactionLogWriter writer;
     
    -  public AbstractTransactionLog(long timestamp, MetricsCollector metricsCollector) {
    +  private final AtomicLong positionBeforeAppend = new AtomicLong(0);
    +  private final AtomicInteger countSinceLastSync = new AtomicInteger(0);
    --- End diff --
    
    And this can be just an `int` as well.


---

Mime
View raw message