gavinchou commented on code in PR #56170:
URL: https://github.com/apache/doris/pull/56170#discussion_r2359912011
##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -2211,6 +2213,14 @@ bool
BlockFileCache::try_reserve_during_async_load(size_t size,
return !_disk_resource_limit_mode || removed_size >= size;
}
+void BlockFileCache::clear_need_update_lru_blocks() {
+ std::vector<FileBlockSPtr> buffer;
+ buffer.reserve(1024);
+ while (_need_update_lru_blocks.try_dequeue_bulk(buffer.data(),
buffer.capacity())) {
+ buffer.clear();
Review Comment:
this `clear()` does not make sense, it does not clear anything since
buffer.size() is always 0 because L2218 is `reserve()`
do nothing if you just intend to use a tmp buffer for bulk dequeue.
--
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]