You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/01/05 23:22:24 UTC

[bookkeeper] branch master updated: ISSUE #950: EntryLogger.extractEntryLogMetadataByScanning: fix check

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new d320936  ISSUE #950: EntryLogger.extractEntryLogMetadataByScanning: fix check
d320936 is described below

commit d320936c00c3eeae0a4e2795f0a9bfa780fd6f98
Author: Samuel Just <sj...@salesforce.com>
AuthorDate: Fri Jan 5 15:22:15 2018 -0800

    ISSUE #950: EntryLogger.extractEntryLogMetadataByScanning: fix check
    
    0 is a valid ledger id. Seems to be causing
    test2RWsShouldCompeteForReplicationOf2FragmentsAndCompleteReplication to
    fail in cases where the gc runs before the recovery reads happen. The gc
    winds up believing the entry log to be empty and deletes it erroneously.
    
    Introduced in 143bd1952851ac70ace9d16c3708ae30dad2a0aa.
    
    (bug W-4596080)
    Signed-off-by: Samuel Just <sjustsalesforce.com>
    
    Author: Samuel Just <sj...@salesforce.com>
    
    Reviewers: Enrico Olivelli <eo...@gmail.com>, Sijie Guo <si...@apache.org>
    
    This closes #951 from athanatos/forupstream/issue-950, closes #950
---
 .../src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
index a1a9254..4eab466 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
@@ -1339,7 +1339,7 @@ public class EntryLogger {
 
             @Override
             public boolean accept(long ledgerId) {
-                return ledgerId > 0;
+                return ledgerId >= 0;
             }
         });
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@bookkeeper.apache.org" <co...@bookkeeper.apache.org>'].