distributedlog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiazhai <...@git.apache.org>
Subject [GitHub] incubator-distributedlog pull request #133: DL-124: Use Java8 Future rather ...
Date Sat, 03 Jun 2017 10:50:49 GMT
Github user jiazhai commented on a diff in the pull request:

    https://github.com/apache/incubator-distributedlog/pull/133#discussion_r119984432
  
    --- Diff: distributedlog-core/src/main/java/org/apache/distributedlog/BKAbstractLogWriter.java
---
    @@ -357,80 +354,72 @@ private void truncateLogSegmentsIfNecessary(BKLogWriteHandler writeHandler)
{
             // skip scheduling if there is task that's already running
             //
             synchronized (this) {
    -            if (truncationEnabled && ((lastTruncationAttempt == null) || lastTruncationAttempt.isDefined()))
{
    +            if (truncationEnabled && ((lastTruncationAttempt == null) || lastTruncationAttempt.isDone()))
{
                     lastTruncationAttempt = writeHandler.purgeLogSegmentsOlderThanTimestamp(minTimestampToKeep);
                 }
             }
         }
     
    -    private Future<BKLogSegmentWriter> asyncStartNewLogSegment(final BKLogWriteHandler
writeHandler,
    +    private CompletableFuture<BKLogSegmentWriter> asyncStartNewLogSegment(final
BKLogWriteHandler writeHandler,
                                                                    final long startTxId,
    --- End diff --
    
    Please also do the code alignment change here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message