You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/20 11:07:09 UTC
[doris] branch master updated: [fix](cache) fix that ShardedLRUCache may coredump when destructor was called (#10995)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c037066163 [fix](cache) fix that ShardedLRUCache may coredump when destructor was called (#10995)
c037066163 is described below
commit c037066163bf18d5f9113f44055d25b1d550f5b5
Author: Xin Liao <li...@126.com>
AuthorDate: Wed Jul 20 19:07:04 2022 +0800
[fix](cache) fix that ShardedLRUCache may coredump when destructor was called (#10995)
---
be/src/olap/lru_cache.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/lru_cache.cpp b/be/src/olap/lru_cache.cpp
index 146ab34c4e..b1834efac3 100644
--- a/be/src/olap/lru_cache.cpp
+++ b/be/src/olap/lru_cache.cpp
@@ -462,14 +462,14 @@ ShardedLRUCache::ShardedLRUCache(const std::string& name, size_t total_capacity,
}
ShardedLRUCache::~ShardedLRUCache() {
+ _entity->deregister_hook(_name);
+ DorisMetrics::instance()->metric_registry()->deregister_entity(_entity);
if (_shards) {
for (int s = 0; s < _num_shards; s++) {
delete _shards[s];
}
delete[] _shards;
}
- _entity->deregister_hook(_name);
- DorisMetrics::instance()->metric_registry()->deregister_entity(_entity);
}
Cache::Handle* ShardedLRUCache::insert(const CacheKey& key, void* value, size_t charge,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org