morningman commented on code in PR #26741:
URL: https://github.com/apache/doris/pull/26741#discussion_r1389450763


##########
be/src/io/fs/buffered_reader.h:
##########
@@ -141,6 +140,11 @@ class MergeRangeFileReader : public io::FileReader {
         _range_cached_data.resize(random_access_ranges.size());
         _size = _reader->size();
         _remaining = TOTAL_BUFFER_SIZE;
+        _is_oss = typeid_cast<io::S3FileReader*>(_reader.get()) != nullptr;
+        _max_amplified_ratio = config::max_amplified_read_ratio;
+        // Equivalent min size of each IO that can reach the maximum storage 
speed limit:
+        // 512KB for oss, 4KB for hdfs
+        _equivalent_io_size = _is_oss ? 512 * 1024 : 4 * 1024;

Review Comment:
   Better define 512k and 4k as a constexpr, will be more readable



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