Repository navigation
Conversation
### What problem does this PR solve? Issue Number: N/A Problem Summary: Add the startup-only enable_local_tvf setting, defaulting to false. Reject LOCAL TVF and FILE TVF with local storage before property parsing or backend access. Explicit opt-in restores each branch's existing behavior. Dedicated regression deployments opt in to retain LOCAL coverage. ### Release note LOCAL TVF and FILE TVF with local storage are disabled by default. Set enable_local_tvf=true in fe.conf on every query-serving FE and restart those FEs to restore the existing behavior. ### Check List (For Author) - Test: 11 focused FE unit tests passed with zero failures or skips; focused FE Checkstyle passed. SQL regression coverage added; runtime validation recorded separately. - Behavior changed: Yes. Local TVF access requires explicit startup opt-in. - Does this need documentation: Yes. Release note documents the default and opt-in.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Canonical glob results were not checked against the secure root, and LOCAL Lance bypassed local-path validation. Check the canonical root and resolved paths, enforce ADMIN/OPERATOR before file access, validate Lance schema and scan paths, and preserve LOCAL/S3 range types. Reject local storage selected through S3 Lance before dataset opening. ### Release note Enabled LOCAL reads remain restricted to user_files_secure_path and require ADMIN/OPERATOR. LOCAL Lance accepts only local paths inside that directory. The existing default-disabled startup gate is retained. ### Check List (For Author) - Test: 26 focused FE tests, Checkstyle and changed-line clang-format 16 passed. BE tests could not build because the local dependency package lacks libgoogle_cloud_cpp_oauth2.a. - Behavior changed: Yes, enforce secure local path containment and authorization after explicit opt-in. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: N/A Problem Summary: Glob expansion and symlinks can produce canonical paths outside the configured secure directory. Resolve a nonempty secure root and each local result canonically before checking containment. The shared resolver rejects remote schemes and embedded NULs. Keep the default-disabled startup gate and existing local authorization. Bind the related glob test fixture to its own secure root across build profiles. ### Release note Enabled LOCAL reads remain restricted to user_files_secure_path after glob expansion and symlink resolution. ### Check List (For Author) - Test: 5 focused BE tests passed with zero failures/skips; changed-line clang-format 16 and build hygiene passed. BE tests used the documented private legacy-glibc link adapter with branch/toolchain inputs verified. FE source is unchanged by this supplement; its existing focused tests passed previously. - Behavior changed: Yes, enforce canonical secure-directory containment after explicit startup opt-in. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: FILE_LOCAL also identifies existing local Lance catalogs. Apply the new secure-root check only to the documented LOCAL TVF version-zero ranges, retaining fixed-version catalog warehouse paths. Add catalog compatibility coverage, qualify the nested DatasetKey type in the new tests, and bind the existing glob fixture to its own root across build profiles. ### Release note Fixed-version local Lance catalog reads keep their existing warehouse paths. ### Check List (For Author) - Test: changed-line clang-format 16 passed. Local BE execution remains blocked by missing GCS dependencies; targeted compilation diagnostics also identify an existing Lance-C SDK API mismatch. Existing final FE changes have 26 passing tests. - Behavior changed: Scope the new path check to LOCAL TVF. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Canonical glob results were not checked against the secure root, and LOCAL Lance bypassed local-path validation. Validate canonical roots and resolved paths, check ADMIN/OPERATOR before file access, validate LOCAL Lance schema/scan paths, and preserve LOCAL/S3 range types. Limit Lance validation to the existing LOCAL TVF version-zero contract so fixed-version local catalogs retain their warehouse paths. Reject LocalProperties selected through S3 Lance before dataset opening. ### Release note Enabled LOCAL reads remain restricted to user_files_secure_path and require ADMIN/OPERATOR. LOCAL Lance accepts only local paths inside that directory. The default-disabled startup gate is retained. ### Check List (For Author) - Test: 26 focused FE tests, Java Checkstyle and changed-line clang-format 16 passed. BE execution is blocked by the installed Lance-C SDK missing the existing lance_scanner_set_distance_range API; no BE runtime pass is claimed. - Behavior changed: Yes, enforce secure local paths and authorization after explicit opt-in. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Canonical glob results were not checked against the secure root. Validate canonical local paths against a nonempty canonical secure root, reject remote schemes in the shared local resolver, and enforce ADMIN/OPERATOR before local file access and during privilege checking. Keep the existing default-disabled startup gate. Give the existing glob fixture an explicit secure root so profile-specific test directories do not change its assumptions. ### Release note Enabled LOCAL reads remain restricted to user_files_secure_path and require ADMIN/OPERATOR privileges. ### Check List (For Author) - Test: 10 focused FE tests and 4 focused BE tests passed with zero failures/skips; Java Checkstyle and changed-line clang-format 16 passed. BE tests used the supported Clang16 ASAN profile. - Behavior changed: Yes, canonical secure-root containment and local authorization after explicit opt-in. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Canonical glob results were not checked against the secure root. Validate canonical local paths against a nonempty canonical secure root, reject remote schemes in the shared local resolver, and enforce ADMIN/OPERATOR before local file access and during privilege checking. Keep the existing default-disabled startup gate. Give the existing glob fixture an explicit secure root so profile-specific test directories do not change its assumptions. ### Release note Enabled LOCAL reads remain restricted to user_files_secure_path and require ADMIN/OPERATOR privileges. ### Check List (For Author) - Test: 6 focused FE tests and 4 focused BE tests passed with zero failures/skips; Java Checkstyle and changed-line clang-format 16 passed. BE tests used the supported Clang16 ASAN profile. - Behavior changed: Yes, canonical secure-root containment and local authorization after explicit opt-in. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: N/A Problem Summary: A rejected glob result could disclose its expanded filename through a canonical-path error or a failed resolution of a dangling symlink. Return one generic target-validation error for both cases before the status reaches SQL clients. Extend temporary-directory tests to assert that neither real target names nor paths appear in errors. ### Release note LOCAL path validation errors no longer reveal expanded or resolved target filenames. ### Check List (For Author) - Test: 5 focused BE tests passed with zero failures/skips, including external wildcard, dangling symlink and error redaction assertions. Modified lines pass clang-format 16; independent Standards and Spec review found no remaining issue in this supplement. - Behavior changed: Yes, target-validation errors use a generic message. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: A rejected glob result could disclose its expanded filename through a canonical-path error or a failed resolution of a dangling symlink. Return one generic target-validation error for both cases before the status reaches SQL clients. Extend temporary-directory tests to assert that neither real target names nor paths appear in errors. ### Release note LOCAL path validation errors no longer reveal expanded or resolved target filenames. ### Check List (For Author) - Test: Targeted compilation diagnostics passed for the two modified C++ files. Full BE execution remains blocked by the previously recorded Lance-C SDK/GCS dependency gaps. Modified lines pass clang-format 16; independent Standards and Spec review found no remaining issue in this supplement. - Behavior changed: Yes, target-validation errors use a generic message. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: A rejected glob result could disclose its expanded filename through a canonical-path error or a failed resolution of a dangling symlink. Return one generic target-validation error for both cases before the status reaches SQL clients. Extend temporary-directory tests to assert that neither real target names nor paths appear in errors. ### Release note LOCAL path validation errors no longer reveal expanded or resolved target filenames. ### Check List (For Author) - Test: Targeted compilation diagnostics passed for the two modified C++ files. Full BE execution remains blocked by the previously recorded Lance-C SDK/GCS dependency gaps. Modified lines pass clang-format 16; independent Standards and Spec review found no remaining issue in this supplement. - Behavior changed: Yes, target-validation errors use a generic message. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: A rejected glob result could disclose its expanded filename through a canonical-path error or a failed resolution of a dangling symlink. Return one generic target-validation error for both cases before the status reaches SQL clients. Extend temporary-directory tests to assert that neither real target names nor paths appear in errors. ### Release note LOCAL path validation errors no longer reveal expanded or resolved target filenames. ### Check List (For Author) - Test: 4 focused BE tests passed with zero failures/skips, including external wildcard, dangling symlink and error redaction assertions. Modified lines pass clang-format 16; independent Standards and Spec review found no remaining issue in this supplement. - Behavior changed: Yes, target-validation errors use a generic message. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: A rejected glob result could disclose its expanded filename through a canonical-path error or a failed resolution of a dangling symlink. Return one generic target-validation error for both cases before the status reaches SQL clients. Extend temporary-directory tests to assert that neither real target names nor paths appear in errors. ### Release note LOCAL path validation errors no longer reveal expanded or resolved target filenames. ### Check List (For Author) - Test: 4 focused BE tests passed with zero failures/skips, including external wildcard, dangling symlink and error redaction assertions. Modified lines pass clang-format 16; independent Standards and Spec review found no remaining issue in this supplement. - Behavior changed: Yes, target-validation errors use a generic message. - Does this need documentation: Covered by the PR release note.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: S3 Lance could open a local dataset through BrokerProperties because the entry point rejected only LocalProperties. Validate the final dataset URI before loading metadata. Allow the pinned SDK's remote providers and reject local aliases and malformed authorities that could fall back to local paths. Keep valid ports, underscore buckets, hostless GooseFS and normalized S3/OSS HTTP locations working without changing catalog or non-Lance paths. ### Release note S3 Lance rejects local dataset URIs and malformed remote URI authorities before opening a dataset, regardless of storage-property selection. ### Check List (For Author) - Test: 31 focused FE unit tests passed on this branch; changed Java files pass Checkstyle and git diff --check passes. - Behavior changed: Yes. S3 Lance requires a valid supported remote URI. - Does this need documentation: No additional documentation for this security validation; the parent PR's configuration documentation is pending.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: S3 Lance could open a local dataset through BrokerProperties because the entry point rejected only LocalProperties. Validate the final dataset URI before loading metadata. Allow the pinned SDK's remote providers and reject local aliases and malformed authorities that could fall back to local paths. Keep valid ports, underscore buckets, hostless GooseFS and normalized S3/OSS HTTP locations working without changing catalog or non-Lance paths. ### Release note S3 Lance rejects local dataset URIs and malformed remote URI authorities before opening a dataset, regardless of storage-property selection. ### Check List (For Author) - Test: 31 focused FE unit tests passed on this branch; changed Java files pass Checkstyle and git diff --check passes. - Behavior changed: Yes. S3 Lance requires a valid supported remote URI. - Does this need documentation: No additional documentation for this security validation; the parent PR's configuration documentation is pending.
|
/review |
There was a problem hiding this comment.
Static review of PR #69526 at d353b6d, covering all 16 changed files and related SQL-to-BE discovery/read and LOCAL write-sink flows. Two P2 correctness issues need attention: canonical-root glob syntax breaks some valid enabled reads, and the new LOCAL disable switch does not cover INSERT INTO LOCAL. No existing inline threads were present, and no additional user focus was supplied.
Critical checkpoint conclusions:
- Goal and proof: read-side startup rejection precedes authorization, property parsing, backend selection and discovery. Canonical target containment and generic target-resolution errors address the stated discovery problem. The two inline findings identify remaining enabled-read and disable-switch gaps.
- Scope and reuse: changes are focused and reuse existing config, URI conversion and containment helpers; a shared LOCAL startup check would cover the separate sink path.
- Concurrency and locks: no new production threads, mutable shared state or lock ordering. Glob work runs on the existing heavy-work pthread pool; no new blocking under metadata locks was found.
- Lifecycle and initialization: no new resource ownership, caches, cycles or cross-TU initialization dependencies. Test fixtures restore config; production config is loaded before serving requests.
- Configuration: enable_local_tvf defaults false and is startup-only because ConfField.mutable defaults false and ConfigBase rejects runtime changes. Opt-in is per FE; fe_custom.conf can override fe.conf. All seven changed regression deployment configs explicitly enable it.
- Compatibility: default-off reads are an intentional operator-visible change documented in the PR release note; every query-serving FE needs configuration and restart. The canonical-root glob regression is unintended. No wire/storage-format or function-symbol changes were found.
- Thrift/protobuf: no definitions or field/enum IDs changed.
- Parallel paths: LOCAL/FILE-local SELECT, schema discovery, DESCRIBE and ordinary EXPLAIN share the read constructor; remote FILE storage stays independent. Parquet metadata wildcard expansion also delegates to LOCAL, while its exact-path behavior is unchanged. INSERT LOCAL uses the separate unguarded sink chain described inline.
- Conditions and errors: new BE checks have concrete failure comments and checked Status propagation; failed/outside matched targets return generic errors. Glob RPC suppresses partial file results on failure. FE rejection preserves the existing exception family and gives restart instructions.
- Test coverage: BE cases cover traversal glob classes, sibling-prefix escapes, symlinks, broken targets, relative/trailing-slash/symlink roots, invalid roots and helper URI/NUL inputs. FE/Groovy cases cover read gate ordering, ADMIN/OPERATOR authorization, FILE-local delegation, remote FILE dispatch and SELECT/EXPLAIN. Missing cases are metacharacters introduced by canonical roots and disabled INSERT LOCAL. Standard pipeline configs run enabled, so disabled SQL integration additionally needs a default-off deployment.
- Test results: no expected-result files changed or were handwritten in this diff; new Groovy error assertions are appropriate. Tests were inspected, not executed.
- Observability: the disabled error, generic target rejection and existing discovery/RPC context suffice for these guards; no new metrics or high-volume logging are needed.
- Transactions and persistence: no edit-log, replay, failover, visible-version or delete-bitmap changes.
- Writes and atomicity: the production diff changes read admission/discovery, with no new write protocol. The supported existing LOCAL sink remains reachable despite the new off setting, as the second finding explains.
- FE/BE transmission: no new transmitted state or protocol field; gate stays on FE and checked absolute paths continue through existing file statuses/ranges to BE readers.
- Performance and memory: the FE guard is constant time. BE retains linear per-match work and adds root canonicalization/stat calls; no new significant persistent allocation, ownership leak or asymptotic regression was identified. No performance measurement was run.
- Other concerns: user documentation for the new startup opt-in/upgrade behavior remains pending in the PR description. No additional substantiated issue or unresolved static candidate remains beyond the two inline findings.
Validation and limits: the pure-text build-support/check-build-hygiene.sh passed header layering/budgets, extern-template pairing and unity-skip coverage. No source modifications, builds, unit/regression execution, cluster reads or binary ABI audit were performed; author-reported execution results were not independently reproduced. The conclusions above are based on static control-flow and diff evidence.
Review converged after 2 round(s).
|
/review |
There was a problem hiding this comment.
Request changes: three new P1 findings prevent the intended local-storage admission boundary from holding. Effective LOCAL storage under S3 reads bypasses privileged canonical discovery; native Hadoop projection can select a different route after JNI string conversion; BE default resources can add local child mounts beneath an admitted remote parent.
Reviewed the full supplied aggregate diff at dc19f3f. No additional user focus was supplied. Existing P1 examples were independently revalidated and are fixed at this head, so no existing blocking IDs or duplicate comments are included. The already-discussed cross-mount glob/no-inline-fallback compatibility restriction intentionally remains.
The concrete flows reviewed were:
SELECT LOCAL/FILE -> startup + auth -> BE safe_glob -> canonical name -> schema/range reader
SELECT S3 -> effective adapter -> listing -> declared/schema-RPC schema -> split-derived reader
INSERT/EXPLAIN -> BindSink -> normalized TVF sink -> optional FE cleanup -> native/JNI writer
Critical checkpoint conclusions (static review):
- Goal and proof: canonical LOCAL discovery is enforced, but the three inline cases leave effective local reads/writes admitted. Added tests omit those combinations.
- Scope and reuse: changes stay within TVF admission, the existing local filesystem helper, tests and pipeline opt-in; the shared Hadoop interpreter is the main complexity surface.
- Concurrency and locks: new maps/sets/paths are statement-local; no new threads, metadata locks or lock-order changes.
- Lifecycle and initialization: gates precede the intended factories/coordinator; automatic local state adds no ownership cycle or cross-TU initialization dependency. The S3 read exception is reported inline.
- Configuration: enable_local_tvf defaults false and is startup-only; every serving FE needs the documented restart/setting. No Meta Service knob is needed.
- Compatibility: local opt-in and conservative Hadoop-route rejection are deliberate behavior changes; no persisted format or public-symbol change. Mixed-FE rollout needs consistent configuration.
- Thrift/protobuf: no gensrc definitions or field IDs change.
- Parallel paths: LOCAL/FILE, S3 effective Hadoop/LOCAL, native schema/range readers, INSERT/EXPLAIN/direct binding, CSV/Parquet/ORC writers, JNI local factory and FE cleanup were traced. Missing coverage is reflected in the inline findings.
- Conditional checks and errors: added branches explain concrete failures and throw/return errors; previous NUL, empty-target, comparator, authority and wrapper-provider cases now reject before side effects.
- Test coverage: inspected BE containment/root/symlink/whitespace tests, all five changed FE test classes, and both Groovy suites/pipeline configs. Mocks and unit-test listing shortcuts do not prove real consumer equivalence; no tests/builds were run.
- Test results: no generated .out changes; fixture bytes, expected schemas and error strings agree with the inspected branches.
- Observability: existing foreground errors and file-operation logs remain adequate; rejected expanded local names are suppressed; no new background metrics requirement.
- Transactions/persistence/failover: no EditLog, visible-version, MoW bitmap or transaction-protocol changes.
- Writes/crashes/atomicity: external sink/cleanup retain their existing partial-write and nontransactional deletion behavior; this PR changes admission, with the reported native route exception.
- FE-BE propagation: no new transmitted variable; existing path/property/type consumers were traced, including exact local path identity and the reported JNI mismatch.
- Performance/memory: per-file routing scans can cost O(files * properties); no substantiated material performance regression, new large retained allocation, leak or memory-tracking defect found.
- Other invariants: planner slot/ExprId semantics, nullability, committed-data visibility and storage formats are unchanged.
All changed files and initial risk items have explicit source-based dispositions. The inherited-child question is now the third verified finding: startup classpath, default-resource loading, individual-key overlay and nested mount precedence were independently traced. Findings relying on JDK/libhdfs/Hadoop behavior are source-derived, not observed executions. Runtime, builds, ELF compatibility and full regression execution are outside this static review. Convergence is assessed separately from these verified findings and delivery, using the final reviewer attestations.
Review did not converge within three rounds: the final risk pass required correcting an external source citation, and the corrected payload has not received a fresh unanimous unchanged-set pass. All three findings and their PR anchors are verified; no source candidate or changed-file coverage remains unresolved. No fourth round was started.
Review did not converge after 3 rounds. This automated review cannot pass the review check.
The final risk reviewer withheld NO_NEW_VALUABLE_FINDINGS for a source-citation line-range correction. Source links were corrected after the frozen-set pass, so the delivered exact payload lacks fresh unanimous unchanged-set attestations. All three code findings and PR anchors are verified; all changed-file coverage and risk/candidate dispositions are complete, with no unresolved source question. Static-only runtime/build/test limits remain. Three rounds executed; no fourth round.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Reject S3's LOCAL adapter before discovery and validate actual Hadoop/local range consumers after broker or supplied-file listing. Reject native routing strings whose supplementary characters cannot retain identity through JNI. Preserve single-URI ViewFS comma paths and skip only unused schema routes when parsed CSV schema is available. Keep returned-file schema route checks. ### Release note S3 local reads must use constrained local(). Remote comma-directory ViewFS routes and declared-schema reads retain their consumer semantics. Native supplementary routing input is rejected without local write opt-in. Inherited BE Hadoop providers and mount overlays remain unresolved; this increment does not claim complete runtime configuration enforcement. ### Check List (For Author) - Test: 63 selected FE tests passed with fresh XML, zero failures/errors/skips, unchanged inputs, targeted Checkstyle and git diff --check. - Behavior changed: Yes, TVF admission and remote compatibility as described. - Does this need documentation: PR documents remaining runtime limits.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Bind guarded Hadoop TVF requests to the consumer's actual configuration and validate native paths on cached connections. Preserve remote routes and keep unmarked catalog behavior unchanged. ### Release note Reject inherited local Hadoop routes for guarded TVFs. Deploy the matching patched Hadoop runtime on all serving nodes. ### Check List (For Author) - Test: Unit Test (91 FE and 16 BE), isolated libhdfs/cold-JVM controls - Behavior changed: Yes (effective runtime route enforcement) - Does this need documentation: Yes (startup and upgrade guidance remains pending)
|
/review |
There was a problem hiding this comment.
Reviewed exact head 9cba45b against the supplied aggregate diff (36 changed paths). One new P2 finding: escaped Hadoop glob components can trigger FE-local metadata listing before returned-path admission. No local file-content read or BE write is asserted for that case.
Review converged after 2 rounds: all three reviewers returned NO_NEW_VALUABLE_FINDINGS in the final round against this unchanged payload; complete coverage and candidate/risk dispositions are recorded in the shared ledger.
Critical checkpoint conclusions:
- Goal and evidence: default-off LOCAL/FILE-local admission, privileged constrained LOCAL reads, alternate writer/cleanup gates and actual Hadoop consumer checks are implemented. The inline finding identifies a remaining pre-discovery gap. Added unit/regression cases cover ordinary positive/negative routes; escaped literal glob prefixes are missing.
- Scope and reuse: changes are focused on TVF IO admission, shared Hadoop route interpretation, cache isolation and related tests/configuration.
- Concurrency: connection creation and JNI checks occur outside the HdfsMgr mutex; exact guarded identities are checked at both lookups. Shared ownership keeps handlers alive through eviction; no new lock-order defect found.
- Lifecycle and initialization: native context capture follows outer provider initialization; pthread handoff and global-reference teardown preserve lifetime. Services register Hadoop resources before snapshotting; no new cross-TU initialization dependency found.
- Configuration: enable_local_tvf defaults false, is startup-only, and requires every serving FE to restart. Seven pipeline configurations explicitly opt in.
- Compatibility: no storage format or protocol definition changes. Guarded native IO requires matching patched Hadoop runtime and fails closed if unavailable; mixed-version full enforcement is explicitly not promised.
- Thrift/protobuf IDs: no changes under gensrc/thrift or gensrc/proto.
- Parallel paths: checked SELECT/EXPLAIN, INSERT/EXPLAIN, direct binding, FILE delegation, LOCAL JNI writer, effective adapters, cleanup, returned/supplied paths, declared schema, schema/data NameNodes and remote-provider variants. Generic unmarked catalogs keep the unguarded path.
- Conditions and errors: rejection paths propagate exceptions/Status and explain startup or remote-route requirements. Local canonicalization checks root containment and preserves exact whitespace; no additional conditional-path defect found.
- Tests: inspected all added/changed BE/FE/regression coverage. No builds, tests, cluster execution or storage IO were run for this static-only review; author-reported executions were not independently verified.
- Expected results: no .out files changed; Groovy additions use test/exception checks.
- Observability: configuration, missing-runtime/context and route errors give actionable context; no additional admission metric was identified as necessary.
- Persistence and failover: no EditLog, transaction or persisted metadata behavior changes.
- Writes and atomicity: external cleanup remains pre-execution and nontransactional; new admission precedes filesystem creation. Doris table transaction/version/delete-bitmap behavior is untouched.
- FE/BE variables: constant-size native marker reaches schema/data properties and THdfsParams plus writer properties; Java listing/cleanup receive independent encoded policies. Native consumers validate each actual converted path, including cache hits.
- Performance and memory: native marker size is constant in file count; raw configuration profile excludes per-path metadata. No additional substantiated allocation, lifetime or hot-path regression found by static inspection.
- Other issues: final sweep and missed-edge rechecks found no additional verified defect.
Existing threads: all 11 earlier P1 examples were independently revalidated as fixed at this head, including inherited BE child mounts; no existing blocking IDs remain. Earlier P2 sink/root/resource fixes are present. The already-discussed no-fallback cross-mount glob restriction remains explicitly documented and is not reposted.
User focus: no additional user-provided focus. Coverage limits: static inspection only; full SQL/Groovy, ABI/build, mixed-version and remote-service execution remain unverified. No unresolved code candidate remains in this review.
Review converged after 2 round(s).
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Align glob discovery routes and exact nested ViewFS identity, and preserve supported remote providers. Keep the existing LOCAL setting, privileges and containment requirements. ### Release note Guarded Hadoop requests use exact nested ViewFS identities and reject escaped local listing routes. Supported provider compatibility is preserved. ### Check List (For Author) - Test: Unit Test (98 FE), isolated ViewFS endpoint comparison - Behavior changed: Yes (guarded route enforcement and supported provider compatibility) - Does this need documentation: Yes (startup and upgrade guidance remains pending)
|
/review |
There was a problem hiding this comment.
Static review of all 36 changed paths at c5f9890 found two new P2 issues: slash-containing brace patterns can reach FE-local discovery before admission, and exact remote cleanup can be rejected as though its literal brace directory were a glob. Both are reported inline.
Checkpoint conclusions:
- Goal and proof: default-off LOCAL/FILE-local admission, privilege-before-discovery and canonical containment are implemented. The two inline cases leave Hadoop discovery and exact cleanup behavior incomplete; the added tests do not cover those cases.
- Scope and reuse: changes stay within filesystem/TVF admission, the shared Hadoop route interpreter and related tests/configuration. Sharing the interpreter is appropriate; its two consumer-mode mismatches need correction.
- Concurrency and locks: concurrent native callers and cleanup use the HdfsMgr mutex for both cache lookups, insertion and individual eviction. Connections/context references are retained before unlocking; JNI construction, validation and release occur outside that mutex. No new lock-order problem was established.
- Lifecycle and initialization: connection-owned contexts and joined pthread workers keep stack/JNI lifetimes valid. Root context capture follows initialization; service-provider default resources are loaded before snapshotting. No new static-initialization dependency or ownership cycle was found.
- Configuration: enable_local_tvf defaults false and is startup-only. Its restart-every-FE guidance and the seven explicit regression-pipeline opt-ins agree with that behavior.
- Compatibility: no storage format or serialized function signature changes. Enforcement requires upgraded FE/BE and matching patched Hadoop consumers, as the PR notes; older BEs can ignore policy map entries during a rolling upgrade. Mixed-version enforcement was not validated.
- Thrift/protobuf IDs: no gensrc/thrift or gensrc/proto changes; no ID or enum compatibility issue applies.
- Parallel paths: LOCAL/FILE delegation, S3/HDFS effective adapters, native/JNI writers, cleanup, discovery, declared-schema shortcuts, schema RPCs and per-file native ranges were traced. The two reported cases are distinct listing/exact-delete paths. Ordinary unmarked catalogs retain their prior policy behavior.
- Conditional checks: local opt-in, native/Java projection, empty-target and cache-identity branches have concrete failure scenarios and focused tests. The brace fast path and cleanup rule mode are the remaining confirmed conditional errors.
- Test coverage: FE/BE unit additions cover gates, privileges, resources, inherited configuration, native identities, collisions/cache reuse, symlinks, root escaping and whitespace. Both Groovy changes and all pipeline configs were inspected. The JNI bridge is mocked in BE tests; full SQL/runtime coverage remains unverified.
- Expected results: no golden-output files changed. Unit expectations and Groovy error assertions were inspected statically; no test result is claimed as executed by this review.
- Observability: gate/runtime errors propagate through existing Status/listing/cleanup failures, with actionable startup guidance. No additional logging or metric defect was established.
- Transactions and persistence: EditLog, failover, partition versions and delete bitmaps are unaffected. No new persisted metadata or replay obligation applies.
- Writes and crash behavior: checks precede native file opening and FE cleanup. External file writes/cleanup retain their existing nontransactional behavior; no additional crash, partial-commit or deadlock defect was confirmed.
- FE/BE values: policy travels through existing properties/THdfsConf in native sink, scan and schema senders; actual converted paths are supplied at native connection creation and cache hits. No current native sender omission was found.
- Performance and memory: native guarded identities are compared within a hash bucket, the policy marker stays constant with file count, and direct remote cache hits avoid extra JNI/pthread work. Workers attach the existing thread context; no new significant untracked allocation or independently actionable performance defect was established.
- Other checks: canonical LOCAL glob roots are escaped, resolved targets remain contained, and returned filename whitespace is preserved. Currently unused Java-read helper APIs were not treated as an executable reader path. No further distinct verified issue remains.
Existing review context: all eleven original P1 instances were independently revalidated and are addressed at this head: supported JNI writer ID; effective LOCAL cleanup/S3 read adapters; delegated, overloaded and inherited Hadoop routes; Java/NUL and native map identities; default authority; empty targets; and JNI supplementary-character handling. No existing P0/P1 ID remains blocking. The original escaped-component example is fixed; the new singleton-brace case is a different transformation. The previously documented cross-mount read-glob restriction without a proven remote fallback remains an accepted compatibility limitation and is not reposted.
User focus: none supplied beyond the complete review. Coverage is static only: no source edits, builds, tests, storage IO, runtime/ASAN controls, mixed-version runs or final ELF ABI audit were performed. Author-reported test runs are not independent validation by this review.
Review converged after 2 round(s).
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Hadoop read discovery must check slash-containing brace expansion before listing. Literal cleanup paths must retain exact-path semantics. Native writes must validate the actual create-parent route against the frozen runtime configuration, including cache reuse, while reads retain leaf-path checks. Guarded Java ViewFS requests must own and close their child clients instead of retaining path-specific clients in Hadoop's global cache. Apply these corrections without changing native filesystem ownership or unmarked catalog behavior. ### Release note Close the remaining Hadoop TVF local-route bypass and preserve valid remote cleanup and filesystem-client lifecycle under the default-off LOCAL policy. ### Check List (For Author) - Test: Unit Test; standard JDK17 selected FE tests, standard Clang21/ASAN HdfsMgrTest, actual-file Checkstyle and targeted C++ formatting/static checks. Full SQL/Groovy and full community CI are not claimed. - Behavior changed: Yes. Match admission to the actual consumer's read/write/delete semantics and release request-owned Java ViewFS clients. - Does this need documentation: No additional setting or interface introduced by this follow-up; the PR's existing startup and upgrade guidance applies.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Hadoop read discovery must check slash-containing brace expansion before listing. Literal cleanup paths must retain exact-path semantics. Native writes must validate the actual create-parent route against the frozen runtime configuration, including cache reuse, while reads retain leaf-path checks. Guarded Java ViewFS requests must own and close their child clients instead of retaining path-specific clients in Hadoop's global cache. Apply these corrections without changing native filesystem ownership or unmarked catalog behavior. ### Release note Close the remaining Hadoop TVF local-route bypass and preserve valid remote cleanup and filesystem-client lifecycle under the default-off LOCAL policy. ### Check List (For Author) - Test: Unit Test; standard JDK17 selected FE tests, standard Clang21/ASAN HdfsMgrTest, actual-file Checkstyle and targeted C++ formatting/static checks. Full SQL/Groovy and full community CI are not claimed. - Behavior changed: Yes. Match admission to the actual consumer's read/write/delete semantics and release request-owned Java ViewFS clients. - Does this need documentation: No additional setting or interface introduced by this follow-up; the PR's existing startup and upgrade guidance applies.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Hadoop read discovery must check slash-containing brace expansion before listing. Literal cleanup paths must retain exact-path semantics. Native writes must validate the actual create-parent route against the frozen runtime configuration, including cache reuse, while reads retain leaf-path checks. Guarded Java ViewFS requests must own and close their child clients instead of retaining path-specific clients in Hadoop's global cache. Apply these corrections without changing native filesystem ownership or unmarked catalog behavior. ### Release note Close the remaining Hadoop TVF local-route bypass and preserve valid remote cleanup and filesystem-client lifecycle under the default-off LOCAL policy. ### Check List (For Author) - Test: Unit Test; standard JDK17 selected FE tests, standard Clang21/ASAN HdfsMgrTest, actual-file Checkstyle and targeted C++ formatting/static checks. Full SQL/Groovy and full community CI are not claimed. - Behavior changed: Yes. Match admission to the actual consumer's read/write/delete semantics and release request-owned Java ViewFS clients. - Does this need documentation: No additional setting or interface introduced by this follow-up; the PR's existing startup and upgrade guidance applies.
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Validate only the normalized filesystem probes used during Hadoop discovery. Validate returned and supplied file paths literally through their actual Java and native consumers, preserving native configuration and schema-route checks. This keeps proven remote glob routes usable while retaining local-probe rejection. ### Release note Preserve valid remote glob and literal-file reads under the default-off LOCAL policy. ### Check List (For Author) - Test: Unit Test through the standard JDK17 FE wrapper with fresh required XML and frozen sources; exact aggregate PR Java Checkstyle and git diff checks. Full SQL/Groovy and complete community CI are not claimed. - Behavior changed: Yes. Match discovery and literal-file admission to actual consumer semantics. - Does this need documentation: No additional setting or interface introduced by this follow-up; existing startup and upgrade guidance applies.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Validate only the normalized filesystem probes used during Hadoop discovery. Validate returned and supplied file paths literally through their actual Java and native consumers, preserving native configuration and schema-route checks. This keeps proven remote glob routes usable while retaining local-probe rejection. Guarded Avro data readers reuse the already validated owned filesystem, retaining projection and split behavior; reader cleanup releases every stream and filesystem after failed opens and close errors. ### Release note Preserve valid remote glob and literal-file reads under the default-off LOCAL policy. Release request-owned Avro filesystem clients on normal and failed reads. ### Check List (For Author) - Test: Unit Test through the standard JDK17 FE wrapper with fresh required XML and frozen sources; exact aggregate PR Java Checkstyle and git diff checks. Full SQL/Groovy and complete community CI are not claimed. - Behavior changed: Yes. Match discovery and literal-file admission to actual consumer semantics. Preserve guarded Avro filesystem ownership and exceptional cleanup. - Does this need documentation: No additional setting or interface introduced by this follow-up; existing startup and upgrade guidance applies.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526, apache#69527, apache#69528 Problem Summary: Validate only the normalized filesystem probes used during Hadoop discovery. Validate returned and supplied file paths literally through their actual Java and native consumers, preserving native configuration and schema-route checks. This keeps proven remote glob routes usable while retaining local-probe rejection. Guarded Avro data readers reuse the already validated owned filesystem, retaining projection and split behavior; reader cleanup releases every stream and filesystem after failed opens and close errors. ### Release note Preserve valid remote glob and literal-file reads under the default-off LOCAL policy. Release request-owned Avro filesystem clients on normal and failed reads. ### Check List (For Author) - Test: Unit Test through the standard JDK17 FE wrapper with fresh required XML and frozen sources; exact aggregate PR Java Checkstyle and git diff checks. Full SQL/Groovy and complete community CI are not claimed. - Behavior changed: Yes. Match discovery and literal-file admission to actual consumer semantics. Preserve guarded Avro filesystem ownership and exceptional cleanup. - Does this need documentation: No additional setting or interface introduced by this follow-up; existing startup and upgrade guidance applies.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69527, apache#69528 Problem Summary: Keep GlobFilter pattern identity separate from unescaped literal path components. Encode actual probes as exact literal paths or literal subtree prefixes, retain earlier wildcard parents across dot normalization, and honor each rule mode in both FE and runtime routing. This admits valid escaped-star/question/bracket/brace/backslash paths without weakening real local-parent checks. ### Release note Preserve valid escaped literal filenames and listing prefixes under the remote-only Hadoop TVF policy. ### Check List (For Author) - Test: Unit Test; standard JDK17 FE wrapper, 110 selected tests passed, zero failures/errors/skips, every required report fresh and source frozen. Actual Hadoop Globber and FE/runtime controls included. All 15 Doris Java PR files passed Checkstyle; diff check passed. Complete SQL/Groovy and community CI not claimed. - Behavior changed: Yes. Preserve literal component identity in Hadoop discovery admission. - Does this need documentation: No new setting or interface; existing startup and upgrade guidance applies.
Local pipeline review — ✅ PASSschema: doris-repo-review/v1
status: PASS
pr: apache/doris#69526
commit: 2832d38525e67a996e8a8c365bf9585240a048ca
base: 12f61bacec3ca1820a71dbd914633cc63c517413
reviewed_at: 2026-10-25T17:28+08:00
reviewer: OIiveirra
model: gpt-6.1-sol
effort: xhigh
findings: {blocker: 0, major: 0, minor: 0, nit: 0}
rounds: 1
converged: trueNotes for maintainers
Reviewed locally with the |
|
run buildall |
TPC-H: Total hot run time: 28353 ms |
|
/review |
TPC-DS: Total hot run time: 150398 ms |
ClickBench: Total hot run time: 24.45 s |
There was a problem hiding this comment.
Reviewed #69526 at head 2832d38 using the authoritative aggregate diff. All 36 changed paths and all supplied review threads were inspected. No new actionable finding was verified.
Existing blocking context: the eleven original P1 instances covering the JNI local-writer identifier, effective LOCAL cleanup/S3 reads, delegated/dynamic ViewFS providers, authority/key/JNI identity, empty mount targets and inherited child mounts are addressed at this head. None is carried in existing_blocking_comment_ids. The existing P2 restriction on cross-mount globs without a proven remote route remains acknowledged in the thread and release note; it is not reposted.
Critical checkpoint conclusions (static review):
- Goal and evidence: startup LOCAL admission, canonical secure-root containment and remote-only Hadoop TVF route checks are present on the traced read/write/cleanup paths. Added unit and regression cases target these contracts; no tests were executed in this review.
- Scope and reuse: the changes stay within TVF admission, its Hadoop/native consumers and their tests/configuration. The shared route interpreter avoids separate FE/runtime mount-resolution implementations; the complexity follows the consumer boundary.
- Concurrency: native cache selection/insertion/expiry uses its mutex while connection creation and JNI checks run outside it; exact guarded identities coexist in collision buckets. Request-owned Java clients are isolated. No actionable live-operation locking defect was verified.
- Lifecycle and initialization: retained JNI Context/global references are released on OS threads; Java request ownership covers nested/Nfly peers, partial initialization and close failures. No new cross-translation-unit static initialization dependency was found.
- Configuration: enable_local_tvf is deliberately startup-only and false by default; every serving FE must restart after opt-in. Regression configurations opt in explicitly; no cloud meta-service setting is needed.
- Compatibility: no persistent format change was found. Guarded consumers require the matching patched Hadoop runtime and enforce its version. Full enforcement during mixed-version upgrades is explicitly not guaranteed in the release note and was not validated here; final glibc ELF compatibility was not tested.
- Thrift/protobuf IDs: no definition changed; the cross-release field-ID audit is not applicable.
- Parallel paths: LOCAL/FILE reads, HDFS/S3 discovery and supplied files, schema versus data requests, native and JNI sink selection, Java cleanup, V1/V2 native readers and cache hits were traced. This checkout has no active Avro/Lance reader implementation to validate through the unused compatibility APIs.
- Special conditions: empty roots, NUL/surrogate identity, URI conversion, mount selection, glob normalization, literal cleanup and runtime-version conditions have concrete failure scenarios and explanatory comments. No additional admitted unsafe route was established.
- Test coverage: added FE/BE tests cover default-off/opt-in behavior, authorization ordering, canonical/symlink/metacharacter/whitespace paths, discovery versus literal paths, inherited providers/mounts, cache isolation and child ownership. SQL/Groovy coverage is present; full cluster and actual runtime validation remain unperformed by this review.
- Expected results: no .out result file was changed. Inspected error expectations follow the relevant validation order, and regression failures use test/sql/exception cases.
- Observability: admission/version failures propagate as exceptions or non-OK Status; rejected local paths do not expose expanded external names. No critical missing metric or new noisy hot-path INFO log was identified.
- Transactions and persistence: no EditLog, replay, failover, partition-visible-version or delete-bitmap logic changed.
- Writes, failures and atomicity: native admission checks the actual generated file's create-parent route; cleanup validates its literal parent before filesystem creation/deletion. Existing TVF write/commit/crash semantics are retained; no new atomicity defect was verified.
- FE-BE values: internal markers flow through both properties and THdfsParams where needed, including schema requests and native writers. BE validates the actual converted path before open, including connection cache hits.
- Performance and memory: direct remote cache hits avoid per-file JNI/thread creation; expensive connection work stays outside cache locks. Added context metadata is per connection/request; no newly introduced data-sized untracked allocation or material redundant operation was established.
- Other invariants: no additional data-correctness, memory-safety or error-propagation defect was verified. The reviewed code does not alter transaction visibility or MoW consistency.
User focus: no additional focus was supplied. Remaining validation limits are static-only inspection, unexecuted builds/tests/cluster scenarios and final ELF ABI checks, plus the documented mixed-version and cross-mount compatibility restrictions. There are no unresolved finding candidates or uncovered changed paths after the final sweep.
Convergence: true after 1 review round; both complete-review agents and the separate runtime-risk agent returned NO_NEW_VALUABLE_FINDINGS after their missed-issue rechecks.
Review converged after 1 round(s).
FE UT Coverage ReportIncrement line coverage |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Align with the target master and pass its file iterator to the schema request builder. Keep assertions for both backend properties and HDFS configuration so the CI merge result exercises the intended admission contract. ### Release note None ### Check List (For Author) - Test: 111 selected FE unit tests passed with six fresh required reports; 15 applicable Java files passed Checkstyle. - Behavior changed: No. - Does this need documentation: No.
### What problem does this PR solve? Issue Number: N/A Related PR: apache#69526 Problem Summary: Admit remote storage bases once before publishing an opened Lance dataset. A reused handle must still match the entire dataset key; LOCAL paths and registered bases remain revalidated for filesystem changes. This removes repeated metadata parsing for fragment splits without adding cache state or changing SDK interfaces. ### Release note Avoid repeated remote storage-base inspection for splits of an unchanged Lance TVF snapshot. ### Check List (For Author) - Test: 31 selected Clang21/ASAN filesystem and Lance tests passed with fresh XML, zero failures/errors/skips and frozen source; changed C++ ranges passed clang-format16. - Behavior changed: Preserve storage admission rules and reuse successful remote snapshot admission. - Does this need documentation: No additional documentation beyond existing security and upgrade guidance.
What problem does this PR solve?
Issue Number: N/A
Related PR: #69527, #69528
Problem Summary:
LOCAL/FILE-local discovery could escape its secure root, while alternate writers and delegated Hadoop routes could bypass the LOCAL setting or access BE-local files through a remote TVF.
enable_local_tvf=false. Require ADMIN/OPERATOR before local discovery and during authorization; gate local writers and cleanup before side effects. Enabled reads require canonical containment underuser_files_secure_path, including expanded paths and symlinks; rejection errors do not disclose resolved paths.Release note
LOCAL TVF and FILE-local are disabled by default. Enable them with
enable_local_tvf=trueinfe.confon every serving FE and restart. Enabled local reads still require ADMIN/OPERATOR and a nonempty BEuser_files_secure_path. Hadoop TVF reads require proven remote storage even when LOCAL is enabled; use constrainedlocal()for local reads.Upgrade every serving FE/BE with the matching patched Hadoop runtime for full enforcement. Mixed-version enforcement is not guaranteed. Cross-mount Hadoop globs still require a proven remote route, such as an explicit remote fallback.
Check List (For Author)
Validation:
Standard JDK17 FE wrapper: 111 selected tests passed with fresh reports for every required suite, zero failures/errors/skips and frozen source inputs. The selection ran after merging the target master and adapts to its Iterator-based schema request builder, retaining policy assertions in both properties and HDFS parameters. Coverage includes real Hadoop Globber probes with escaped literal metacharacters, literal returned/supplied paths, native route controls and request-owned ViewFS lifecycle.
Prior source-bound Clang21/ASAN
HdfsMgrTest: 12 selected tests passed for the native guard changes. Native source and test bytes remain identical to that validated run.Checkstyle inspected all 15 Doris Java source/test files in this PR; zero errors. Diff checks passed. The upstream Hadoop shadow source uses the repository's existing Checkstyle exclusion.
Full SQL/Groovy regression, complete community CI and mixed-version execution were not performed locally.
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)