Caideyipi commented on code in PR #16720:
URL: https://github.com/apache/iotdb/pull/16720#discussion_r2516533142
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AddTableColumnProcedure.java:
##########
@@ -123,7 +139,52 @@ protected void columnCheck(final ConfigNodeProcedureEnv
env) {
@Override
protected void preRelease(final ConfigNodeProcedureEnv env) {
super.preRelease(env);
- setNextState(AddTableColumnState.ADD_COLUMN);
+ }
+
+ private void checkObject(
+ final ConfigNodeProcedureEnv env, final String database, final String
tableName) {
+ final Map<TConsensusGroupId, TRegionReplicaSet> relatedRegionGroup =
+
env.getConfigManager().getRelatedSchemaRegionGroup4TableModel(database);
+
+ if (!relatedRegionGroup.isEmpty()) {
+ new TableRegionTaskExecutor<>(
+ "check deviceId for object",
+ env,
+ relatedRegionGroup,
+ CnToDnAsyncRequestType.CHECK_DEVICE_ID_FOR_OBJECT,
+ ((dataNodeLocation, consensusGroupIdList) ->
+ new TCheckDeviceIdForObjectReq(new
ArrayList<>(consensusGroupIdList), tableName)),
+ ((tConsensusGroupId, tDataNodeLocations, failureMap) -> {
+ final String message = parseStatus(failureMap.values());
+ // Shall not be SUCCESS here
+ return Objects.nonNull(message)
+ ? new IoTDBException(message,
TSStatusCode.SEMANTIC_ERROR.getStatusCode())
+ : null;
+ }))
+ .execute();
+ }
+ }
Review Comment:
When adding a object column, we need to ensure that the directory parts does
not contain illegal paths
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]