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


##########
be/src/format/table/iceberg_reader_mixin.h:
##########
@@ -660,10 +666,10 @@ Status 
IcebergReaderMixin<BaseReader>::_position_delete_base(
         SCOPED_TIMER(_iceberg_profile.delete_rows_sort_time);
         _iceberg_delete_rows =
                 _kv_cache->template get<DeleteRows>(data_file_path, [&]() -> 
DeleteRows* {

Review Comment:
   This RAII conversion fixes the `DeleteRows` builder here, but 
`_position_delete_base` still has the same leak pattern in the `DeleteFile` 
cache builder just above it: `auto* position_delete = new DeleteFile`, then 
`_read_position_delete_file(...)`, and on any non-OK status it returns 
`nullptr`. `KVCache::get` only takes ownership when the builder returns a 
non-null pointer, so a missing/corrupt position-delete file still leaks the 
partially built `DeleteFile`. Please wrap that builder in 
`std::unique_ptr<DeleteFile>` too and release only after 
`_read_position_delete_file` succeeds.
   



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