> On Nov. 2, 2012, 11:48 a.m., Ivan Kelly wrote: > > hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java, > > line 145 > > <https://reviews.apache.org/r/7775/diff/1/?file=182289#file182289line145> > > > > Am I correct in thinking that the original logic here was incorrect?
Yeah, I think both of the orignal comment and its implementation code were incorrect. > On Nov. 2, 2012, 11:48 a.m., Ivan Kelly wrote: > > hedwig-server/src/main/java/org/apache/hedwig/server/persistence/BookkeeperPersistenceManager.java, > > line 237 > > <https://reviews.apache.org/r/7775/diff/1/?file=182288#file182288line237> > > > > Are you sure you want to throw a RuntimeException here, as this will > > probably take the whole hub down. I don't quit sure about the criterial when to throw a RuntimeException in a system, but it seems use an error logging is Ok here. - Jiannan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7775/#review13035 ----------------------------------------------------------- On Oct. 30, 2012, 10:17 a.m., Jiannan Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7775/ > ----------------------------------------------------------- > > (Updated Oct. 30, 2012, 10:17 a.m.) > > > Review request for bookkeeper. > > > Description > ------- > > Since InMemorySubscriptionState and LedgerRanges is maintained separately, > there may exist such inconsistent state: > (1). Topic ledgers: L1 [1 ~ 2], L2 [3 ~ ] > (2). Subscriber consumes to 2 and InMemorySubscriptionState is updated > successfully but failed when updating subscription state metadata > (3). AbstractSubscriptionManager#MessagesConsumedTask use > InMemorySubscriptionState to do garbage collection and L1 is delete > (4). If Hub restarts at this time, old subscription state is read and Hub > will try to deliver message from 1 > > > This addresses bug BOOKKEEPER-442. > https://issues.apache.org/jira/browse/BOOKKEEPER-442 > > > Diffs > ----- > > > hedwig-server/src/main/java/org/apache/hedwig/server/persistence/BookkeeperPersistenceManager.java > 40811de > > hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java > bbe8edf > > hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/InMemorySubscriptionState.java > 34b54b8 > > hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java > c645b11 > > Diff: https://reviews.apache.org/r/7775/diff/ > > > Testing > ------- > > Two test are added > > > Thanks, > > Jiannan Wang > >
