github-actions[bot] commented on code in PR #27388:
URL: https://github.com/apache/doris/pull/27388#discussion_r1401470950


##########
be/src/io/fs/buffered_reader.cpp:
##########
@@ -453,11 +451,14 @@ void PrefetchBuffer::prefetch_buffer() {
         buf_size = merge_small_ranges(_offset, read_range_index);
     }
 
+    _len = 0;
+    Status s;
+
     {
         SCOPED_RAW_TIMER(&_statis.read_time);
         s = _reader->read_at(_offset, Slice {_buf.get(), buf_size}, &_len, 
_io_ctx);
     }
-    if (UNLIKELY(buf_size != _len)) {
+    if (UNLIKELY(s.ok() && buf_size != _len)) {

Review Comment:
   warning: boolean expression can be simplified by DeMorgan's theorem 
[readability-simplify-boolean-expr]
   ```cpp
       if (UNLIKELY(s.ok() && buf_size != _len)) {
           ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/common/compiler_util.h:35:** expanded from macro 'UNLIKELY'
   ```cpp
   #define UNLIKELY(expr) __builtin_expect(!!(expr), 0)
                                            ^
   ```
   
   </details>
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to