Copilot commented on code in PR #459:
URL: https://github.com/apache/tsfile/pull/459#discussion_r2048747224


##########
cpp/src/file/tsfile_io_reader.cc:
##########
@@ -393,9 +394,8 @@ int TsFileIOReader::read_device_meta_index(int32_t 
start_offset,
     device_meta_index = new (m_idx_node_buf) MetaIndexNode(&pa);
     if (RET_FAIL(read_file_->read(start_offset, data_buf, read_size,
                                   ret_read_len))) {
-    } else if (RET_FAIL(
-                   device_meta_index->deserialize_from(data_buf, read_size))) {
     }
+    ret = device_meta_index->device_deserialize_from(data_buf, read_size);
     return ret;

Review Comment:
   Removing the explicit error check for the deserialization method may lead to 
silent failures; consider handling the error return value of 
'device_deserialize_from' explicitly.
   ```suggestion
       ret = device_meta_index->device_deserialize_from(data_buf, read_size);
       if (RET_FAIL(ret)) {
           return ret;
       }
   ```



-- 
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: notifications-unsubscr...@tsfile.apache.org

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

Reply via email to