mrhhsg opened a new pull request, #63730:
URL: https://github.com/apache/doris/pull/63730

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Add `DORIS_CHECK_EQ/NE/LT/LE/GT/GE` macros for invariants 
that should remain checked in Release builds. In Debug builds they map to the 
corresponding `DCHECK_*` macros. In Release builds they evaluate each operand 
once, compare with the requested operator, and throw through the existing 
`DORIS_CHECK`-style fatal error path with a message that includes both compared 
expressions and their actual values.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Manual test
       - `ninja -C be/ut_build_ASAN 
test/CMakeFiles/doris_be_test.dir/common/status_test.cpp.o`
       - Compiled a small `-DNDEBUG` translation unit to verify the Release 
macro branch, including value-printing comparison macros.
       - `build-support/check-format.sh`
       - Attempted `./run-be-ut.sh --run --filter=StatusTest.*`, but stopped it 
after it expanded into a broad BE UT rebuild.
       - Attempted `build-support/run-clang-tidy.sh --build-dir 
be/ut_build_ASAN --files be/src/common/status.h 
be/test/common/status_test.cpp`, but it failed on pre-existing/toolchain header 
diagnostics outside this change.
   - Behavior changed: No
   - Does this need documentation: No
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to