Skip to content

Commit

Permalink
Next
Browse files Browse the repository at this point in the history
  • Loading branch information
Caideyipi committed Jan 25, 2025
1 parent e2a8881 commit a05c523
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1201,11 +1201,12 @@ public class IoTDBConfig {
+ IoTDBConstant.LOAD_TSFILE_FOLDER_NAME
+ File.separator
+ IoTDBConstant.LOAD_TSFILE_ACTIVE_LISTENING_FAILED_FOLDER_NAME;

private long loadActiveListeningCheckIntervalSeconds = 5L;

private int loadActiveListeningMaxThreadNum = Runtime.getRuntime().availableProcessors();

private boolean loadActiveListeningVerifyEnable = true;

/** Pipe related */
/** initialized as empty, updated based on the latest `systemDir` during querying */
private String[] pipeReceiverFileDirs = new String[0];
Expand Down Expand Up @@ -4146,6 +4147,14 @@ public void setLoadActiveListeningMaxThreadNum(int loadActiveListeningMaxThreadN
this.loadActiveListeningMaxThreadNum = loadActiveListeningMaxThreadNum;
}

public boolean isLoadActiveListeningVerifyEnable() {
return loadActiveListeningVerifyEnable;
}

public void setLoadActiveListeningVerifyEnable(boolean loadActiveListeningVerifyEnable) {
this.loadActiveListeningVerifyEnable = loadActiveListeningVerifyEnable;
}

public long getLoadActiveListeningCheckIntervalSeconds() {
return loadActiveListeningCheckIntervalSeconds;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,12 @@ private void loadLoadTsFileProps(TrimProperties properties) {
if (conf.getLoadActiveListeningMaxThreadNum() <= 0) {
conf.setLoadActiveListeningMaxThreadNum(Runtime.getRuntime().availableProcessors());
}

conf.setLoadActiveListeningVerifyEnable(
Boolean.parseBoolean(
properties.getProperty(
"load_active_listening_verify_enable",
Boolean.toString(conf.isLoadActiveListeningVerifyEnable()))));
}

private void loadLoadTsFileHotModifiedProp(TrimProperties properties) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class ActiveLoadTsFileLoader {
private final AtomicReference<WrappedThreadPoolExecutor> activeLoadExecutor =
new AtomicReference<>();
private final AtomicReference<String> failDir = new AtomicReference<>();
private final boolean isVerify = IOTDB_CONFIG.isLoadActiveListeningVerifyEnable();

public int getCurrentAllowedPendingSize() {
return MAX_PENDING_SIZE - pendingQueue.size();
Expand Down Expand Up @@ -198,7 +199,7 @@ private TSStatus loadTsFile(final Pair<String, Boolean> filePair) throws FileNot
final LoadTsFileStatement statement = new LoadTsFileStatement(filePair.getLeft());
statement.setDeleteAfterLoad(true);
statement.setConvertOnTypeMismatch(true);
statement.setVerifySchema(true);
statement.setVerifySchema(isVerify);
statement.setAutoCreateDatabase(false);
return executeStatement(filePair.getRight() ? new PipeEnrichedStatement(statement) : statement);
}
Expand Down

0 comments on commit a05c523

Please sign in to comment.