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


---

Reply via email to