mapleFU commented on PR #768:
URL: 
https://github.com/apache/incubator-kvrocks/pull/768#issuecomment-1212152369

   I wonder why kvrocks' `Status` uses `std::string`, it would be large, likely 
24B on stack ( for example: 
https://github.com/llvm-mirror/libcxx/blob/master/include/string#L765-L784 )
   
   When I gothrough the code of project, I found that status code is widely 
used, introducing exception might be ok or not (some says it can help trace the 
error stack: https://github.com/apache/doris/discussions/8406 , and some 
doesn't like it because of performance lost, like 
https://github.com/scylladb/seastar/issues/73 . But introducing exception will 
change the code style greatly, so I don't thinks it's a good idea to change to 
exception.
   
   Using `StatusOr` can change the error handling style without changing lots 
of codes, and it doesn't need changing other code using `Status`, so I think is 
ok to introducing it.


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