You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2017/12/18 19:00:50 UTC
[GitHub] eolivelli commented on a change in pull request #873: Issue280: Turn bookie into readonly when sortedLedgerStorage failed to flush data
eolivelli commented on a change in pull request #873: Issue280: Turn bookie into readonly when sortedLedgerStorage failed to flush data
URL: https://github.com/apache/bookkeeper/pull/873#discussion_r157570535
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
##########
@@ -862,6 +863,11 @@ public synchronized void start() {
ledgerStorage.start();
+ // if ledgerStorage is SortedLedgerStorage, then add SortedLedgerStorageListener
+ if (ledgerStorage instanceof SortedLedgerStorage){
+ ((SortedLedgerStorage) ledgerStorage).addSortedLedgerStorageListener(getSortedLedgerStorageListener());
Review comment:
This is not very good, it is bad practice to use instanceof in this case. We should have a common interface
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services