SilverNarcissus commented on a change in pull request #2405:
URL: https://github.com/apache/iotdb/pull/2405#discussion_r557195797
##########
File path: server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
##########
@@ -712,25 +875,31 @@ public boolean moveTsfile(File tsfileToBeMoved, File
targetDir)
* @return sg name
*/
private String getSgByEngineFile(File file) {
- return file.getParentFile().getParentFile().getName();
+ return file.getParentFile().getParentFile().getParentFile().getName();
}
/**
* @return TsFiles (seq or unseq) grouped by their storage group and
partition number.
*/
public Map<PartialPath, Map<Long, List<TsFileResource>>>
getAllClosedStorageGroupTsFile() {
Map<PartialPath, Map<Long, List<TsFileResource>>> ret = new HashMap<>();
- for (Entry<PartialPath, StorageGroupProcessor> entry :
processorMap.entrySet()) {
- List<TsFileResource> allResources =
entry.getValue().getSequenceFileTreeSet();
- allResources.addAll(entry.getValue().getUnSequenceFileList());
- for (TsFileResource sequenceFile : allResources) {
- if (!sequenceFile.isClosed()) {
- continue;
+ for (Entry<PartialPath, VirtualStorageGroupManager> entry :
processorMap.entrySet()) {
+ for (StorageGroupProcessor storageGroupProcessor : entry.getValue()
+ .getAllVirutalStorageGroupProcessor()) {
+ if (storageGroupProcessor != null) {
+ List<TsFileResource> allResources =
storageGroupProcessor.getSequenceFileTreeSet();
+ allResources.addAll(storageGroupProcessor.getUnSequenceFileList());
+ for (TsFileResource sequenceFile : allResources) {
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]