Open git-hulk opened 2 months ago
@AntiTopQuark Would you like to take this issue?
@AntiTopQuark Would you like to take this issue?
I’d be happy to take on this issue. :)
The first macro is duplicated with the current GET_OR_RET macro.
For the second I think it depends on the context, e.g. rocksdb::Status -> Status? rocksdb::Status -> rocksdb::Status?
We can extend GET_OR_RET for the latter, and the former doesn't require new macro.
For the second I think it depends on the context, e.g. rocksdb::Status -> Status? rocksdb::Status -> rocksdb::Status?
We can extend GET_OR_RET for the latter, and the former doesn't require new macro.
Yes, my bad. GET_OR_RET allows ignoring the return value, so the former one is unnecessary.
Followup code improvements mentioned in PR #2508. Currently, we check and return error if the status is not ok in many many places, which can be improved by introducing macros.
The naming candidates can be:
and for converting the rocksdb status if there is an error:
Originally posted by @mapleFU in https://github.com/apache/kvrocks/pull/2508#pullrequestreview-2276461263