private boolean checkIsChunkSatisfied(
      IChunkMetadata chunkMetadata, int fileIndex, int subTaskId) {
    boolean isUnsealedChunkLargeEnough =
        chunkWriters[subTaskId].checkIsChunkSizeOverThreshold(
            chunkSizeLowerBoundInCompaction, chunkPointNumLowerBoundInCompaction, true);
    // if unsealed chunk is not large enough or chunk.endTime > file.endTime, then return false
    // isCurrentDeviceExistedInSourceSeqFiles[fileIndex] should be true when fileIndex !=
    // targetFileWriters.size() - 1
    if (!isCurrentDeviceExistedInSourceSeqFiles[fileIndex]
        && fileIndex != targetFileWriters.size() - 1) {
      throw new IllegalArgumentException("The device should exist in current seq file");
    }
    return isUnsealedChunkLargeEnough
        && (chunkMetadata.getEndTime() <= currentDeviceEndTime[fileIndex]
            || fileIndex == targetFileWriters.size() - 1);
  }
Flush nonAligned page to tsfile directly. Return whether the page is flushed to tsfile
successfully or not. Return false if the unsealed page is too small or the end time of page
exceeds the end time of file, else return true.

@throws IOException if io errors occurred
@throws PageException if errors occurred when write data page header
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/FastCrossCompactionWriter.java