From 688d527d7c851cd3976e73bbe43538cf833a25bb Mon Sep 17 00:00:00 2001 From: huberyxxiao Date: Mon, 18 Mar 2024 16:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20dns=20cache=20=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=E9=97=AE=E9=A2=98;=E6=96=AD=E7=82=B9=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E5=BE=84=E5=8C=85=E5=90=AB=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=96=87=E4=BB=B6=E5=A4=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/util/lru_cache.h | 2 +- src/op/object_op.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/util/lru_cache.h b/include/util/lru_cache.h index 94f4ac0..dfcf1e7 100644 --- a/include/util/lru_cache.h +++ b/include/util/lru_cache.h @@ -33,7 +33,7 @@ class LruCache { m_entry_map[key] = m_entry_list.begin(); } - const ValueType& Get(const KeyType& key) { + const ValueType Get(const KeyType& key) { std::lock_guard lock(m_mutex); auto it = m_entry_map.find(key); if (it == m_entry_map.end()) { diff --git a/src/op/object_op.cpp b/src/op/object_op.cpp index 78084c7..6713e85 100644 --- a/src/op/object_op.cpp +++ b/src/op/object_op.cpp @@ -1939,9 +1939,7 @@ CosResult ObjectOp::ResumableGetObject(const GetObjectByFileReq& req, return head_result; } - std::string dir_name = FileUtil::GetDirectory(req.GetLocalFilePath()); - std::string resumable_task_json_file = - dir_name + "/" + req.GetObjectName() + kResumableDownloadTaskFileSuffix; + std::string resumable_task_json_file = req.GetLocalFilePath() + kResumableDownloadTaskFileSuffix; std::map resume_task_check_element = { {kResumableDownloadTaskLastModified, head_resp.GetLastModified()},