wenbingshen commented on PR #3496:
URL: https://github.com/apache/bookkeeper/pull/3496#issuecomment-1255852340

   > Actually, I am not sure it is right to remove the detailed stack. The 
stack will give more information when you have issues with the other 
DNSToSwitchMapping implementations. Removing it will make the log clear but it 
will be harder to know what happened exactly.
   
   @zymap Thanks for your review. :)
   
   I looked at some current implementations of DNSToSwitchMapping, only throws 
RuntimeException in the validateConf method of RawScriptBasedMapping and 
ScriptBasedMapping, by default enforceMinNumRacksPerWriteQuorum is false, even 
if RuntimeException is thrown, bookie starts and works normally, even if we 
print detailed stack info, The user may also not perceive the problem, and in 
most cases, the user does not care about the stack information, they can 
tolerate falling back to the DefaultResolver, the stack information here is not 
complicated, I think just printing the exception information is enough.
   
   For user-defined DNSToSwitchMapping implementations, such exception throwing 
rules must also be followed.
   
   Users can turn on enforceMinNumRacksPerWriteQuorum to view detailed stack 
information.
   
   As you mentioned, if there is a need to display a prompt to the user, 
perhaps the log level should be adjusted to ERROR here, and the WARN log is 
usually easily ignored.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to