You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ej...@apache.org on 2021/05/21 08:06:53 UTC
[iotdb] branch dynamic_compaction updated: fix hitter
This is an automated email from the ASF dual-hosted git repository.
ejttianyu pushed a commit to branch dynamic_compaction
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dynamic_compaction by this push:
new 3172ee5 fix hitter
3172ee5 is described below
commit 3172ee533e0270401af73bdb67dc7972e22f09a0
Author: EJTTianyu <16...@qq.com>
AuthorDate: Fri May 21 16:06:25 2021 +0800
fix hitter
---
.../org/apache/iotdb/db/engine/heavyhitter/hitter/HashMapHitter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/heavyhitter/hitter/HashMapHitter.java b/server/src/main/java/org/apache/iotdb/db/engine/heavyhitter/hitter/HashMapHitter.java
index 6e6d5a7..f9b735d 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/heavyhitter/hitter/HashMapHitter.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/heavyhitter/hitter/HashMapHitter.java
@@ -77,7 +77,7 @@ public class HashMapHitter implements QueryHeavyHitters {
@Override
public List<PartialPath> getTopCompactionSeries(PartialPath sgName) throws MetadataException {
- hitterLock.readLock().lock();
+ hitterLock.writeLock().lock();
try {
List<PartialPath> ret = new ArrayList<>();
topHeap.addAll(counter.entrySet());
@@ -93,7 +93,7 @@ public class HashMapHitter implements QueryHeavyHitters {
topHeap.clear();
return ret;
} finally {
- hitterLock.readLock().unlock();
+ hitterLock.writeLock().unlock();
}
}