----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4481/#review6481 -----------------------------------------------------------
It looks very good, Sijie. I have just a few points. bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/SnapshotMap.java <https://reviews.apache.org/r/4481/#comment14130> I really like the idea of using a snapshot map!! bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/SnapshotMap.java <https://reviews.apache.org/r/4481/#comment14131> Possibly not a big deal, but I wonder if it is really necessary to use this lock. In the way I read the code, I think it would work without it, but perhaps I'm missing something important. bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/GcLedgersTest.java <https://reviews.apache.org/r/4481/#comment14132> Can we perhaps use another latch here instead of time? Relying on time doesn't always work and in many cases it will induce unnecessary waiting time. - fpj On 2012-03-26 14:45:30, Sijie Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/4481/ > ----------------------------------------------------------- > > (Updated 2012-03-26 14:45:30) > > > Review request for bookkeeper. > > > Summary > ------- > > create a snapshot of bookie active ledgers, and then fetch the list of > zookeeper metadata, then it is safe to do garbage collection. > > > This addresses bug BOOKKEEPER-193. > https://issues.apache.org/jira/browse/BOOKKEEPER-193 > > > Diffs > ----- > > > bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/LedgerManagerTestCase.java > PRE-CREATION > > bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/GcLedgersTest.java > PRE-CREATION > bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/SnapshotMap.java > PRE-CREATION > > bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java > 9d9bf22 > > bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/FlatLedgerManager.java > 100cdad > > Diff: https://reviews.apache.org/r/4481/diff > > > Testing > ------- > > > Thanks, > > Sijie > >
