bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-1058: Ignore already deleted ledger on replication audit
Date Mon, 15 May 2017 17:32:38 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master 5130d3596 -> 811ece53a


BOOKKEEPER-1058: Ignore already deleted ledger on replication audit

Replication auditor should skip ledgers that were deleted since the auditing was started.

Author: rdhabalia <rdhabalia@yahoo-inc.com>

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org>

Closes #146 from merlimat/ignore-deleted-ledgers-in-replication


Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/811ece53
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/811ece53
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/811ece53

Branch: refs/heads/master
Commit: 811ece53a1c975c4e768422f3d622ac9de6b3e41
Parents: 5130d35
Author: rdhabalia <rdhabalia@yahoo-inc.com>
Authored: Mon May 15 10:32:26 2017 -0700
Committer: Sijie Guo <sijie@apache.org>
Committed: Mon May 15 10:32:26 2017 -0700

----------------------------------------------------------------------
 .../org/apache/bookkeeper/replication/BookieLedgerIndexer.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/811ece53/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/BookieLedgerIndexer.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/BookieLedgerIndexer.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/BookieLedgerIndexer.java
index 1b4efaf..e28137e 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/BookieLedgerIndexer.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/BookieLedgerIndexer.java
@@ -71,7 +71,7 @@ public class BookieLedgerIndexer {
                     final AsyncCallback.VoidCallback iterCallback) {
                 GenericCallback<LedgerMetadata> genericCallback = new GenericCallback<LedgerMetadata>()
{
                     @Override
-                    public void operationComplete(final int rc,
+                    public void operationComplete(int rc,
                             LedgerMetadata ledgerMetadata) {
                         if (rc == BKException.Code.OK) {
                             for (Map.Entry<Long, ArrayList<BookieSocketAddress>>
ensemble : ledgerMetadata
@@ -83,6 +83,10 @@ public class BookieLedgerIndexer {
                                               ledgerId);
                                 }
                             }
+                        } else if (rc == BKException.Code.NoSuchLedgerExistsException) {
+                            LOG.info("Ignoring replication of already deleted ledger {}",
+                                    ledgerId);
+                            rc = BKException.Code.OK;
                         } else {
                             LOG.warn("Unable to read the ledger:" + ledgerId
                                     + " information");


Mime
View raw message