Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired. #2854

Closed
equanz opened this issue Oct 26, 2021 · 1 comment · Fixed by #2855
Labels

Comments

@equanz
Copy link
Contributor

equanz commented Oct 26, 2021

BUG REPORT

Describe the bug

When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, all of underreplicated ledger locks are still acquired.
This issue is caused by #2833. In this PR, the method uses LedgerUnderreplicationManager#acquireUnderreplicatedLedger and LedgerUnderreplicationManager#releaseUnderreplicatedLedger instead of ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedgerLock and ZkLedgerUnderreplicationManager#releaseUnderreplicatedLedgerLock.

ZkLedgerUnderreplicationManager#releaseUnderreplicatedLedger requires ZkLedgerUnderreplicationManager#heldLocks to delete lock node. However, ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedger doesn't put lock instance to heldLocks. Therefore, can't remove lock z-node.

Moreover, ZkLedgerUnderreplicationManager#acquireUnderreplicatedLedger 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.
@equanz equanz changed the title When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, all of underreplicated ledger locks are still acquired. When ScanAndCompareGarbageCollector#removeOverReplicatedledgers is called, underreplicated ledger locks are still acquired. Oct 26, 2021
@equanz
Copy link
Contributor Author

equanz commented Nov 1, 2021

To solve this issue, I have created #2855.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant