swaminathanmanish commented on code in PR #16803: URL: https://github.com/apache/pinot/pull/16803#discussion_r2348614152
########## pinot-core/src/main/java/org/apache/pinot/core/segment/processing/genericrow/AdaptiveSizeBasedWriter.java: ########## @@ -41,11 +84,38 @@ public long getNumBytesWritten() { @Override public boolean canWrite() { - return _numBytesWritten < _bytesLimit; + return _numBytesWritten < _bytesLimit && !isDiskUsageExceeded(); } @Override public void write(FileWriter<GenericRow> writer, GenericRow row) throws IOException { _numBytesWritten += writer.writeData(row); } + + private boolean isDiskUsageExceeded() { Review Comment: Thanks. We do something similar for disk utilization on server as well ([DiskUtilization](https://github.com/apache/pinot/pull/15008/files#diff-45ef72f00a8de23d81b736119d86973704b95d8f1a0afe493f3f267609b9ddae)), so should be good on the call cost. @krishan1390 to verify if the fileStore stats is for all of minion disk space. -- 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: commits-unsubscr...@pinot.apache.org 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