horsteff commented on issue #6924:
URL: https://github.com/apache/pulsar/issues/6924#issuecomment-656214989


   @xavipen Recently I discovered that the default value for 
`managedLedgerDefaultEnsembleSize` in the ServiceConfiguration class was 
changed from 1 to 2 with version 2.5.0 (together with the values for 
`managedLedgerDefaultWriteQuorum` and `managedLedgerDefaultAckQuorum`), but the 
default number of bookies stays at 1. So the ledger needs two bookies by 
default but gets only one, which leads to the "Not enough non-faulty bookies 
available" error.
   
   To avoid this problem you can either change the values of 
`managedLedgerDefaultEnsembleSize`, `managedLedgerDefaultWriteQuorum` and 
`managedLedgerDefaultAckQuorum` to 1 (with `broker.getConfig().set...`, using 
the config file does not work) or set the number of bookies to 2 (with 
`PulsarStandaloneBuilder.instance().withNumOfBk` or `broker.setNumOfBk`). 
Either way works for me.
   
   @sijie Should the default `numOfBk` in `PulsarStandalone` be changed to 2 
according to default `managedLedgerDefaultEnsembleSize` to avoid this problem? 
I think, it doesn't make sense to have less bookies than required for a ledger.


----------------------------------------------------------------
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:
[email protected]


Reply via email to