Jackie-Jiang commented on code in PR #15876: URL: https://github.com/apache/pinot/pull/15876#discussion_r2103571745
########## pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java: ########## @@ -186,6 +186,22 @@ private void initInstanceDataDir(File instanceDataDir) { } } } + // Ensure we can write to the instance data dir + if (!instanceDataDir.canWrite()) { + throw new IllegalStateException("Cannot write to the instance data dir: " + instanceDataDir); + } + } + + @VisibleForTesting + void initInstanceSegmentTarDir(File instanceSegmentTarDir) { + if (!instanceSegmentTarDir.exists()) { + Preconditions.checkState(instanceSegmentTarDir.mkdirs(), "Failed to create instance segment tar dir: %s", + instanceSegmentTarDir); + } + // Ensure we can write to the instance segment tar dir + if (!instanceSegmentTarDir.canWrite()) { Review Comment: (minor) Same here ########## pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java: ########## @@ -186,6 +186,22 @@ private void initInstanceDataDir(File instanceDataDir) { } } } + // Ensure we can write to the instance data dir + if (!instanceDataDir.canWrite()) { Review Comment: (minor) More concise if you use `Preconditions.checkState()` -- 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