xiangfu0 commented on code in PR #20424:
URL: https://github.com/apache/pinot/pull/20424#discussion_r4795199159
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TarCompressionUtils.java:
##########
@@ -221,6 +234,9 @@ public static List<File> untarWithRateLimiter(InputStream
inputStream, File outp
ArchiveEntry entry;
while ((entry = tarIn.getNextEntry()) != null) {
String entryName = entry.getName();
+ if (pathBudget != null) {
+ pathBudget.charge(entryName);
Review Comment:
The budget is charged after `getNextEntry()` returns, and by then the tar
reader has already read and normalised the full entry name, including a
long-name record of any size. So `maxNameLength` and the work budget don't
bound what the reader itself buffers and processes for a single entry. Could
the name size be bounded before or while the header is read? A test with a
long-name entry above `maxNameLength` would pin it.
--
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]