Skip to content
Merged
Show file tree
Hide file tree
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 @@ -100,13 +100,15 @@ public RegionExecutionResult execute(
});
return resp;
}
} catch (ConsensusGroupNotExistException e) {
} catch (final ConsensusGroupNotExistException e) {
LOGGER.warn("Execute FragmentInstance in ConsensusGroup {} failed.", groupId, e);
RegionExecutionResult resp =
final String errorMsg = String.format(ERROR_MSG_FORMAT, e.getMessage());
final RegionExecutionResult resp =
RegionExecutionResult.create(
false,
String.format(ERROR_MSG_FORMAT, e.getMessage()),
new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode()));
errorMsg,
new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode())
.setMessage(errorMsg));
resp.setReadNeedRetry(true);
return resp;
} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.exception.IoTDBException;
import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
import org.apache.iotdb.commons.exception.MetadataException;
import org.apache.iotdb.commons.path.PartialPath;
import org.apache.iotdb.commons.path.PathPatternTree;
Expand Down Expand Up @@ -245,11 +246,9 @@ private ClusterSchemaTree executeSchemaFetchQuery(
try {
ExecutionResult executionResult = executionStatement(queryId, fetchStatement, context);
if (executionResult.status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
throw new RuntimeException(
new IoTDBException(
String.format(
"Fetch Schema failed, because %s", executionResult.status.getMessage()),
executionResult.status.getCode()));
throw new IoTDBRuntimeException(
String.format("Fetch Schema failed, because %s", executionResult.status.getMessage()),
executionResult.status.getCode());
}
try (SetThreadName threadName = new SetThreadName(executionResult.queryId.getId())) {
ClusterSchemaTree result = new ClusterSchemaTree();
Expand Down
Loading