arunkumarucet commented on code in PR #17512:
URL: https://github.com/apache/pinot/pull/17512#discussion_r2696969842
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java:
##########
@@ -627,8 +627,12 @@ private SuccessResponse uploadSegments(String tableName,
TableType tableType, Fo
SegmentValidationUtils.validateTimeInterval(segmentMetadata,
tableConfig);
}
// TODO: Include the un-tarred segment size when using the METADATA
push rest API. Currently we can only use the
- // tarred segment size as an approximation. Additionally, add the
storage quota check for batch upload mode.
+ // tarred segment size as an approximation.
long segmentSizeInBytes = getSegmentSizeFromFile(sourceDownloadURIStr);
+ // Adding Storage Quota Check
+ long untarredSegmentSizeInBytes = segmentSizeInBytes;
+ SegmentValidationUtils.checkStorageQuota(segmentName,
segmentSizeInBytes, untarredSegmentSizeInBytes,
Review Comment:
Fixed. Now the uploadSegments method catches WebApplicationException first
and re-throws it directly, preserving the original HTTP status code (403
FORBIDDEN for quota violations). This matches the pattern used in the single
segment uploadSegment method.
--
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]