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/26 06:45:28 UTC
[GitHub] [bookkeeper] equanz opened a new issue #2854: When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, all of underreplicated ledger locks are still acquired.
equanz opened a new issue #2854:
URL: https://github.com/apache/bookkeeper/issues/2854
**BUG REPORT**
***Describe the bug***
When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, all of underreplicated ledger locks are still acquired.
This issue is caused by https://github.com/apache/bookkeeper/pull/2833. In this PR, the method uses [LedgerUnderreplicationManager#acquireUnderreplicatedLedger](https://github.com/apache/bookkeeper/blob/4ae5b3b5a6bf5a13ea73a2f6157a56ad22ec4ebe/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java#L256) and [LedgerUnderreplicationManager#releaseUnderreplicatedLedger](https://github.com/apache/bookkeeper/blob/4ae5b3b5a6bf5a13ea73a2f6157a56ad22ec4ebe/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java#L273) instead of [ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedgerLock](https://github.com/apache/bookkeeper/blob/455ac52360bf98b61f2b498cf35c5dc5acaba82e/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java#L247-L248) and [ZkLedgerUnderreplicationManager#releaseUnderreplicatedLedgerLock](https://github.com/apache/bookkeeper/blob/455ac52360bf98b
61f2b498cf35c5dc5acaba82e/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java#L276-L277).
[ZkLedgerUnderreplicationManager#releaseUnderreplicatedLedger](https://github.com/apache/bookkeeper/blob/4ae5b3b5a6bf5a13ea73a2f6157a56ad22ec4ebe/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java#L621-L641) requires ZkLedgerUnderreplicationManager#heldLocks to delete lock node. However, [ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedger](https://github.com/apache/bookkeeper/blob/4ae5b3b5a6bf5a13ea73a2f6157a56ad22ec4ebe/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java#L792-L802) doesn't put lock instance to heldLocks. Therefore, can't remove lock z-node.
Moreover, [ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedger](https://github.com/apache/bookkeeper/blob/4ae5b3b5a6bf5a13ea73a2f6157a56ad22ec4ebe/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java#L792-L802) creates `/ledgers/underreplication/locks/urL${ledgerId}/underreplication/locks/urL${ledgerId}` node. It has redundant path `urL${ledgerId}/underreplication/locks/` by non ephemeral z-node. I think `/ledgers/underreplication/locks/urL${ledgerId}` is correct.
**I think this issue blocks the release. I will fix the issue.**
***To Reproduce***
Steps to reproduce the behavior:
1. Run ScanAndCompareGarbageCollector#removeOverReplicatedledgers with ZKMetadataBookieDriver
2. Check underreplicated ledger lock
***Expected behavior***
* ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedger will create lock node with correct path.
* ScanAndCompareGarbageCollector#removeOverReplicatedledgers will remove lock z-node when the process is completed.
--
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 closed issue #2854: When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired.
Posted by GitBox <gi...@apache.org>.
merlimat closed issue #2854:
URL: https://github.com/apache/bookkeeper/issues/2854
--
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 closed issue #2854: When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired.
Posted by GitBox <gi...@apache.org>.
merlimat closed issue #2854:
URL: https://github.com/apache/bookkeeper/issues/2854
--
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] equanz commented on issue #2854: When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired.
Posted by GitBox <gi...@apache.org>.
equanz commented on issue #2854:
URL: https://github.com/apache/bookkeeper/issues/2854#issuecomment-955915410
To solve this issue, I have created https://github.com/apache/bookkeeper/pull/2855.
--
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 closed issue #2854: When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired.
Posted by GitBox <gi...@apache.org>.
merlimat closed issue #2854:
URL: https://github.com/apache/bookkeeper/issues/2854
--
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