You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/06 07:36:27 UTC

[GitHub] [incubator-doris] pengxiangyu commented on a diff in pull request #9197: Support remote storage, step 5 only be, add remote file reader

pengxiangyu commented on code in PR #9197:
URL: https://github.com/apache/incubator-doris/pull/9197#discussion_r866564831


##########
be/src/olap/fs/cached_segment_loader.cpp:
##########
@@ -0,0 +1,75 @@
+// specific language governing permissions and limitations
+// under the License.
+
+#include "olap/fs/cached_segment_loader.h"
+
+#include "util/filesystem_util.h"
+#include "util/stopwatch.hpp"
+
+namespace doris {
+CachedSegmentLoader::CachedSegmentLoader(size_t capacity)
+        : _mem_tracker(MemTracker::create_tracker(
+        capacity, "CachedSegmentLoader", nullptr, MemTrackerLevel::OVERVIEW)) {
+    _cache = std::unique_ptr<Cache>(new_lru_cache("CachedSegmentCache", capacity));
+
+}
+
+bool CachedSegmentLoader::_lookup(const CachedSegmentLoader::CacheKey& key, CachedSegmentCacheHandle* handle) {
+    auto lru_handle = _cache->lookup(key.encode());

Review Comment:
   It isn't like a C++ code style.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org