You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:45:15 UTC
[GitHub] [bookkeeper] merlimat opened a new pull request #2833: Eliminate direct ZK access in ScanAndCompareGarbageCollector
merlimat opened a new pull request #2833:
URL: https://github.com/apache/bookkeeper/pull/2833
### Motivation
In `ScanAndCompareGarbageCollector` there was still direct access to ZK for the check on over-replicated ledgers. Migrated to use the `LedgerUnderreplicationManager` instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] merlimat merged pull request #2833: Eliminate direct ZK access in ScanAndCompareGarbageCollector
Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #2833:
URL: https://github.com/apache/bookkeeper/pull/2833
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] zymap commented on pull request #2833: Eliminate direct ZK access in ScanAndCompareGarbageCollector
Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #2833:
URL: https://github.com/apache/bookkeeper/pull/2833#issuecomment-945281217
@merlimat I'm working on releasing 4.14.3, do you want to include this change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] eolivelli commented on a change in pull request #2833: Eliminate direct ZK access in ScanAndCompareGarbageCollector
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #2833:
URL: https://github.com/apache/bookkeeper/pull/2833#discussion_r730376668
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java
##########
@@ -786,13 +789,14 @@ public static void acquireUnderreplicatedLedgerLock(ZooKeeper zkc, String zkLedg
LOCK_DATA, zkAcls, CreateMode.EPHEMERAL);
}
- /**
- * Release the underreplicated ledger lock if it exists.
- */
- public static void releaseUnderreplicatedLedgerLock(ZooKeeper zkc, String zkLedgersRootPath, long ledgerId)
- throws InterruptedException, KeeperException {
- if (isLedgerBeingReplicated(zkc, zkLedgersRootPath, ledgerId)) {
- zkc.delete(getUrLedgerLockZnode(getUrLockPath(zkLedgersRootPath), ledgerId), -1);
+ @Override
+ public void acquireUnderreplicatedLedger(long ledgerId)
+ throws ReplicationException {
+ try {
+ acquireUnderreplicatedLedgerLock(zkc, getUrLedgerLockZnode(urLockPath, ledgerId), ledgerId,
+ ZkUtils.getACLs(conf));
+ } catch (Exception e) {
+ throw new ReplicationException.UnavailableException("Failed to acquire underreplicated ledger lock", e);
Review comment:
What about reporting the ledgerId?
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java
##########
@@ -291,4 +283,22 @@ public void gc(GarbageCleaner garbageCleaner) {
bkActiveledgers.removeAll(overReplicatedLedgers);
return overReplicatedLedgers;
}
+
Review comment:
Static?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] merlimat commented on pull request #2833: Eliminate direct ZK access in ScanAndCompareGarbageCollector
Posted by GitBox <gi...@apache.org>.
merlimat commented on pull request #2833:
URL: https://github.com/apache/bookkeeper/pull/2833#issuecomment-945281838
> @merlimat I'm working on releasing 4.14.3, do you want to include this change?
There is one more for `AuditorElector` that needs to go in as well: https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorElector.java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org