gortiz commented on PR #20427: URL: https://github.com/apache/pinot/pull/20427#issuecomment-7416917191
Some compatibility and structure comments: 1. `SegmentValidationUtils.java:86`: since `copyToDeepStoreForMetadataPush` defaults to false, the new validation applies to the common metadata push path. Spark, Hadoop and standalone push jobs, and minion METADATA push tasks, often write to an output dir outside `<dataDir>/<table>/` and will get 400 after the upgrade until `controller.segment.upload.allowedSources` is set. `PurgeMinionClusterIntegrationTest` and `RefreshSegmentMinionTest` had to move `OUTPUT_SEGMENT_DIR_URI` for this reason. Other narrowings: METADATA accepts only direct children of the table dir, `hdfs:///p` doesn't match `hdfs://nn:8020/p`, and URI-mode HTTP with copy=false is gone. I'd add the `backward-incompat` label and a release note that names push jobs and minion tasks, and decide whether nested paths under the table dir should be accepted. 2. `SegmentUploadSourcePolicy.java:72/75/86` and `SegmentValidationUtils.java:86` enforce the same setting with different rules. They differ on paths under the table dir (any depth vs direct children), on the configured prefix itself (accepted vs rejected), on missing files, on symlinked table dirs, and on how remote paths are read. Keeping one validator with flags for the real mode differences (`allowHttp`, `allowNested`) would stop them from drifting. 3. `PinotSegmentUploadDownloadRestletResource.java:320` and `:879`: `sourcePolicy()` is built outside `validateSource`'s try block. An `allowedSources` entry the policy can't parse (a space, `..`, or `%` in an http path) then throws `IllegalArgumentException`, which becomes a 500 for every URI and SEGMENT copy=false upload of that table, while METADATA uploads silently ignore the same entry. Validating the setting once at startup and mapping construction errors to 400 would be clearer. 4. `PinotSegmentUploadDownloadRestletResource.java:523`: the reingest path adds `checkPermissionAndAccess` for table-level `UPLOAD_SEGMENT`, but the endpoint already declares the same check with `@Authorize`, so the access plugin runs twice per request. Remove it, or add a comment on why it has to stay. -- 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]
