shounakmk219 commented on code in PR #14683:
URL: https://github.com/apache/pinot/pull/14683#discussion_r1890623896
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java:
##########
@@ -196,7 +196,12 @@ public ConfigSuccessResponse addConfig(
}
TableConfigs tableConfigs = tableConfigsAndUnrecognizedProps.getLeft();
String databaseName =
DatabaseUtils.extractDatabaseFromHttpHeaders(httpHeaders);
- validateConfig(tableConfigs, databaseName, typesToSkip);
+ if (typesToSkip == null) {
+ // Skip validate task type for table creation as the schema is not yet
registered.
+ validateConfig(tableConfigs, databaseName, "TASK");
+ } else {
+ validateConfig(tableConfigs, databaseName, typesToSkip);
Review Comment:
We should append ",TASK" here to `typesToSkip`?
Looks like `typesToSkip` string is not parsed properly in
`validateTaskConfigs` and assumed that only one type is passed while the
endpoint expects comma separated list of types.
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java:
##########
@@ -230,6 +235,11 @@ public ConfigSuccessResponse addConfig(
try {
_pinotHelixResourceManager.addSchema(schema, false, false);
LOGGER.info("Added schema: {}", schema.getSchemaName());
+
+ if (typesToSkip == null) {
+ // Validate config again with schema for validations requires schema.
+ validateConfig(tableConfigs, databaseName, null);
Review Comment:
Do we need to revert the schema creation as validation failure will fail the
request?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]