This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 76b6d82 Downgrade readlock to writelock in delete (#2774)
76b6d82 is described below
commit 76b6d8206840e427e3904649d254e6c1b6aafcf7
Author: zhanglingzhe0820 <[email protected]>
AuthorDate: Fri Mar 5 16:01:07 2021 +0800
Downgrade readlock to writelock in delete (#2774)
Downgrade readlock to writelock in delete
---
.../apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index 228a328..b5b76df 100755
---
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -1676,7 +1676,7 @@ public class StorageGroupProcessor {
// TODO: how to avoid partial deletion?
// FIXME: notice that if we may remove a SGProcessor out of memory, we
need to close all opened
// mod files in mergingModification, sequenceFileList, and
unsequenceFileList
- tsFileManagement.writeLock();
+ tsFileManagement.readLock();
writeLock();
// record files which are updated so that we can roll back them in case of
exception
@@ -1719,7 +1719,7 @@ public class StorageGroupProcessor {
throw new IOException(e);
} finally {
writeUnlock();
- tsFileManagement.writeUnlock();
+ tsFileManagement.readUnLock();
}
}