This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rel/0.11
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/0.11 by this push:
new fa4c274 Downgrade readlock to writelock in delete
fa4c274 is described below
commit fa4c2745f386a15eb49f103e3ccdcf159ee004b3
Author: JackieTien97 <[email protected]>
AuthorDate: Sat Mar 6 16:05:36 2021 +0800
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 9a5f07c..5c9cc4d 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
@@ -1513,7 +1513,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
@@ -1560,7 +1560,7 @@ public class StorageGroupProcessor {
throw new IOException(e);
} finally {
writeUnlock();
- tsFileManagement.writeUnlock();
+ tsFileManagement.readUnLock();
}
}