You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/05/25 04:23:18 UTC

[iotdb] branch tsfile_status updated: remove unnecessary judgement on cross selector

This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a commit to branch tsfile_status
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/tsfile_status by this push:
     new 254715fb4ff remove unnecessary judgement on cross selector
254715fb4ff is described below

commit 254715fb4ff4051095b663a0c4f5ca5ef45fe669
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Thu May 25 12:23:07 2023 +0800

    remove unnecessary judgement on cross selector
---
 .../compaction/selector/utils/CrossSpaceCompactionCandidate.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/compaction/selector/utils/CrossSpaceCompactionCandidate.java b/server/src/main/java/org/apache/iotdb/db/engine/compaction/selector/utils/CrossSpaceCompactionCandidate.java
index 9125c9bd8a3..26d0ee0b1ab 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/compaction/selector/utils/CrossSpaceCompactionCandidate.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/compaction/selector/utils/CrossSpaceCompactionCandidate.java
@@ -142,7 +142,7 @@ public class CrossSpaceCompactionCandidate {
   private List<TsFileResourceCandidate> filterUnseqResource(List<TsFileResource> unseqResources) {
     List<TsFileResourceCandidate> ret = new ArrayList<>();
     for (TsFileResource resource : unseqResources) {
-      if (resource.getStatus() != TsFileResourceStatus.NORMAL || !resource.getTsFile().exists()) {
+      if (resource.getStatus() != TsFileResourceStatus.NORMAL) {
         break;
       } else if (resource.stillLives(ttlLowerBound)) {
         ret.add(new TsFileResourceCandidate(resource));
@@ -197,9 +197,7 @@ public class CrossSpaceCompactionCandidate {
       this.selected = false;
       // although we do the judgement here, the task should be validated before executing because
       // the status of file may be changed after the task is submitted to queue
-      this.isValidCandidate =
-          tsFileResource.getStatus() == TsFileResourceStatus.NORMAL
-              && tsFileResource.getTsFile().exists();
+      this.isValidCandidate = tsFileResource.getStatus() == TsFileResourceStatus.NORMAL;
     }
 
     /**