chenboat commented on a change in pull request #6567: URL: https://github.com/apache/incubator-pinot/pull/6567#discussion_r575483440
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java ########## @@ -245,21 +245,28 @@ private SuccessResponse uploadSegment(@Nullable String tableName, FormDataMultiP LOGGER.info("Uploading a segment {} to table: {}, push type {}, (Derived from segment metadata)", segmentName, tableName, uploadType); } - String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(rawTableName); + String tableNameWithType; + if (_pinotHelixResourceManager.isRealtimeOnlyTable(rawTableName)) { + tableNameWithType = TableNameBuilder.REALTIME.tableNameWithType(rawTableName); + } else { + tableNameWithType = TableNameBuilder.OFFLINE.tableNameWithType(rawTableName); + } String clientAddress = InetAddress.getByName(request.getRemoteAddr()).getHostName(); LOGGER.info("Processing upload request for segment: {} of table: {} from client: {}, ingestion descriptor: {}", - segmentName, offlineTableName, clientAddress, ingestionDescriptor); + segmentName, tableNameWithType, clientAddress, ingestionDescriptor); - // Skip segment validation if upload only segment metadata - if (uploadType != FileUploadDownloadClient.FileUploadType.METADATA) { + // Skip segment validation if upload only segment metadata or it is a realtime table segment. + // TODO Perform a validation check for realtime segments too. Review comment: Yes. @yupeng9 restricting to upsert table only (by doing table config validation) is a good idea. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org