Copilot commented on code in PR #60629:
URL: https://github.com/apache/doris/pull/60629#discussion_r2783629434


##########
be/src/olap/rowset/rowset_meta.cpp:
##########
@@ -159,6 +158,9 @@ io::FileSystemSPtr RowsetMeta::fs() {
             wrapped = std::make_shared<io::PackedFileSystem>(wrapped, 
index_map, append_info);
         }
     }
+
+    // Then apply encryption on top
+    wrapped = io::make_file_system(wrapped, algorithm.value());
     return wrapped;

Review Comment:
   `algorithm.value()` is used without a local `has_value()` guard, while the 
write-path code in this PR does guard it. If `algorithm` can ever be empty 
here, this will trigger `std::bad_optional_access` (or equivalent) and crash. 
Consider adding the same `if (algorithm.has_value()) { ... }` guard (or an 
explicit CHECK/assert documenting the invariant) to keep behavior safe and 
consistent.



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