Skip to content

Commit

Permalink
Fixed the timeout of device schema fetch to the timeout of the caller…
Browse files Browse the repository at this point in the history
… query/write operation
  • Loading branch information
Caideyipi authored Dec 30, 2024
1 parent 4f19e6c commit fc36adb
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import org.apache.iotdb.commons.schema.table.TsTable;
import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory;
import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema;
import org.apache.iotdb.db.conf.IoTDBConfig;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.sql.SemanticException;
import org.apache.iotdb.db.protocol.session.SessionManager;
import org.apache.iotdb.db.queryengine.common.MPPQueryContext;
Expand Down Expand Up @@ -68,7 +66,6 @@
public class TableDeviceSchemaFetcher {

private final SqlParser relationSqlParser = new SqlParser();
private final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();

private final Coordinator coordinator = Coordinator.getInstance();

Expand Down Expand Up @@ -115,7 +112,7 @@ Map<IDeviceID, Map<String, Binary>> fetchMissingDeviceSchemaForDataInsertion(
.getSessionInfoOfTableModel(SessionManager.getInstance().getCurrSession()),
"Fetch Device for insert",
LocalExecutionPlanner.getInstance().metadata,
config.getQueryTimeoutThreshold(),
context.getTimeOut(),
false);

if (executionResult.status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
Expand Down Expand Up @@ -394,7 +391,7 @@ private void fetchMissingDeviceSchemaForQuery(
"fetch device for query %s : %s",
mppQueryContext.getQueryId(), mppQueryContext.getSql()),
LocalExecutionPlanner.getInstance().metadata,
config.getQueryTimeoutThreshold(),
mppQueryContext.getTimeOut(),
false);

if (executionResult.status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
Expand Down

0 comments on commit fc36adb

Please sign in to comment.