[
https://issues.apache.org/jira/browse/BOOKKEEPER-956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sijie Guo resolved BOOKKEEPER-956.
----------------------------------
Resolution: Fixed
Fix Version/s: 4.5.0
Issue resolved by merging pull request 64
[https://github.com/apache/bookkeeper/pull/64]
{noformat}
commit cc3d2701687ce1a4ff14502e2214a381b43aed5f
Author: Charan Reddy Guttapalem <[email protected]>
AuthorDate: Tue Nov 8 18:08:44 2016 -0800
Commit: Sijie Guo <[email protected]>
CommitDate: Tue Nov 8 18:08:44 2016 -0800
BOOKKEEPER-956: Fix for HierarchicalLedgerRangeIterator
Fix for HierarchicalLedgerRangeIterator, to make it work
for LedgerIds of length 9 and 10
Author: Charan Reddy Guttapalem <[email protected]>
Reviewers: [email protected] <[email protected]>
Closes #64 from reddycharan/hierarchicalledgermanagerfix
{noformat}
> HierarchicalLedgerManager doesn't work for ledgerid of length 9 and 10
> because of order issue in HierarchicalLedgerRangeIterator
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-956
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-956
> Project: Bookkeeper
> Issue Type: Bug
> Reporter: Charan Reddy Guttapalem
> Assignee: Charan Reddy Guttapalem
> Fix For: 4.5.0
>
>
> Issue Description:-
> HierarchicalLedgerManager is supposed to work for ledgerids upto length of 10
> (its layout is 2-4-4). But because of order issue in
> HierarchicalLedgerRangeIterator it doesn't work correctly if we create
> Ledgers of ledgerid length 9 and 10.
> Rootcause:- in HierarchicalLedgerRangeIterator, in 'preload' method after
> getting l1Nodes by calling "zk.getChildren(ledgerRootPath, null)", they need
> to be sorted, just like l2nodes in 'nextL1Node' method
> How it manifests:-
> If we try to create Ledgers using LedgerCreateAdv api with ledgerids of
> lengths 9 and 10, write entries and read entries, it will fail with following
> exception messages
> 2015-11-30 13:57:31,209 - WARN -
> [GarbageCollectorThread:ScanAndCompareGarbageCollector@103] - Exception when
> iterating over the metadata {}
> java.lang.IllegalArgumentException: inconsistent range
> at
> java.util.concurrent.ConcurrentSkipListMap$SubMap.<init>(ConcurrentSkipListMap.java:2506)
> at
> java.util.concurrent.ConcurrentSkipListMap.subMap(ConcurrentSkipListMap.java:1984)
> at
> java.util.concurrent.ConcurrentSkipListMap.subMap(ConcurrentSkipListMap.java:93)
> at
> org.apache.bookkeeper.bookie.ScanAndCompareGarbageCollector.gc(ScanAndCompareGarbageCollector.java:86)
> at
> org.apache.bookkeeper.bookie.GarbageCollectorThread.doGcLedgers(GarbageCollectorThread.java:419)
> at
> org.apache.bookkeeper.bookie.GarbageCollectorThread.run(GarbageCollectorThread.java:377)
> org.apache.bookkeeper.client.BKException$BKNotEnoughBookiesException
> at org.apache.bookkeeper.client.BKException.create(BKException.java:58)
> at
> org.apache.bookkeeper.client.LedgerHandleAdv.addEntry(LedgerHandleAdv.java:101)
> at
> org.apache.bookkeeper.client.LedgerHandleAdv.addEntry(LedgerHandleAdv.java:70)
> at
> org.apache.bookkeeper.client.BookieWriteLedgerTest.testLedgerCreateAdvWithLedgerId(BookieWriteLedgerTest.java:212)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
> at
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)