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 2021/02/11 18:18:16 UTC

[GitHub] [bookkeeper] dlg99 edited a comment on pull request #2597: Issue 2506: Skip unavailable bookies during verifyLedgerFragment

dlg99 edited a comment on pull request #2597:
URL: https://github.com/apache/bookkeeper/pull/2597#issuecomment-777687525


   > I am wondering about the role of `writableBookies` and `readOnlyBookies` collections declared on lines 107 and 108. I see that those are updated reactively based on listeners. Would it make sense to add a collection for `allBookies`, add an associated listener, and then compute the `unavailableBookies` based on those three collections? I find this solution interesting because it wouldn't require any calls to ZK to calculate `unavailableBookies` and it would likely be pretty accurate.
   
   I don't think this is necessary. You can simply add `isBookieAvailable(bookieId)` which will check if the bookie is either writable or readable. 
   After all, you calculated unavailable as (all except (writable + readable)). Send request to bookies only if isBookieAvailable() is true.
   
   Pass bookieWatcher, do this check for each bookie, whenever needed. it is a dictionary lookup.
   
   `writableBookies` is a set of all bookies that are up and writable, `readOnlyBookies` - similar, but read-only.
   Bookies register in ZK (if ZK is used) and the lists updated by listeners when statuses change/bookies crash etc.
   these aren't guaranteed to be immediately updated - i.e. it takes ZK some time to detect that bookie crashed and update registration. 
   `getAllBookies()` IIRC - walks Zk path (long operation) to get set of all bookies in cluster (ever joined the cluster, not decommissioned)
   
   `quarantinedBookies` - Zk does not consider them to be down but there were problems communicating with them. I.e. networking timeout/error, reconnect that caused ensemble change. I don't think you should worry about this.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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