reddycharan commented on a change in pull request #677: Issue 659: Fix
Checkpoint logic in SortedLedgerStorage
URL: https://github.com/apache/bookkeeper/pull/677#discussion_r153578019
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
##########
@@ -465,6 +437,9 @@ public void onRotateEntryLog() {
// TODO: we could consider remove checkpointSource and
checkpointSouce#newCheckpoint
// later if we provide kind of LSN (Log/Journal Squeuence Number)
// mechanism when adding entry. {@link
https://github.com/apache/bookkeeper/issues/279}
- checkpointHolder.setNextCheckpoint(checkpointSource.newCheckpoint());
+ if (null != checkpointer) {
Review comment:
@sijie I think it would be much better and cleaner if you have protected
'checkpointer' variable in InterleavedLedgerStorage and remove 'checkpointer'
variable from SortedLedgerStorage. Then override onRotateEntryLog method in SLS
and make it noop. So this way it would be easier to get what each class is
doing and when they are calling startCheckpoint. The current handling is sneaky
and one would wonder why we are having this null check and why we are doing
variable hiding/shadowing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services