Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2307,6 +2307,10 @@
private void deleteAllObjectFiles(List<String> folders) {
for (String objectFolder : folders) {
File dataRegionObjectFolder = fsFactory.getFile(objectFolder, dataRegionIdString);
if (!dataRegionObjectFolder.exists()) {
continue;
}

AtomicLong totalSize = new AtomicLong(0);
AtomicInteger count = new AtomicInteger(0);
try (Stream<Path> paths = Files.walk(dataRegionObjectFolder.toPath())) {
Expand Down Expand Up @@ -2613,7 +2617,7 @@
* lock if return true, the caller is responsible for unlocking all the already-acquiring lock
* in needToUnLockList
*/
private boolean tryGetFLushLock(

Check warning on line 2620 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 81 to 64, Complexity from 19 to 14, Nesting Level from 5 to 2, Number of Variables from 17 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ6QOnFY10gqRWuL4ijG&open=AZ6QOnFY10gqRWuL4ijG&pullRequest=17840
long waitTimeInMs,
IDeviceID singleDeviceId,
Filter globalTimeFilter,
Expand Down Expand Up @@ -3052,7 +3056,7 @@
}
}

public void deleteByTable(RelationalDeleteDataNode node) throws IOException {

Check warning on line 3059 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 97 to 64, Complexity from 17 to 14, Nesting Level from 7 to 2, Number of Variables from 24 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ6QOnFY10gqRWuL4ijH&open=AZ6QOnFY10gqRWuL4ijH&pullRequest=17840
if (node.getDatabaseName() != null && !node.getDatabaseName().equals(databaseName)) {
// not targeted on this database, return
return;
Expand Down Expand Up @@ -3443,7 +3447,7 @@
}
}

private void deleteDataInSealedFiles(Collection<TsFileResource> sealedTsFiles, ModEntry deletion)

Check warning on line 3450 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 149 to 64, Complexity from 29 to 14, Nesting Level from 5 to 2, Number of Variables from 26 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ6QOnFY10gqRWuL4ijI&open=AZ6QOnFY10gqRWuL4ijI&pullRequest=17840
throws IOException {
Set<ModificationFile> involvedModificationFiles = new HashSet<>();
List<TsFileResource> deletedByMods = new ArrayList<>();
Expand Down
Loading