SilverNarcissus commented on a change in pull request #2405:
URL: https://github.com/apache/iotdb/pull/2405#discussion_r557201314
##########
File path: server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
##########
@@ -742,24 +911,19 @@ public void setFileFlushPolicy(TsFileFlushPolicy
fileFlushPolicy) {
public boolean isFileAlreadyExist(TsFileResource tsFileResource, PartialPath
storageGroup,
long partitionNum) {
- StorageGroupProcessor processor = processorMap.get(storageGroup);
- return processor != null && processor.isFileAlreadyExist(tsFileResource,
partitionNum);
- }
-
- public static long getTimePartitionInterval() {
- if (timePartitionInterval == -1) {
- initTimePartition();
+ VirtualStorageGroupManager virtualStorageGroupManager =
processorMap.get(storageGroup);
+ if (virtualStorageGroupManager == null) {
+ return false;
}
- return timePartitionInterval;
- }
-
- @TestOnly
- public static void setTimePartitionInterval(long timePartitionInterval) {
- StorageEngine.timePartitionInterval = timePartitionInterval;
- }
- public static long getTimePartition(long time) {
- return enablePartition ? time / timePartitionInterval : 0;
+ for (StorageGroupProcessor storageGroupProcessor :
virtualStorageGroupManager
+ .getAllVirutalStorageGroupProcessor()) {
+ if (storageGroupProcessor != null && storageGroupProcessor
+ .isFileAlreadyExist(tsFileResource, partitionNum)) {
+ return true;
+ }
+ }
Review comment:
fixed~
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]