github-actions[bot] commented on code in PR #68047:
URL: https://github.com/apache/doris/pull/68047#discussion_r4022264337
##########
be/src/format_v2/parquet/parquet_file_context.cpp:
##########
@@ -120,13 +120,13 @@ Status NativeParquetMetadata::init_schema(bool
enable_mapping_varbinary,
namespace detail {
-Status validate_native_footer_size(uint32_t serialized_size, size_t file_size,
- size_t metadata_size_limit) {
+Status validate_native_footer_size(uint32_t serialized_size, size_t file_size)
{
if (file_size < V2_PARQUET_FOOTER_SIZE ||
serialized_size > file_size - V2_PARQUET_FOOTER_SIZE) {
return Status::Corruption("Parquet v2 footer size {} exceeds file size
{}", serialized_size,
file_size);
}
+ const size_t metadata_size_limit =
static_cast<size_t>(config::parquet_metadata_size_limit);
Review Comment:
[P2] Keep the mutable limit signed until it has been validated. The numeric
`set_config()` path stores the candidate global before invoking its validator
and rolls it back only after rejection. A footer parse concurrent with a
rejected update such as `parquet_metadata_size_limit=-1` can therefore observe
`-1` here, convert it to `SIZE_MAX`, and admit a file-controlled footer that
the stable limit would reject. Please snapshot the signed value, reject `<= 0`,
and compare in the signed domain (or publish validated updates atomically) so a
failed update cannot transiently remove this allocation ceiling.
--
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]