Repository navigation
[feature](iceberg) Support native encrypted reads with protected RPC - #70697
Conversation
|
run buildall |
|
/review |
There was a problem hiding this comment.
Request changes: two P1 findings and one P2 finding are reported inline. They cover Java heartbeat certificate identity, unintended plaintext writes into encrypted tables, and KMS authorization bypass through explicitly enabled external SQL result caching.
Reviewed the complete authoritative 95-path diff at e9bdafb, including the cache and transport prerequisite commits. Review converged after two rounds: both normal reviewers and the separate risk reviewer returned NO_NEW_VALUABLE_FINDINGS in round 2; every candidate and risk focus has an accepted, duplicate or evidence-based dismissed disposition. No existing inline findings were present in the final live refresh. No additional user focus was supplied.
Critical checkpoint conclusions:
- Goal and proof: opt-in HMS/v3 native encrypted reads have admission, independent file/delete keys and protected dispatch. The intended read-only boundary fails at the write target (P1). Tests were inspected, not executed.
- Scope and reuse: this is a broad feature plus disclosed prerequisite cache/TLS work; shared SPI, cache retention predicates and provider boundaries are reused. Write eligibility needs a separate invariant.
- Concurrency: heartbeat updates race planning/dispatch through a volatile immutable capability lease; assigned targets are checked before serialization and sending. Load scopes isolate unclassified concurrent cache misses. No additional lock inversion or heavy new IO under metadata locks was established.
- Lifecycle and initialization: cache/loader/statement references bridge declined publication, eviction and catalog retirement; frozen read views are separate from writable owners. TLS socket/factory ownership, failed initialization, close and reopen were traced. No new cross-translation-unit initialization dependency was identified.
- Configuration: existing deployment read/TLS settings remain default off. Static TLS identities require coordinated restart; positive mutable handshake timeouts are checked when used. No new dynamic configuration mechanism was added.
- Compatibility: absent capabilities default unavailable; distinct PME markers reach shared parameters and ranges. Custom providers default to no capability. Connector API 34.0 and its recorded surface/test pin agree; FE and plugins require coordinated deployment.
- Thrift definitions: all touched definitions were read on HEAD and live-matched master, branch-4.2, branch-4.1, branch-4.0 and branch-3.1. New fields are optional; no new ID/enum collision was found. Split field 3 remains reserved for branch-4.2.
- Parallel paths: initial/lazy and typed/serialized dispatch, simplified fragments, data/position/equality deletes, native position metadata, COUNT and row fetch were traced. Unsupported encrypted ORC/Puffin/JNI alternatives reject explicitly. FQDN heartbeat and SQL result-cache counterparts have the inline findings.
- Conditions and failures: descriptor validation, capability refusal, terminal lazy errors and transport initialization fail explicitly. No additional ignored new Status or silent fallback was identified.
- Test coverage: native, connector, FE transport/capability and SQL matrices cover many positive and negative cases. Resolved Java heartbeat identity, encrypted writes and opted-in result-cache revocation are material missing cases corresponding to the findings.
- Expected results: changed default-off output removals match the new READ_DISABLED queries; delete rows, counts, sums and position offsets match fixture construction. Output-generation provenance was not independently executed.
- Observability: stable classified admission/transport errors and existing RPC/profile counters remain available; provider diagnostics avoid formatting private inputs. No separate observability defect was established.
- Persistence and failover: capability is transient in images; failed/missing/stale heartbeats revoke it, and positive heartbeat journal updates reach followers. Historical replay cannot grant a fresh process lease. No committed-data/version or MoW change is introduced.
- Writes and atomicity: existing write transaction/commit machinery is unchanged but becomes newly reachable for encrypted targets; its ordinary plaintext output is the P1 write finding. No claim of encrypted-write support is justified by read capability.
- FE/BE propagation: optional heartbeat and actual split-caller versions, independent data/delete descriptors and PME markers were checked across producer and consumer paths.
- Performance and memory: repeated per-file backend inventory is avoided; warm plaintext cache reuse remains, while unknown cold loads are intentionally isolated. No new large untracked native query allocation was established. The author's benchmarks use a prerequisite-containing baseline and shared host and show higher FE RSS; they do not independently prove full-PR performance here.
- Other boundaries: complete OSS cloud-control-plane TLS activation and plaintext/TLS rolling activation are documented limits. This review does not certify runtime interoperability, production IAM, deterministic zeroization or final ELF glibc compatibility.
Validation was static only: no builds, tests, benchmarks, cluster execution, source edits or submodule initialization. No unresolved static coverage gaps remain.
Review converged after 2 round(s).
### Background Private RPC authentication tests generate ephemeral CA and peer identities before opening real listeners. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693, apache#70697 PR Type: Bugfix Problem Summary: Build images can contain a prebuilt OpenSSL executable with missing shared libraries and no system OpenSSL executable. Fixture setup then exits before the authentication tests run. ### Details - **Frequency:** Every fixture setup in such an image. - **Root cause:** The fallback assumed a system OpenSSL CLI was always installed. - **Why existing tests missed it:** The previous local reproduction retained a runnable system CLI. - **Fix:** Generate the same ephemeral identities using the existing JDK keytool and standard PKCS12/PKCS8 APIs when neither OpenSSL candidate runs. Remove temporary private-key stores, retain restrictive file permissions and report fixture logs on failed FE setup. - **Other paths and branches:** The shared fixture serves FE and BE TLS tests. The normal OpenSSL path remains available. No production transport, protocol or TLS verification policy changes. ### Testing The original fixture fails in the pinned CI image; the JDK fallback generates all identities there in about 10 seconds. The repository FE entry point passes all 20 selected RPC/provider tests in that image with zero failures/errors/skips, using shared local compiler/dependency caches. Modern OpenSSL generation, independent certificate-chain/hostname/CA rejection, all seven PKCS8 keys, owner-only permissions and temporary-store cleanup pass. FE Checkstyle reports zero violations, javac --release 17 -Xlint:all is clean, Bash syntax and staged whitespace/privacy checks pass; clang-format 16 passes on all 13 native files already in the PR. The failed native CI build stopped on an interrupted Hadoop dependency download; a fresh complete download matches the published checksum. ### Release note None ### Check List (For Author) - Behavior changed: No production behavior changes. - Does this need documentation: No; test-only fixture portability. - Pre-submission status: Ready for CI rerun. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Fixture helper, setup diagnostics and this message. - Human review: Pending.
### Background Private RPC authentication tests generate ephemeral CA and peer identities before opening real listeners. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693, apache#70697 PR Type: Bugfix Problem Summary: Build images can contain a prebuilt OpenSSL executable with missing shared libraries and no system OpenSSL executable. Fixture setup then exits before the authentication tests run. ### Details - **Frequency:** Every fixture setup in such an image. - **Root cause:** The fallback assumed a system OpenSSL CLI was always installed. - **Why existing tests missed it:** The previous local reproduction retained a runnable system CLI. - **Fix:** Generate the same ephemeral identities using the existing JDK keytool and standard PKCS12/PKCS8 APIs when neither OpenSSL candidate runs. Remove temporary private-key stores, retain restrictive file permissions and report fixture logs on failed FE setup. - **Other paths and branches:** The shared fixture serves FE and BE TLS tests. The normal OpenSSL path remains available. No production transport, protocol or TLS verification policy changes. ### Testing The original fixture fails in the pinned CI image; the JDK fallback generates all identities there in about 10 seconds. The repository FE entry point passes all 20 selected RPC/provider tests in that image with zero failures/errors/skips, using shared local compiler/dependency caches. Modern OpenSSL generation, independent certificate-chain/hostname/CA rejection, all seven PKCS8 keys, owner-only permissions and temporary-store cleanup pass. FE Checkstyle reports zero violations, javac --release 17 -Xlint:all is clean, Bash syntax and staged whitespace/privacy checks pass; clang-format 16 passes on all 13 native files already in the PR. The failed native CI build stopped on an interrupted Hadoop dependency download; a fresh complete download matches the published checksum. ### Release note None ### Check List (For Author) - Behavior changed: No production behavior changes. - Does this need documentation: No; test-only fixture portability. - Pre-submission status: Ready for CI rerun. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Fixture helper, setup diagnostics and this message. - Human review: Pending.
|
run buildall |
|
/review |
There was a problem hiding this comment.
Request changes. Static review of all 96 changed paths found one new P2 issue: capability revocation can prematurely mark a healthy backend dead on follower FEs when heartbeat failure tolerance exceeds one. The verified new finding is inline.
Two existing P1 findings still apply to this head and are not duplicated: encrypted write admission can commit plaintext files to an encryption-declared table, and TLS heartbeat DNS identity breaks correctly certified DNS-only backend identities in FQDN mode. The existing P2 SQL result-cache replay concern also remains applicable: an unchanged metadata token can replay cached results without current KMS authorization. Its ID is excluded from the P0/P1-only blocking-ID list.
Critical checkpoint conclusions:
| Checkpoint | Conclusion |
|---|---|
| Goal and proving tests | Opt-in HMS/v3 native reads, independent delete keys and physical COUNT are wired and have unit/regression sources. Existing write/result-cache issues prevent the full stated boundary from holding. |
| Scope and clarity | Broad change includes disclosed cache and TLS prerequisites. Shared cache/provider mechanisms are reused. |
| Concurrency and locks | Unclassified misses use separate load scopes; retention checks are pure. Existing publication gates protect cache updates. No additional lock-order defect found. |
| Lifecycle and initialization | Loader/cache/statement references and socket/factory ownership were traced through cancellation, failure and retirement. No additional lifetime or static-initialization defect found. |
| Configuration and dynamic behavior | Deployment read switch remains off by default. Static TLS activation and bounded timeout settings are explicit; configuration alone cannot grant reader support. |
| Incompatible changes and upgrades | Connector API advances to 34.0 and requires coordinated plugin deployment. Absent/legacy/custom capability defaults to unavailable. Coordinated TLS activation is documented. |
| Thrift field IDs and enums | Full touched definitions on HEAD/master/branches 4.2, 4.1, 4.0 and 3.1 were compared against live refs: optional fields 4 and 12 and explicit enum 22 do not collide; branch-4.2 field 3 remains reserved. |
| Parallel paths | Typed and serialized fragment dispatch, simplified/shared params, lazy caller checks, row-ID reads and native position/equality deletes were traced. V3 planning remains synchronous. |
| Conditional checks and errors | Marker/descriptor and capability failures are explicit and classified. No additional silent plaintext fallback found in supported native paths. |
| Test coverage | Inspected cache retention/concurrency, SDK revocation, binary keys, TLS trust/name/reopen failures, capability loss and SQL matrix coverage. The follower tolerance sequence, encrypted writes and SQL-result-cache revocation need regression coverage. |
| Changed expected results | Removed V3 plaintext expectations match the encrypted V3 fixture and default-off refusals. Output-generation provenance cannot be established statically. Enabled SQL uses runtime assertions instead of recorded qt output, a repository test-style deviation. |
| Observability | Stable classifications and existing cache/scan metrics remain available; new provider failures use generic diagnostics. No further actionable observability defect found. |
| Transactions and persistence | Read snapshot identity stays pinned; capability state is transient and lease-bounded. Heartbeat journal/replay has the new inline liveness defect. Internal visible-version/MoW logic is unchanged. |
| Writes, atomicity and crash paths | Product writes are outside the intended feature scope but become reachable as the existing P1 explains. Cache/socket failure cleanup was inspected; no crash or recovery execution was performed. |
| FE/BE propagation | Supported paths retain independent binary data/delete payloads, shared/range PME markers and optional heartbeat/split versions, with assigned-target and actual-caller checks. |
| Performance | Separate cold misses can intentionally duplicate IO; warm classified plaintext entries remain reusable and partition adaptation stays lazy. Author-reported cost data retain failed protocols, shared-host limits and higher FE RSS; measurements were not reproduced. |
| Other issues and user focus | No additional user focus was supplied. Initial ownership, marker/COUNT and transport/replay risk scopes have explicit dispositions; no unresolved static coverage question remains. |
Validation: static inspection only. No builds, tests, benchmarks, source edits or submodule initialization were performed. Author-reported runtime, IAM, deployment and binary ABI/glibc results are not independently certified by this review.
Review converged after 2 round(s).
Existing P0/P1 findings confirmed for this head: #70697 (comment), #70697 (comment)
### Background Private RPC authentication tests generate ephemeral CA and peer identities before opening real listeners. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693, apache#70697 PR Type: Bugfix Problem Summary: Build images can contain a prebuilt OpenSSL executable with missing shared libraries and no system OpenSSL executable. Fixture setup then exits before the authentication tests run. ### Details - **Frequency:** Every fixture setup in such an image. - **Root cause:** The fallback assumed a system OpenSSL CLI was always installed. - **Why existing tests missed it:** The previous local reproduction retained a runnable system CLI. - **Fix:** Generate the same ephemeral identities using the existing JDK keytool and standard PKCS12/PKCS8 APIs when neither OpenSSL candidate runs. Remove temporary private-key stores, retain restrictive file permissions and report fixture logs on failed FE setup. - **Other paths and branches:** The shared fixture serves FE and BE TLS tests. The normal OpenSSL path remains available. No production transport, protocol or TLS verification policy changes. ### Testing The original fixture fails in the pinned CI image; the JDK fallback generates all identities there in about 10 seconds. The repository FE entry point passes all 20 selected RPC/provider tests in that image with zero failures/errors/skips, using shared local compiler/dependency caches. Modern OpenSSL generation, independent certificate-chain/hostname/CA rejection, all seven PKCS8 keys, owner-only permissions and temporary-store cleanup pass. FE Checkstyle reports zero violations, javac --release 17 -Xlint:all is clean, Bash syntax and staged whitespace/privacy checks pass; clang-format 16 passes on all 13 native files already in the PR. The failed native CI build stopped on an interrupted Hadoop dependency download; a fresh complete download matches the published checksum. ### Release note None ### Check List (For Author) - Behavior changed: No production behavior changes. - Does this need documentation: No; test-only fixture portability. - Pre-submission status: Ready for CI rerun. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Fixture helper, setup diagnostics and this message. - Human review: Pending.
### Background The remote streaming transport fixture starts a plaintext BRPC server before exercising its client streams. BRPC 1.4 intentionally retains its bthread keytable pool after server Join because late bthreads may still use it. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693 (shared private RPC test), apache#70697 (integration validation) PR Type: Test Problem Summary: The ASAN test selection completes successfully, but LeakSanitizer reports the known 56-byte BRPC startup allocation at process shutdown. Scope the fixture server startup with the existing leak-check helper, matching the repository load-stream test practice. Keep stream and client allocations outside the scope so their leaks remain detectable. Extract repeated per-file key/AAD assertions without changing their values, keeping the split helper below the static complexity limit. ### Details - Failure: The native test process exits with a 56-byte BRPC Server::StartInternal keytable-pool leak after all 234 assertions/tests pass. - Cause: GoogleTest macro expansion also puts the integration split helper above the cognitive-complexity limit. BRPC 1.4 intentionally keeps the pool allocation after Join to avoid late-bthread access to freed memory; see https://github.com/apache/brpc/blob/1.4.0/src/brpc/server.cpp#L1127-L1137. - Stability evidence: The complete selection passes 234 tests in 14 suites and exits zero with ASAN/LeakSanitizer enabled after the narrowly scoped startup adjustment. ### Testing Fresh ASAN build and 234-test native selection pass with exit zero. clang-format 16 and header hygiene pass. Stream/client operations and other TLS server fixtures remain leak checked. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Test adjustment and this description. - Human review: not stated
### Background Opt-in native encrypted Iceberg reads use SDK metadata and file keys while native writers still emit plaintext physical files. SQL result caches use connector metadata versions, and backend liveness/capability changes are replicated through heartbeat packages. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Bugfix Problem Summary: Enabling reads must not admit unsupported encrypted native writes or let cached results replace current KMS authorization. Capability revocation must also preserve the configured heartbeat liveness grace on followers. Add independent write/cache fences and journal the resulting alive state with capability zero until the existing failure threshold is reached. ### Details - Change map: 132 production lines, 468 tests lines, 31 generated expected results lines, 75 documentation lines; no wire changes. - Frequency: Encrypted writes are exposed when native read admission is enabled; cached results can bypass same-endpoint authorization revocation; follower liveness diverges on the first capability-revoking failure when heartbeat tolerance exceeds one. - Root cause: Schema read admission was also the write barrier, metadata stability was treated as sufficient cache freshness, and replay of a raw BAD heartbeat bypasses leader-side tolerance. - Why existing tests missed it: Coverage did not combine enabled reads with writes, explicitly enabled SQL result caching with KMS revocation, or serialized capability loss with a failure tolerance above one. - Fix: Reject encrypted targets at native planning/begin/SDK refresh/final CAS; explicitly refuse encrypted SQL-cache eligibility and replay; journal cached live state with zero capability while retaining the original BAD response for leader eviction and diagnostics. - Other paths and branches: Preserve plaintext writes, authentication, pinned schema/table/snapshot checks and OCC. Existing SQL cache refusal mechanisms handle both admission and warm-entry eviction. No new journal opcode, wire field or deployment setting is introduced. - Behavior change: Encrypted native writes and encrypted SQL result caches are unavailable independently of read admission. Followers retain the same liveness grace as the leader. ### Testing The original serialized heartbeat path fails by marking the follower dead on the first failure. The corrected test passes through revocation, the configured threshold and recovery. Real SDK tests cover every write operation, concurrent encryption changes and plaintext commits; the full reactor runs 3,242 tests with zero failures/errors and 11 existing skips. All 145 selected FE tests pass, as do FE Checkstyle and the fresh FE package build. The opt-in SQL guard suite passes both generated-output execution and normal replay, with eight result blocks, four KMS denials and two encrypted-write refusals per run. Plaintext cache hits and writes remain valid. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; the read contract and validation record describe the boundaries and evidence. - Pre-submission status: Partially verified: local checks pass; the integration PR remains Draft pending prerequisite and feature acceptance. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, documentation and this description. - Human review: not stated
5c5aa72 to
e3a7782
Compare
|
run buildall |
|
/review |
### Background The remote streaming transport fixture starts a plaintext BRPC server before exercising its client streams. BRPC 1.4 intentionally retains its bthread keytable pool after server Join because late bthreads may still use it. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693 (shared private RPC test), apache#70697 (integration validation) PR Type: Test Problem Summary: The ASAN test selection completes successfully, but LeakSanitizer reports the known 56-byte BRPC startup allocation at process shutdown. Scope the fixture server startup with the existing leak-check helper, matching the repository load-stream test practice. Keep stream and client allocations outside the scope so their leaks remain detectable. ### Details - Failure: The native test process exits with a 56-byte BRPC Server::StartInternal keytable-pool leak after all 234 assertions/tests pass. - Cause: BRPC 1.4 intentionally keeps the pool allocation after Join to avoid late-bthread access to freed memory; see https://github.com/apache/brpc/blob/1.4.0/src/brpc/server.cpp#L1127-L1137. - Stability evidence: The complete selection passes 234 tests in 14 suites and exits zero with ASAN/LeakSanitizer enabled after the narrowly scoped startup adjustment. ### Testing The identical startup scope is checked by the fresh integration ASAN build and 234-test selection with exit zero. This test-only backport does not claim a separate rebuild of the transport branch. clang-format 16 and header hygiene pass. Stream/client operations and other TLS server fixtures remain leak checked. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Test adjustment and this description. - Human review: not stated
There was a problem hiding this comment.
No new actionable findings from the static review of all 135 changed files at e3a7782.
The four existing findings are fixed at this head: DNS identity survives resolved heartbeat connections/reopen (4605096013); native writes have independent encrypted-target guards through SDK refresh/CAS (4605096282); encrypted tables explicitly refuse SQL-cache admission/replay (4605096564); capability revocation preserves leader/follower liveness grace (4608417043). Their code paths and associated tests were inspected independently; none is duplicated or retained as an existing blocker. No additional user-provided focus was supplied.
Critical checkpoint conclusions:
| Checkpoint | Conclusion |
|---|---|
| Goal and evidence | The implementation provides default-off, capability-gated HMS/v3 native Parquet reads with independent data/delete keys. Positive and negative tests cover the mechanisms; runtime success was not established by this invocation. |
| Scope and clarity | The broad transport/cache/SPI changes are connected prerequisites. Reader, TLS and dispatch helpers keep the relevant policies explicit; no additional actionable scope issue was found. |
| Concurrency and locks | Traced manifest prefetch/cancellation, cache publication, reader registration, heartbeat workers/replay and parallel fragment serialization. Actual I/O remains outside the new short ownership monitors; no new lock inversion was substantiated. |
| Lifecycle and static initialization | Statement/table leases survive actual in-flight I/O, losing reader registrations release their leases, completed private results are removed, and failed TLS startup/reopen paths release resources. No new ownership cycle or cross-TU initialization defect was found. |
| Configuration | Encryption reads remain disabled by default. Existing TLS identity/policy settings require restart and coordinated activation; mutable handshake timeouts are snapshotted and validated. No session setting supplies missing capability proof. |
| Compatibility | Missing/old/custom provider proof defaults to unavailable. PME has a distinct reader format. Connector API advances to 34.0 with the corresponding surface test/baseline; FE and plugins require coordinated deployment. |
| Thrift/protobuf IDs | Read all four touched definitions on HEAD, master and branches 4.2/4.1/4.0/3.1. New IDs 26/4/12 and enum 22 are unused, fields are optional, and split field 3 remains reserved for 4.2. Also confirmed the definitions are unchanged on the latest observed master. |
| Parallel paths | Checked initial/direct/simplified fragment dispatch, send-time recheck, lazy caller proof, metadata COUNT, data/position/equality deletes, native/JNI metadata boundaries, both tablet writers, HTTP/streaming, remote results/cancel/retry, brokers and RPC functions. No additional inconsistent supported path was found. |
| Conditional failures | New admission/refusal branches document concrete unsupported cases and preserve explicit classified failures. No silent fallback granting encrypted execution was substantiated. |
| Test coverage | Inspected SDK manifest/cache ownership, cancellation races, independent binary keys/AAD, real TLS listeners, trust/identity/reopen, heartbeat journal serialization, write guards and enabled SQL-cache controls. Tests were not executed. The larger integration suite uses fixed-value assertions despite the regression-output convention; this is a maintenance observation. |
| Expected results | New COUNT/SUM/write and remote-join outputs agree with their fixture rows; removal of default-off v3 results matches their move into enabled coverage. Output-generation history was not independently reproduced. |
| Observability | Classified errors, existing query/endpoint context and cache/RPC metrics remain usable; provider-parser diagnostics avoid exposing identity inputs. No additional required diagnostic defect was found. |
| Persistence and failover | Capability is transient runtime proof rather than image state; tolerated failed heartbeats journal an alive zero-capability snapshot, and threshold failure still journals BAD. Fresh heartbeat publication/replay and SDK transaction retry/CAS paths were traced. |
| Writes and atomicity | Encrypted native writes are independently refused at planning, refreshed operations and final metadata boundaries. Plaintext writes retain SDK CAS and existing pinned schema/identity/snapshot checks; remote writes carry their endpoint policy. |
| FE/BE propagation | Shared and range PME markers, optional binary descriptors, heartbeat version and actual split-caller version have producer/consumer and refusal paths. Keys are checked before serialization and assigned-target send. |
| Performance | Warm plaintext caches remain usable; cold unclassified loads are isolated deliberately. Known encrypted files avoid repeated full-backend inventory scans, and lazy partition adaptation remains lazy. No additional concrete asymptotic defect was found; current-head performance acceptance remains unverified. |
| Other invariants | No new wrong-row, delete application, error-continuation or memory-lifetime defect was substantiated. Internal partition-visible-version and MoW rowset/delete-bitmap protocols are not changed. |
Limits: this was static inspection only. No builds, tests, benchmarks, source modifications or submodule initialization were performed. The author's historical/current validation records were inspected, not independently rerun. Current native RELEASE packaging and glibc 2.17 ABI, cloud runtime, production KMS policy and human performance/security acceptance remain unverified; encrypted v3 lazy SQL execution and documented unsupported formats/catalogs remain outside admission. No source-level candidate or changed-file coverage gap remains unresolved in this bounded review.
Review converged after 2 round(s).
e3a7782 to
bfb39f4
Compare
### Background Private RPC authentication tests generate ephemeral CA and peer identities before opening real listeners. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693, apache#70697 PR Type: Bugfix Problem Summary: Build images can contain a prebuilt OpenSSL executable with missing shared libraries and no system OpenSSL executable. Fixture setup then exits before the authentication tests run. ### Details - **Frequency:** Every fixture setup in such an image. - **Root cause:** The fallback assumed a system OpenSSL CLI was always installed. - **Why existing tests missed it:** The previous local reproduction retained a runnable system CLI. - **Fix:** Generate the same ephemeral identities using the existing JDK keytool and standard PKCS12/PKCS8 APIs when neither OpenSSL candidate runs. Remove temporary private-key stores, retain restrictive file permissions and report fixture logs on failed FE setup. - **Other paths and branches:** The shared fixture serves FE and BE TLS tests. The normal OpenSSL path remains available. No production transport, protocol or TLS verification policy changes. ### Testing The original fixture fails in the pinned CI image; the JDK fallback generates all identities there in about 10 seconds. The repository FE entry point passes all 20 selected RPC/provider tests in that image with zero failures/errors/skips, using shared local compiler/dependency caches. Modern OpenSSL generation, independent certificate-chain/hostname/CA rejection, all seven PKCS8 keys, owner-only permissions and temporary-store cleanup pass. FE Checkstyle reports zero violations, javac --release 17 -Xlint:all is clean, Bash syntax and staged whitespace/privacy checks pass; clang-format 16 passes on all 13 native files already in the PR. The failed native CI build stopped on an interrupted Hadoop dependency download; a fresh complete download matches the published checksum. ### Release note None ### Check List (For Author) - Behavior changed: No production behavior changes. - Does this need documentation: No; test-only fixture portability. - Pre-submission status: Ready for CI rerun. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Fixture helper, setup diagnostics and this message. - Human review: Pending.
### Background The remote streaming transport fixture starts a plaintext BRPC server before exercising its client streams. BRPC 1.4 intentionally retains its bthread keytable pool after server Join because late bthreads may still use it. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693 (shared private RPC test), apache#70697 (integration validation) PR Type: Test Problem Summary: The ASAN test selection completes successfully, but LeakSanitizer reports the known 56-byte BRPC startup allocation at process shutdown. Scope the fixture server startup with the existing leak-check helper, matching the repository load-stream test practice. Keep stream and client allocations outside the scope so their leaks remain detectable. Extract repeated per-file key/AAD assertions without changing their values, keeping the split helper below the static complexity limit. ### Details - Failure: The native test process exits with a 56-byte BRPC Server::StartInternal keytable-pool leak after all 234 assertions/tests pass. - Cause: GoogleTest macro expansion also puts the integration split helper above the cognitive-complexity limit. BRPC 1.4 intentionally keeps the pool allocation after Join to avoid late-bthread access to freed memory; see https://github.com/apache/brpc/blob/1.4.0/src/brpc/server.cpp#L1127-L1137. - Stability evidence: The complete selection passes 234 tests in 14 suites and exits zero with ASAN/LeakSanitizer enabled after the narrowly scoped startup adjustment. ### Testing Fresh ASAN build and 234-test native selection pass with exit zero. clang-format 16 and header hygiene pass. Stream/client operations and other TLS server fixtures remain leak checked. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Test adjustment and this description. - Human review: not stated
### Background Opt-in native encrypted Iceberg reads use SDK metadata and file keys while native writers still emit plaintext physical files. SQL result caches use connector metadata versions, and backend liveness/capability changes are replicated through heartbeat packages. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Bugfix Problem Summary: Enabling reads must not admit unsupported encrypted native writes or let cached results replace current KMS authorization. Capability revocation must also preserve the configured heartbeat liveness grace on followers. Add independent write/cache fences and journal the resulting alive state with capability zero until the existing failure threshold is reached. ### Details - Change map: 132 production lines, 468 tests lines, 31 generated expected results lines, 75 documentation lines; no wire changes. - Frequency: Encrypted writes are exposed when native read admission is enabled; cached results can bypass same-endpoint authorization revocation; follower liveness diverges on the first capability-revoking failure when heartbeat tolerance exceeds one. - Root cause: Schema read admission was also the write barrier, metadata stability was treated as sufficient cache freshness, and replay of a raw BAD heartbeat bypasses leader-side tolerance. - Why existing tests missed it: Coverage did not combine enabled reads with writes, explicitly enabled SQL result caching with KMS revocation, or serialized capability loss with a failure tolerance above one. - Fix: Reject encrypted targets at native planning/begin/SDK refresh/final CAS; explicitly refuse encrypted SQL-cache eligibility and replay; journal cached live state with zero capability while retaining the original BAD response for leader eviction and diagnostics. - Other paths and branches: Preserve plaintext writes, authentication, pinned schema/table/snapshot checks and OCC. Existing SQL cache refusal mechanisms handle both admission and warm-entry eviction. No new journal opcode, wire field or deployment setting is introduced. - Behavior change: Encrypted native writes and encrypted SQL result caches are unavailable independently of read admission. Followers retain the same liveness grace as the leader. ### Testing The original serialized heartbeat path fails by marking the follower dead on the first failure. The corrected test passes through revocation, the configured threshold and recovery. Real SDK tests cover every write operation, concurrent encryption changes and plaintext commits; the full reactor runs 3,242 tests with zero failures/errors and 11 existing skips. All 145 selected FE tests pass, as do FE Checkstyle and the fresh FE package build. The opt-in SQL guard suite passes both generated-output execution and normal replay, with eight result blocks, four KMS denials and two encrypted-write refusals per run. Plaintext cache hits and writes remain valid. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; the read contract and validation record describe the boundaries and evidence. - Pre-submission status: Partially verified: local checks pass; the integration PR remains Draft pending prerequisite and feature acceptance. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, documentation and this description. - Human review: not stated
### Background The native encrypted-read integration records its local validation and the limits of earlier runtime and cost measurements. Upstream advanced the connector API while this integration was under review. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Enhancement Problem Summary: Record fresh verification after resolving the upstream API conflict. Distinguish the current 35.0 API checks from earlier aggregate test receipts and preserve the provenance of generated SQL results. ### Details - Before and after: The record now covers 175 FE tests in one selected run, the combined SPI 35.0 surface and a current SQL replay against the existing generated output. - Configs and defaults: None. - Impact on existing users: Documentation only; no runtime behavior changes. Historical native RELEASE and cost evidence remain explicitly bounded. ### Testing The rebased source passes 3,242 reactor tests with zero failures/errors and 11 existing skips, 175 FE tests, 234 ASAN tests, FE Checkstyle, native formatting, header hygiene, scoped clang-tidy and the full FE package build. The enabled SQL guard suite replays all eight generated result blocks with one suite and zero failures/fatal errors/skips, four KMS denials and two encrypted-write refusals. This documentation-only update follows source-hash verification. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Documentation and this description. - Human review: not stated
|
run buildall |
|
/review |
There was a problem hiding this comment.
Static review completed for bfb39f43fe60c916ec4f3007a7a1d572b8b7934f: no new substantiated findings. Reviewed all 135 changed files, related producer/consumer and failure paths, and the existing discussion. All three reviewers returned NO_NEW_VALUABLE_FINDINGS; all recorded risks were dismissed with evidence. The review converged in 1 round with no unresolved static candidates or uncovered assigned scope.
The four prior issues are addressed at this head:
- DNS identity for TLS heartbeats: pool keys retain the logical hostname separately from the resolved address, including reopen and address turnover.
- Independent encrypted-write rejection: planning, transaction construction, refresh and final metadata commit enforce the plaintext-write boundary independently of read admission.
- Encrypted SQL result-cache replay: explicit connector refusal disables cache admission and invalidates replay instead of using legacy freshness fallback.
- Follower heartbeat liveness grace: the leader keeps the original failed response while the journal carries cached alive state with revoked capability until the liveness threshold.
Neither previously reported P1 remains applicable; no existing blocking comment IDs are retained. No additional user-provided focus was supplied.
Critical checkpoint conclusions:
- Goal and evidence: Code and inspected positive/negative tests align with opt-in HMS/v3 standard-encryption native Parquet reads, independent data/delete keys, and separate write/cache exclusions. This is static evidence, not a new runtime success claim.
- Scope and reuse: The broad diff includes the stated cache and private-RPC prerequisites. Shared admission, file carriers, cache retention and endpoint-policy helpers keep these mechanisms centralized.
- Concurrency and locking: Traced prefetch/load workers, cache races, heartbeat/replay, dispatch/cancellation and statement/catalog teardown. Concurrent maps, immutable/volatile capability snapshots and lease counters protect new shared state; remote I/O and owner cleanup remain outside reader monitor sections. No new lock inversion was identified.
- Lifecycle and memory: Borrower/loader/cache references and actual-I/O reader leases balance in the inspected normal, failure and cancellation paths. Losing reader registrations close their leases, TLS sockets retain their factories, and remote caches participate in shutdown. No new cross-translation-unit static initialization dependency was identified.
- Configuration: The deployment read switch stays off by default. TLS identities use the documented static/restart policy; unsupported modes fail explicitly. Mutable handshake timeout settings are snapshotted before validation and conversion.
- Compatibility: SPI major 35.0 and its recorded surface/version test agree. Legacy custom providers retain their existing overload dispatch and default to no file-key proof. Coordinated TLS activation remains required; a plaintext/TLS rolling transition is not claimed.
- Wire definitions: Complete touched definitions were compared on HEAD, master and branches 4.2/4.1/4.0/3.1, with refs checked against GitHub. New optional IDs 26, 4 and 12 and explicit format value 22 have no collisions. Split request ID 3 remains reserved for 4.2 close_source.
- Parallel paths: Checked eager/cache-backed/SDK planning, COUNT probes, data/position/equality deletes, native position-delete and refused JNI metadata paths, row-ID reads, fragment/split entry points, and remote/broker/function transports. Unsupported cases preserve explicit failure.
- Conditional checks and errors: New checks describe concrete missing/expired proof, old-reader marker, wrong endpoint or identity cases. No verified silent plaintext fallback was found in admitted encrypted paths.
- Test coverage: Inspected identity/proof rejection, binary key/AAD transport, independent file keys, cache revocation, cancellation, owner retirement, registration races, heartbeat replay and plaintext controls. No build or test was executed during this review.
- Expected results: Changed SQL goldens agree with fixture rows and arithmetic; encrypted-write refusals preserve four rows, plaintext insertion adds the fifth, and remote join outputs match inputs. Output generation was not rerun or independently certified here.
- Observability: Classified errors and existing RPC/cache metrics support investigation without adding key/PEM payloads to diagnostics. No new unbounded hot-path logging was identified.
- Persistence and failover: Capability proof remains transient and freshness-bound while heartbeat broadcasts preserve follower liveness semantics. Frozen Iceberg read metadata and existing journal/SDK sequencing remain intact; OLAP visible-version and MoW delete-bitmap algorithms are unchanged.
- Writes and atomicity: Independent encrypted-target fences preserve schema/snapshot checks and SDK CAS conflict handling, including concurrent encryption adoption. Remote write policy reaches both tablet writers and partition callbacks. No new transaction atomicity defect was established.
- FE/BE propagation: Traced capability/caller versions, remote_endpoint and PME markers through shared/simplified fragments, direct typed calls, serialization, send-time recheck and lazy batches. Data and delete descriptors retain independent binary values.
- Performance: Warm plaintext caches/channels remain reusable; completed private results do not accumulate, and known encrypted files avoid repeated whole-inventory checks. Physical COUNT, KMS calls and isolated cold loads have documented costs; no quantitative performance conclusion is drawn.
- Final recheck: Revisited mutable versus frozen owners, underlying HMS SDK table ownership, empty pins, plaintext-first mixed scans, observer cancellation before actual I/O exit, raw fragment callers, same-address endpoint policies and HTTP batches. No further substantiated issue remained.
Validation limits: no builds, tests, benchmarks, service execution or source modifications were performed. Current runtime interoperability, final RELEASE packaging/glibc ABI, production KMS policies, cloud transport acceptance and performance acceptance remain unverified by this static review; the author's historical runs are not adopted as current verification.
Review converged after 1 round(s).
### Background The remote streaming transport fixture starts a plaintext BRPC server before exercising its client streams. BRPC 1.4 intentionally retains its bthread keytable pool after server Join because late bthreads may still use it. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693 (shared private RPC test), apache#70697 (integration validation) PR Type: Test Problem Summary: The ASAN test selection completes successfully, but LeakSanitizer reports the known 56-byte BRPC startup allocation at process shutdown. Scope the fixture server startup with the existing leak-check helper, matching the repository load-stream test practice. Keep stream and client allocations outside the scope so their leaks remain detectable. Extract repeated per-file key/AAD assertions without changing their values, keeping the split helper below the static complexity limit. ### Details - Failure: The native test process exits with a 56-byte BRPC Server::StartInternal keytable-pool leak after all 234 assertions/tests pass. - Cause: GoogleTest macro expansion also puts the integration split helper above the cognitive-complexity limit. BRPC 1.4 intentionally keeps the pool allocation after Join to avoid late-bthread access to freed memory; see https://github.com/apache/brpc/blob/1.4.0/src/brpc/server.cpp#L1127-L1137. - Stability evidence: The complete selection passes 234 tests in 14 suites and exits zero with ASAN/LeakSanitizer enabled after the narrowly scoped startup adjustment. ### Testing Fresh ASAN build and 234-test native selection pass with exit zero. clang-format 16 and header hygiene pass. Stream/client operations and other TLS server fixtures remain leak checked. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Test adjustment and this description. - Human review: not stated
### Background Opt-in native encrypted Iceberg reads use SDK metadata and file keys while native writers still emit plaintext physical files. SQL result caches use connector metadata versions, and backend liveness/capability changes are replicated through heartbeat packages. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Bugfix Problem Summary: Enabling reads must not admit unsupported encrypted native writes or let cached results replace current KMS authorization. Capability revocation must also preserve the configured heartbeat liveness grace on followers. Add independent write/cache fences and journal the resulting alive state with capability zero until the existing failure threshold is reached. ### Details - Change map: 132 production lines, 468 tests lines, 31 generated expected results lines, 75 documentation lines; no wire changes. - Frequency: Encrypted writes are exposed when native read admission is enabled; cached results can bypass same-endpoint authorization revocation; follower liveness diverges on the first capability-revoking failure when heartbeat tolerance exceeds one. - Root cause: Schema read admission was also the write barrier, metadata stability was treated as sufficient cache freshness, and replay of a raw BAD heartbeat bypasses leader-side tolerance. - Why existing tests missed it: Coverage did not combine enabled reads with writes, explicitly enabled SQL result caching with KMS revocation, or serialized capability loss with a failure tolerance above one. - Fix: Reject encrypted targets at native planning/begin/SDK refresh/final CAS; explicitly refuse encrypted SQL-cache eligibility and replay; journal cached live state with zero capability while retaining the original BAD response for leader eviction and diagnostics. - Other paths and branches: Preserve plaintext writes, authentication, pinned schema/table/snapshot checks and OCC. Existing SQL cache refusal mechanisms handle both admission and warm-entry eviction. No new journal opcode, wire field or deployment setting is introduced. - Behavior change: Encrypted native writes and encrypted SQL result caches are unavailable independently of read admission. Followers retain the same liveness grace as the leader. ### Testing The original serialized heartbeat path fails by marking the follower dead on the first failure. The corrected test passes through revocation, the configured threshold and recovery. Real SDK tests cover every write operation, concurrent encryption changes and plaintext commits; the full reactor runs 3,242 tests with zero failures/errors and 11 existing skips. All 145 selected FE tests pass, as do FE Checkstyle and the fresh FE package build. The opt-in SQL guard suite passes both generated-output execution and normal replay, with eight result blocks, four KMS denials and two encrypted-write refusals per run. Plaintext cache hits and writes remain valid. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; the read contract and validation record describe the boundaries and evidence. - Pre-submission status: Partially verified: local checks pass; the integration PR remains Draft pending prerequisite and feature acceptance. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, documentation and this description. - Human review: not stated
bfb39f4 to
b1253ba
Compare
### Background The native encrypted-read integration records its local validation and the limits of earlier runtime and cost measurements. Upstream advanced the connector API while this integration was under review. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Enhancement Problem Summary: Record fresh verification after resolving the upstream API conflict. Distinguish the current 35.0 API checks from earlier aggregate test receipts and preserve the provenance of generated SQL results. ### Details - Before and after: The record now covers 175 FE tests in one selected run, the combined SPI 35.0 surface and a current SQL replay against the existing generated output. - Configs and defaults: None. - Impact on existing users: Documentation only; no runtime behavior changes. Historical native RELEASE and cost evidence remain explicitly bounded. ### Testing The rebased source passes 3,242 reactor tests with zero failures/errors and 11 existing skips, 175 FE tests, 234 ASAN tests, FE Checkstyle, native formatting, header hygiene, scoped clang-tidy and the full FE package build. The enabled SQL guard suite replays all eight generated result blocks with one suite and zero failures/fatal errors/skips, four KMS denials and two encrypted-write refusals. This documentation-only update follows source-hash verification. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Documentation and this description. - Human review: not stated
### Background The encrypted-read validation record contains results gathered before its prerequisites merged into master. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (integration rebase) PR Type: Build/CI/Chore Problem Summary: Distinguish historical validation from fresh checks after rebasing the integration onto merged prerequisites, including the connector SPI 36.0 update. ### Details - **Affected:** The validation record's introduction. - **Developer and release impact:** Readers can distinguish historical results from current PR evidence; runtime behavior is unchanged. - **License and third-party:** None. - **Rollback:** Remove the clarification without affecting execution. ### Testing Documentation diff and whitespace checks pass. The rebased source passes 720 selected FE tests, FE Checkstyle, clang-format 16 and header hygiene. Fresh native execution and FE packaging remain blocked by incomplete local third-party dependencies. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Documentation clarification and commit description. - Human review: not stated
### Background The remote streaming transport fixture starts a plaintext BRPC server before exercising its client streams. BRPC 1.4 intentionally retains its bthread keytable pool after server Join because late bthreads may still use it. ### What problem does this PR solve? Issue Number: None Related PR: apache#70693 (shared private RPC test), apache#70697 (integration validation) PR Type: Test Problem Summary: The ASAN test selection completes successfully, but LeakSanitizer reports the known 56-byte BRPC startup allocation at process shutdown. Scope the fixture server startup with the existing leak-check helper, matching the repository load-stream test practice. Keep stream and client allocations outside the scope so their leaks remain detectable. Extract repeated per-file key/AAD assertions without changing their values, keeping the split helper below the static complexity limit. ### Details - Failure: The native test process exits with a 56-byte BRPC Server::StartInternal keytable-pool leak after all 234 assertions/tests pass. - Cause: GoogleTest macro expansion also puts the integration split helper above the cognitive-complexity limit. BRPC 1.4 intentionally keeps the pool allocation after Join to avoid late-bthread access to freed memory; see https://github.com/apache/brpc/blob/1.4.0/src/brpc/server.cpp#L1127-L1137. - Stability evidence: The complete selection passes 234 tests in 14 suites and exits zero with ASAN/LeakSanitizer enabled after the narrowly scoped startup adjustment. ### Testing Fresh ASAN build and 234-test native selection pass with exit zero. clang-format 16 and header hygiene pass. Stream/client operations and other TLS server fixtures remain leak checked. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Test adjustment and this description. - Human review: not stated
### Background Opt-in native encrypted Iceberg reads use SDK metadata and file keys while native writers still emit plaintext physical files. SQL result caches use connector metadata versions, and backend liveness/capability changes are replicated through heartbeat packages. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Bugfix Problem Summary: Enabling reads must not admit unsupported encrypted native writes or let cached results replace current KMS authorization. Capability revocation must also preserve the configured heartbeat liveness grace on followers. Add independent write/cache fences and journal the resulting alive state with capability zero until the existing failure threshold is reached. ### Details - Change map: 132 production lines, 468 tests lines, 31 generated expected results lines, 75 documentation lines; no wire changes. - Frequency: Encrypted writes are exposed when native read admission is enabled; cached results can bypass same-endpoint authorization revocation; follower liveness diverges on the first capability-revoking failure when heartbeat tolerance exceeds one. - Root cause: Schema read admission was also the write barrier, metadata stability was treated as sufficient cache freshness, and replay of a raw BAD heartbeat bypasses leader-side tolerance. - Why existing tests missed it: Coverage did not combine enabled reads with writes, explicitly enabled SQL result caching with KMS revocation, or serialized capability loss with a failure tolerance above one. - Fix: Reject encrypted targets at native planning/begin/SDK refresh/final CAS; explicitly refuse encrypted SQL-cache eligibility and replay; journal cached live state with zero capability while retaining the original BAD response for leader eviction and diagnostics. - Other paths and branches: Preserve plaintext writes, authentication, pinned schema/table/snapshot checks and OCC. Existing SQL cache refusal mechanisms handle both admission and warm-entry eviction. No new journal opcode, wire field or deployment setting is introduced. - Behavior change: Encrypted native writes and encrypted SQL result caches are unavailable independently of read admission. Followers retain the same liveness grace as the leader. ### Testing The original serialized heartbeat path fails by marking the follower dead on the first failure. The corrected test passes through revocation, the configured threshold and recovery. Real SDK tests cover every write operation, concurrent encryption changes and plaintext commits; the full reactor runs 3,242 tests with zero failures/errors and 11 existing skips. All 145 selected FE tests pass, as do FE Checkstyle and the fresh FE package build. The opt-in SQL guard suite passes both generated-output execution and normal replay, with eight result blocks, four KMS denials and two encrypted-write refusals per run. Plaintext cache hits and writes remain valid. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; the read contract and validation record describe the boundaries and evidence. - Pre-submission status: Partially verified: local checks pass; the integration PR remains Draft pending prerequisite and feature acceptance. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, documentation and this description. - Human review: not stated
### Background The native encrypted-read integration records its local validation and the limits of earlier runtime and cost measurements. Upstream advanced the connector API while this integration was under review. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted-read integration) PR Type: Enhancement Problem Summary: Record fresh verification after resolving the upstream API conflict. Distinguish the current 35.0 API checks from earlier aggregate test receipts and preserve the provenance of generated SQL results. ### Details - Before and after: The record now covers 175 FE tests in one selected run, the combined SPI 35.0 surface and a current SQL replay against the existing generated output. - Configs and defaults: None. - Impact on existing users: Documentation only; no runtime behavior changes. Historical native RELEASE and cost evidence remain explicitly bounded. ### Testing The rebased source passes 3,242 reactor tests with zero failures/errors and 11 existing skips, 175 FE tests, 234 ASAN tests, FE Checkstyle, native formatting, header hygiene, scoped clang-tidy and the full FE package build. The enabled SQL guard suite replays all eight generated result blocks with one suite and zero failures/fatal errors/skips, four KMS denials and two encrypted-write refusals. This documentation-only update follows source-hash verification. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Documentation and this description. - Human review: not stated
### Background The encrypted-read validation record contains results gathered before its prerequisites merged into master. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (integration rebase) PR Type: Build/CI/Chore Problem Summary: Distinguish historical validation from fresh checks after rebasing the integration onto merged prerequisites, including the connector SPI 36.0 update. ### Details - **Affected:** The validation record's introduction. - **Developer and release impact:** Readers can distinguish historical results from current PR evidence; runtime behavior is unchanged. - **License and third-party:** None. - **Rollback:** Remove the clarification without affecting execution. ### Testing Documentation diff and whitespace checks pass. The rebased source passes 720 selected FE tests, FE Checkstyle, clang-format 16 and header hygiene. Fresh native execution and FE packaging remain blocked by incomplete local third-party dependencies. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Documentation clarification and commit description. - Human review: not stated
### Background Native encrypted reads require a PME-capable backend and authenticated private RPC. The integration previously represented availability as a protocol version and repeated negotiation on split requests. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (native encrypted read integration) PR Type: Enhancement Problem Summary: Use a boolean capability for coordinated FE, BE and plugin deployment. Remove split caller version negotiation and consolidate the small BE helper into the existing private RPC TLS module while preserving reader and transport admission checks. ### Details - **Change map:** 32 files, 207 added and 280 removed lines across capability propagation, split admission, tests and documentation; the two standalone BE helper files are deleted. - **Before and after:** Numeric minimum-version handling becomes boolean availability from heartbeat through connector SPI and final dispatch. Split requests retain their original fields; the FE validates the target before returning keys. - **Configs and defaults:** No configuration changes. Encrypted reads remain off by default, and unavailable readers or unprotected transports still reject them. - **Impact on existing users:** This revises an unmerged opt-in feature. Matching FE, BE and connector plugins are deployed together; rolling upgrades and downgrade compatibility are outside scope. - **Behavior change:** A capable target can fetch encrypted splits without a separate request version. Freshness, immediate capability revocation, backend liveness grace, external endpoint rejection, write/cache guards and file descriptor validation are preserved. - **Compatibility:** The pending optional heartbeat field is boolean; the pending SPI major is 37 over master 36. File-key descriptor versions remain unchanged. ### Testing The no-negotiation service test fails before the change with INTERNAL_ERROR rather than OK, then passes afterward. The official FE runner passes 720 tests in 22 classes with no failures, errors or skips, including all 39 split tests. FE Checkstyle passes in Core, SPI and Iceberg. All seven C++ files in the complete PR pass clang-format 16; six changed files pass scoped clang-tidy, and header hygiene and whitespace checks pass. Native CMake and Thrift generation succeed, but native execution is blocked by a missing local third-party static archive. Positive PME SQL and full packaging are not verified in this update. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No; existing implementation and wire guides are updated. - Pre-submission status: Partially verified: native execution, full packaging and enabled encrypted SQL remain unverified with the incomplete local dependency bundle. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Implementation, tests, documentation and this description. - Human review: not stated
### Background Native encrypted Iceberg reads need current reader and private RPC capability on their query candidates. A fragment's bound destination stays fixed through prepare, start, cancellation and result fetching. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (encrypted-read integration under review) PR Type: Bugfix Problem Summary: A stale backend object could authorize a fragment sent to an old or unregistered destination. Encrypted v3 COUNT could fail in a batch-estimation probe, and an ineligible backend could veto an otherwise supported query. Validate the registered bound destination, select v3 synchronous planning before the probe, and share query candidate selection with scheduling. ### Details - **Frequency:** Dispatch failures depend on a port, registry or capability change between binding and sending. COUNT and candidate-admission failures are deterministic under the tested settings and node states. - **Root cause:** Mutable backend capability was checked separately from the copied RPC address; the v3 early return followed the delete-manifest COUNT probe; inventory liveness did not represent query eligibility. - **Why existing tests missed it:** The prior dispatch test mocked the complete gate. The v3 batch test disabled COUNT pushdown, the SQL matrix did not explicitly enable dangling-delete handling, and capability tests did not resolve query candidates. - **Fix:** Re-resolve the bound backend ID and match its registered BRPC address before checking capability and preparing the RPC. Reuse the scheduler's policy and compute-group resolution without initializing assignment state. Move the existing v3 synchronous return before the metadata COUNT probe. - **Other paths and branches:** The typed direct fragment path already checks registered addresses. Split checks and unsupported reader paths stay enforced. These fixes target the unmerged encrypted-read integration in apache#70697; no standalone release-branch backport is proposed. ### Testing - Official local run-fe-ut.sh selection: all nine selected suites executed, 469 tests, zero failures, errors or skips; reactor BUILD SUCCESS. Covers Iceberg planning/admission, fragment serialization/dispatch, RPC targets and external scan scheduling. - Baseline reproductions: v3 COUNT throws COUNT_READ_UNAVAILABLE; stale port, removed registration and incapable replacement still prepare fragments; query-disabled, load-disabled and other-group backends wrongly reject admission. The same regression cases pass with the fixes, including success and refusal controls. - FE validate with Checkstyle passes with zero violations. clang-format 16.0.6 passes all seven C++ files in the full PR. - The enabled encrypted SQL suite is extended to set and restore ignore_iceberg_dangling_delete, but was not rerun against a prepared native PME/TLS deployment. ### Notes for Reviewers Keep the bound destination instead of redirecting a prepared query to a new endpoint. The destination check remains a planning refusal and does not blacklist a healthy backend as an RPC failure. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: Yes; the existing encrypted-read contract now explains query candidates and bound-recipient validation. - Pre-submission status: Partially verified: enabled native encrypted SQL was not rerun in this update. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, documentation and this description. - Human review: not stated
### Background External scan selection can choose a partial set of mixed nodes to fill a compute-node deficit. Encrypted-read admission must validate the same selected members that scan initialization uses. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 (feature under review) PR Type: Bugfix Problem Summary: Reusing the scheduling policy still selects independent random subsets for admission and scanning. A capable subset can pass admission while another selected subset fails dispatch, or a valid scan can be refused early. Share the selected membership in the existing statement planning scope. ### Details - **Frequency:** Always under a controlled alternating selection order with one compute node, two mixed nodes and one incapable mixed node; ordinary occurrence depends on randomized selection. - **Root cause:** Admission and default scan initialization separately invoke getCandidateBackends, which shuffles and fills a partial candidate set. - **Why existing tests missed it:** Existing availability tests exclude query-disabled, load-disabled and other-group nodes but do not exercise independently selected partial subsets. The SQL fixture does not control candidate ordering or capability asymmetry. - **Fix:** Select immutable membership once per statement planning attempt and compute-group identity using the existing planning scope. Admission rechecks live capability for that membership. Keep preferred-location/custom policies and all send-boundary recipient checks. - **Other paths and branches:** Both admission-first and scan-first default paths are covered, including multiple scans, reset and new statements. This corrects the unmerged feature's admission integration; no release backport is proposed. - **Behavior change:** Default external scans within one statement/group share selected membership; each retains its own split assignment and weights. ### Testing Official FE selection passes all 171 tests across 11 suites. The four final controlled-order cases fail against isolated baseline production classes. Coverage includes current capability revocation, another scan, statement and group isolation, preferred-location policies and planning reset. FE Checkstyle and clang-format 16.0.6 on all seven existing PR C++ files pass. ### Notes for Reviewers Only backend membership is memoized, never capability. The existing planning scope reclaims it; no global cache, new thread, transport or wire field is introduced. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; the read contract describes shared candidate membership. The feature's user guide remains planned separately. - Pre-submission status: Partially verified: fresh native encrypted SQL, native compilation and live KMS acceptance have not been run. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: code, tests and description. - Human review: not stated.
### Background Encrypted Iceberg scans share query-wide file parameters across workers and coarsen Parquet files for BE row-group refinement. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 PR Type: Bugfix Problem Summary: An OLAP-only worker can be refused because another worker's PME marker is present in shared parameters. A single coarse encrypted Parquet range also loses parallel readers. Check marker use against each recipient and keep PME eligible for the existing refinement gates. ### Details - **Frequency:** Always under the reproduced shared-marker and coarse-PME-range conditions. - **Root cause:** The serialization guard treated a query-wide marker as a local reader assignment, and the FE/BE columnar predicates omitted PME. - **Why existing tests missed it:** FileScanEncryptionGuardTest did not model different OLAP/file recipients sharing one map. PluginDrivenScanNodeBeSplitTest omitted PME; FileScannerV2Test did not combine PME with one coarse range. The encrypted SQL suites verify results but do not assert scanner parallelism or an OLAP-only recipient with a revoked encryption capability. - **Fix:** Validate marker-only capability for assigned plan nodes and scan ranges, retaining protection for all actual serialized key descriptors. Include PME in the existing columnar gates while preserving load, serial and delete restrictions. - **Other paths and branches:** Initial and simplified fragments, lazy empty range lists, explicit and inherited formats and remote transport guards are covered. Plaintext Parquet/ORC retain their gates. This fixes the unmerged feature branch of apache#70697; release-branch variants were not revalidated for this follow-up. Release runtime behavior was not executed. ### Testing Official FE selection: 177 tests in 12 suites, zero failures/errors/skips. Two intended FE regressions reproduced against 378e10f and all 17 focused tests pass with the fix. FE Checkstyle, clang-format 16 and the repository clang-tidy check pass. Both changed C++ translation units pass syntax checks. Official BE UT execution is blocked by a missing Google Cloud C++ static library. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No; preserves the feature's documented execution contract. - Pre-submission status: Partially verified: BE runtime tests and fresh enabled encrypted SQL require unavailable native dependencies and a prepared deployment. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests and this message. - Human review: not stated.
### Background External scans memoize candidate backends during planning. Lazy split sources retain their selected backend while later requests fetch more file ranges. ### What problem does this PR solve? Issue Number: apache#70715 Related PR: apache#70697 PR Type: Bugfix Problem Summary: Default root/admin external scans fail when the selection key requests an unsupported compute-group ID. An encrypted lazy source can also retain a capability proof after its backend is removed or replaced. Use the default group's stable domain and bind lazy delivery to the original live registration and address. ### Details - **Frequency:** Always for the reproduced default-group and stale-recipient conditions. - **Root cause:** The default AllBackendComputeGroup deliberately has no getId implementation. SplitSource checked the captured Backend's lease without resolving its current registration or retaining the original RPC address. - **Why existing tests missed it:** Selection tests used mocked or ordinary ComputeGroup instances. SplitSourceTest checked capability refusal but did not change backend registration after a successful encrypted batch. External SQL suites exposed the real default-group failure; the encrypted SQL fixture does not drop, replace or move a backend between lazy fetches. - **Fix:** Assign the untagged default group one statement-local domain. Capture the source-time BRPC address and share the initial-dispatch registry/address/capability validator, additionally requiring exact registration identity for a lazy source. Denial stops producers and remains terminal. - **Other paths and branches:** Named, merged and cloud groups keep their ID-based domains. Plaintext batches do not invoke encryption checks. Initial fragment checks keep their original public contract. No wire, SPI or stored format change. This addresses the unmerged feature integration; release variants were not revalidated. ### Testing Two default-group cases fail on the baseline with the same External error. Three live-source cases fail by returning encrypted ranges after drop, replacement or address movement. All five pass with the fixes. Official FE selection: 181 tests in 11 suites, zero failures/errors/skips. Fresh FE Checkstyle and clang-format 16 pass. No C++ source changed in this follow-up. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No; restores the documented selection and recipient-validation contracts. - Pre-submission status: Partially verified: fresh External rerun and prepared native PME/TLS SQL remain outstanding; native runtime tests are blocked by incomplete local libraries. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests and this message. - Human review: not stated.
22a97da to
30385c4
Compare
|
run buildall |
|
/review |
|
run external |
There was a problem hiding this comment.
Static review of head 30385c4: no new distinct inline findings. All 71 changed paths and the related execution paths were covered. No additional user focus was supplied.
The previously reported P1 write-fence, heartbeat DNS identity, fragment recipient-binding and lazy recipient-registration issues are repaired on this head; no existing P0/P1 remains independently confirmed.
The existing P2 encrypted-file refinement concern still applies downstream. The new PME eligibility gates retain scanner parallelism, but ParquetFileContext::open sets the metadata-cache key to empty for keyed files and derives has_stable_identity=false from it (be/src/format_v2/parquet/parquet_file_context.cpp:354-384). ParquetReader::build_physical_splits then returns without children (be/src/format_v2/parquet/parquet_reader.cpp:812-816). A single coarse keyed file therefore still runs on one scanner. The added test checks eligibility predicates rather than real encrypted child creation. Separate immutable file identity from process-wide cache eligibility and test actual keyed-file splitting. This is already reported, so it is not duplicated inline.
Critical checkpoint conclusions:
- Goal and proof: opt-in HMS v3 encrypted Parquet reads are connected to native capability and protected dispatch. Independent data/delete keys, physical COUNT and refusal cases have targeted tests; the known refinement limitation above remains.
- Scope and clarity: the cross-layer breadth follows the integration; existing storage/SPI/transaction seams are reused. Default plaintext external scans now share candidate membership within a statement, as documented.
- Concurrency and locking: reviewed heartbeat/replay, parallel serialization, lazy batches, statement memoization and SDK refresh/CAS. Existing synchronization and immutable target binding are retained; no new lock-order defect was established.
- Lifecycle and initialization: planning lists are discarded at planning completion/reset; file keys remain query/reader owned; listener stop clears proof and send refusal releases serialized bytes. No new cross-translation-unit initialization dependency was found.
- Configuration: the existing read switch remains off by default and requires restart. Capability proof checks the selected providers, a started TLS listener and supported static TLS settings; no new dynamic configuration promise is introduced.
- Compatibility: SPI advances from 36.0 to 37.0 with the version assertion and recorded surface updated. Missing capabilities/custom providers refuse encrypted work; ordinary wire formats retain their meaning. Coordinated deployment is required; rolling TLS activation and runtime upgrade certification are not established here.
- Thrift/protobuf: read the complete touched definitions on HEAD, master and branches 4.2/4.1/4.0/3.1, with local refs verified against live branch SHAs. Optional heartbeat field12 and explicit format22 have no conflicting allocation or reused meaning.
- Parallel paths: inspected normal and typed fragment dispatch, shared/simplified parameters, lazy batches, normal/COUNT/native-position-delete/JNI planning, row-id reads, refinement/adaptive sizing and write operations. Unsupported encrypted JNI/ORC/Puffin and remote-cluster key dispatch remain refused. Cloud/custom runtime acceptance remains unverified.
- Conditions and errors: descriptor, format, recipient and capability checks have concrete triggering paths and classified failures. The earlier unused shared-marker, candidate-filter/subset and v3 COUNT-estimation issues are repaired.
- Test coverage: positive/negative capability, image/replay, recipient changes, SDK write races, warm-cache refusal and independent key cases are represented. Actual encrypted row-group child generation is the identified test gap. Tests were inspected, not executed.
- Expected results: changed golden counts/rows match the fixtures, including removal of v3 plaintext expectations and the successful plaintext insert. Generation/replay was not independently executed. The integration suite uses assertions for both runtime references and some predetermined values, departing from the repository qt-output guidance.
- Observability: classified failures and existing scan/RPC profiles retain useful context without formatting file keys; no new per-file INFO logging was introduced.
- Persistence and failover: runtime capability is transient on Backend; heartbeat journal propagation renews proof and revokes it without shortening follower liveness grace. No durable file-key state or new connector EditLog contract was added.
- Writes and atomicity: encrypted targets are refused independently at sink planning, transaction opening, refresh and commit. Iceberg1.12 SIMPLE transaction refresh plus HMS metadata CAS/retry preserves concurrent-adoption fencing. Native storage visibility/version/delete-bitmap rules are unchanged by this PR.
- FE/BE propagation: BE advertises the optional flag; FE consumes/broadcasts it and checks admission plus actual recipients. PME range/shared markers and independent file/delete descriptors reach the native readers and row-id path.
- Performance and memory: inventory proof is not repeated per encrypted file; only candidate membership is memoized. Encrypted caches/metadata shortcuts are deliberately bypassed. The known refinement issue limits parallelism; no fresh benchmark or native memory/ABI result is claimed.
- Additional review: challenged undeclared file keys, metadata-table delegation, raw manifest caches, unsupported COUNT placeholders, provider subclasses, stale registrations, SDK temporary operations and delete sequence preservation. Remaining speculative candidates were dismissed with concrete scope/call-chain evidence; no unresolved source-level review question remains.
Validation limits: static inspection only. No builds, tests, benchmarks, source edits or submodule initialization were performed. Author-reported historical execution does not prove current-head native PME/TLS SQL, live KMS, full FE packaging, cloud runtime, glibc ABI or performance acceptance. The bounded static review converged in two rounds; convergence does not mean the known P2 is fixed or that deployment acceptance has been established.
Review converged after 2 round(s).
|
run buildall |
| String key = "engine:external-scan-backends:" + computeGroup.getClass().getName() + ":" + groupId; | ||
| // Selection can randomly fill a compute-node deficit with mixed nodes. Admission and every default | ||
| // scan must reuse that result within the statement, while capability checks continue to read live state. | ||
| return scope.computeIfAbsentForPlanning(key, () -> List.copyOf(queryBackendPolicy(Collections.emptyList()) |
There was a problem hiding this comment.
[P2] Give each round-robin scan its own starting backend
Caching this list also freezes its order. Each scan starts with nextBe = 0, so when a query has several one-split scans, every scan assigns its split to the first BE. This affects plaintext external tables too.
I compared the FE scheduler before and after this change with eight eligible BEs and 32 distinct, remotely readable files, one split per scan in the same statement. With file cache and consistent hashing disabled and external_scan_consistent_hash_spread_num=1, the previous code used all eight BEs. At 30385c4, all 32 splits went to one BE.
Could we keep the selected membership shared with admission and vary the starting index per scan? The reuse test can compare backend IDs as a set so it still catches resampling while allowing round-robin scans to spread the work.
There was a problem hiding this comment.
Addressed in follow-up PR #71011. Candidate membership remains shared with statement admission, while each ROUND_ROBIN scan initializes its own starting cursor. Explicit load ordering still resets the cursor to the selected first backend.
The new deterministic regression covers 32 one-split scans over eight backends, verifies one candidate-membership selection and set reuse, and checks per-scan spreading. Additional coverage checks cursor progression across batches and explicit load ordering. All 67 related scheduler, load-selection and capability tests pass.
### Background V4 readers distinguish table-relative references from retained filesystem-rooted metadata. Doris supports V4 reads while refusing unsupported data writes and maintenance. ### What problem does this PR solve? Issue Number: apache#70868 Related PR: apache#70697 (merged prerequisite) PR Type: Bugfix Problem Summary: A Hadoop root-table layout can mistake two spellings of one retained manifest for ambiguous objects. Distributed rewrite can also commit after a concurrent V3-to-V4 upgrade, and REST semantic merging can evade a client's last format check. Recognize qualified file aliases and retain the admitted format through client operations and atomic REST update application. ### Details - **Change map:** Six production files +94/-14 and three test files +370/-0. Reuse captured Hadoop inputs, existing transaction/procedure validators and the REST compatibility codec. Most added lines exercise SDK-backed state transitions and request application. - **Frequency:** Always for the root/qualified alias layout after producer expiration; write refusal gaps require a concurrent format change before commit or REST server application. - **Root cause:** Two matching candidate lengths are treated as two identities, REWRITE has no schema context, and REST requirements omit table format. - **Why existing tests missed it:** In-memory manifest candidates did not model actual Hadoop aliases. Rewrite tests lacked format upgrades after sink planning; schema/ref validation did not cover REST metadata-only upgrades after the final refresh. New controlled tests cover each gap. - **Fix:** Compare captured Hadoop qualified identities without normalizing object-store keys. Persist admitted format independently of schema context across current/refresh/temp/base/result/commit/retry. Scope REST serialization by table UUID and prepend an explicit same-version upgrade, which rejects newer server metadata atomically. Restore scope on every exit and retain schema high-water behavior. - **Other paths and branches:** Cached/uncached eager/streamed reads, transactions, whole-file DELETE, synchronous procedures and single/multi-table REST codecs share the invariants. Same-format retries and native encryption guards remain supported. Rebase conflict sites preserve byte-cache bypass and projections from merged apache#70697. The V4 adapter is unmerged in apache#70869 and absent from release branches; the REST case extends this PR's new refusal contract. ### Testing - Current scoped runs passed 1109 unit/JNI tests across 42 suites, zero failures/errors; two pre-existing disabled snapshot-accounting cases remain skipped. Includes all 16 added cases. - Baseline tests reproduce both reported issues. SDK request/requirement/update-builder tests reproduce the post-refresh REST merge window before its wire fence. Positive retries, procedures, cross-table/concurrent scope isolation and exception cleanup pass. - Explicit FE Checkstyle passes. Packaged SQL, matching native build and live KDC/HDFS/third-party REST integration were not rerun. ### Release note None; corrects the unmerged V4 read implementation. ### Check List (For Author) - Behavior changed: Yes; guarded writes abort concurrent format transitions and retain same-format retries. - Does this need documentation: No - Pre-submission status: Partially verified: unit/JNI/style checks pass; packaged SQL, matching native build and live-service integration remain unverified for this update. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests and this description. - Human review: not stated.
### Background V4 readers distinguish table-relative metadata from lists retained by upgraded tables. ### What problem does this PR solve? Issue Number: apache#70868 Related PR: apache#70697 (merged prerequisite) PR Type: Bugfix Problem Summary: An unrelated non-Avro object at the relative candidate aborts reading an intact rooted V3 manifest list after a metadata-only V4 upgrade. Recover only when the rooted list proves the expected snapshot and a pre-V4 producer. ### Details - **Change map:** One production file +18/-2 and one test file +111/-0. Reuse the existing header probe and provenance binding. - **Behavior change:** Valid legacy lists remain readable despite unrelated non-Avro bytes at a speculative candidate. - **Frequency:** Deterministic when the relative candidate exists with invalid Avro magic and the committed rooted list remains valid. - **Root cause:** The speculative candidate's parse exception escapes before probing the committed legacy namespace. - **Why existing tests missed it:** Candidate tests covered readable decoys, missing objects and manifest descriptors, without a malformed manifest-list candidate. - **Fix:** Classify only InvalidAvroMagicException wrapped by the SDK. Recover only with matching snapshot ID and format1-3; otherwise retain failure. Permission/general IO errors and standalone readers without expected snapshot identity stay strict. - **Other paths and branches:** Cached/uncached eager/streaming planning and prepared JNI list bindings share the resolver. No normal-path IO, ownership, wire or configuration changes. The adapter is unmerged and absent from release branches. ### Testing - Baseline:12 new cases, with two genuine read errors and ten passing controls. After the fix:1121 passes across42 suites, zero failures/errors; two existing disabled cases. Includes all128 V4 and20 JNI cases. - Explicit FE Checkstyle passes. Packaged SQL, matching native build and live HDFS/KDC/third-party REST integration were not rerun. ### Release note None; fixes the unmerged V4 adapter. ### Check List (For Author) - Behavior changed: Yes; valid retained lists recover after classified speculative parsing failure. - Does this need documentation: No - Pre-submission status: Partially verified: unit/JNI/style checks pass; packaged native and live-service checks remain unverified. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests and description. - Human review: not stated.
|
PR approved by at least one committer and no changes requested. |
### Background The connector API version allows the frontend to distinguish compatible plugins. Native Iceberg encryption landed on master with API 37.0 while this branch already used 37.0 for per-partition row estimates. ### What problem does this PR solve? Issue Number: None Related PR: apache#70016, apache#70697 PR Type: Build/CI/Chore Problem Summary: Merge current master and assign the combined connector API version 38.0 in the parent POM and the plugin surface test. ### Details - Affected: Connector plugin API version declaration and frozen surface test. - Developer and release impact: External connector plugins using the new partition estimate API need to target version 38.0. - License and third-party: None. ### Testing Checkstyle passed on all 13 Java files in the PR. The connector import and metadata funnel checks passed. The frozen plugin baseline retains all 12 upstream additions and all eight PR additions. The metadata baseline and original PR file list were verified. The PR diff passed git diff --check. ### Release note Connector plugins supporting the partition row estimates target API 38.0. ### Check List (For Author) - Behavior changed: Yes, the plugin API version advances. - Does this need documentation: No. - Pre-submission status: Partially verified. Local compilation was skipped at the author's request. Runtime verification is delegated to CI. ### AI Disclosure - Tool: OpenAI Codex - Generated: Merge conflict resolution and static verification - Human review: Pending
### Background Iceberg rewrite groups carry the resolved writer target in their session variables. The connector plugin API pins each distinct public surface to a major version. ### What problem does this PR solve? Issue Number: None Related PR: apache#70510 (rewrite group writer targets), apache#70697 (native encryption) PR Type: Build/CI/Chore Problem Summary: The native encryption API and the independent rewrite group changes both introduced connector API 37. Merge current master and advance the combined API to 38. ### Details The connector parent POM and frozen version assertion now agree on 38.0. The frozen interface baseline contains the six rewrite group entries and the twelve entries introduced on master for native encryption. Connector plugins built for the combined API declare version 38. Third-party dependencies and licenses are unchanged. ### Release note None ### Testing Verified the two-parent plugin interface union, the metadata baseline, and the complete PR file list. FE Checkstyle, connector import checks, the FE metadata access check, and git diff --check passed. The remote pipeline will run the build and tests. ### Check List (For Author) - Behavior changed: The combined connector plugin API version advances to 38.0. - Does this need documentation: No. - Pre-submission status: Static checks passed. Remote build and tests pending. ### AI Disclosure - Tool: Codex. - Generated: Merge resolution, static verification and commit message. - Human review: Pending.
Background
Iceberg v3 can encrypt manifests and give each Parquet data/delete file an independent key. Doris plans those files in FE and reads them in BE, so metadata support and an encryption-enabled Arrow build alone cannot establish a safe native execution path. The read contract describes the supported combinations.
What problem does this PR solve?
Issue Number: close #70715
Related PR: #70675 (merged statement/cache prerequisite), #70693 (merged private RPC prerequisite)
PR Type: Feature
Problem Summary:
Operators need a supported execution path for standard encrypted HMS v3 tables, including independently encrypted delete files. Verify native reader availability and authenticated private RPC, preserve binary keys/AAD, and recheck recipients before keys leave FE. The prerequisites are now merged; this diff contains the integration, independent write/cache admission guards, and their tests and fixtures. Encrypted reads remain disabled by default, and enabling them grants neither encrypted writes nor encrypted SQL result caching.
Details
Change map: 71 files: 810 changed production lines, 2,113 test/fixture lines, 183 expected-result lines, 436 documentation lines and 4 build lines. Production connects reader availability, protected fragment/split dispatch and per-file native formats; independent write/cache fences preserve authorization boundaries. Admission shares the selected external-scan candidate membership, and send-time validation binds capability to the registered RPC recipient. Merged prerequisite implementations and per-split version negotiation are excluded.
Scope: HMS v3, the SDK standard encryption manager and native Parquet AES_GCM_V1 data/position-delete/equality-delete reads. REST native encrypted execution, encrypted JNI metadata tables, encrypted ORC/Puffin deletion vectors, encrypted writes and encrypted V3 lazy SQL execution remain unsupported.
Design: A boolean
supports_native_file_encryptionheartbeat reports native PME reader and protected private RPC availability. Admission and default external scans share one selected candidate membership per statement planning attempt and compute group, using the existing planning-only statement scope. The untagged root/admin group uses a stable selection domain because it has no addressable ID. A shared policy alone cannot stabilize randomized candidate subsets. Check targets before serialization; before sending fragment keys, re-resolve the bound BE ID, match its registered BRPC address to the bound RPC target, and verify current capability. Marker checks follow executed file nodes; actual shared keys are always validated and protected. Lazy sources retain their original BRPC address and require the same current backend registration before returning split keys; dropping, replacing or moving a recipient stops the source. Existing load, serial and delete restrictions govern PME coalescing and row-group refinement. V3 selects synchronous planning before any batch-estimation metadata COUNT probe. A fresh runtime timestamp bounds the heartbeat proof, and missing capability remains a planning refusal without blacklisting healthy backends. [Feature][Iceberg] Enable negotiated native encrypted table reads #70715 records the proposal and acceptance criteria; a completed design discussion is not claimed.Usage: Configure authenticated private RPC on every participating FE/BE, set the following in every FE's Iceberg plugin
iceberg.conf, then restart the FEs. Use an HMS catalog configured with the supported standard encryption manager and KMS. See the private RPC configuration, read contract and reference fixture for the complete deployment setup.enable_encryption_read=trueDefault behavior:
enable_encryption_read=false; this is deployment configuration requiring an FE restart, not a session variable or catalog property. Plaintext reads retain existing paths. Encrypted writes are independently refused, and encrypted tables reject SQL-cache admission/replay because stable metadata cannot attest current KMS authorization.Compatibility: Connector SPI 37.0 adds
supportsNativeFileEncryption(): booleanover master's 36.0 while retaining its file-format SPI; matching FE, BE and plugins are deployed together with consistent private TLS. The new optional heartbeat boolean uses field 12, checked against master and branches 4.2/4.1/4.0/3.1. The split request retains its original fields. Runtime reader and authenticated-transport checks still apply; custom providers default to unavailable. Rolling upgrades and downgrade support are outside scope. The version inside each file-key descriptor remains a data-format discriminator.Behavior change: Verified, explicitly enabled HMS deployments can execute supported encrypted reads. Unsupported readers/transports fail with classified errors; concurrent adoption of encryption cannot admit plaintext native writes. Default external scans in one statement/group now share candidate membership, including partial compute/mixed subsets, while each scan retains its own split-assignment strategy and weights. Preferred-location and explicitly supplied policies remain independent.
Persistence and failure handling: File keys remain query-scoped and are excluded from durable caches and diagnostics. Reader leases survive cancellation until actual I/O exits. Existing transaction CAS and pinned metadata/schema checks remain in place. Failed/missing heartbeat proofs revoke capability without shortening the configured backend liveness grace.
Security and privileges: Existing catalog CREATE/ALTER and table SELECT checks apply; no privilege is added. User-configured KMS/S3 endpoints remain outbound SSRF surfaces subject to existing policy. Both fragment gRPC and split Thrift must establish authenticated encryption before key serialization. Fixtures use synthetic data and credentials. Deterministic memory zeroization and protected crash dumps are not promised.
Testing
02913a2235. Both sides had independently allocated SPI 36.0; the combined surface now uses 37.0. Fresh module selection passed 502 tests across 48 suites, zero failures/errors/skips: all 37 SPI test classes and related Iceberg encryption, write, sorting, worker and metadata-delete suites. Official FE selection passed 238 tests in 16 suites, zero failures/errors/skips, including host loading, file-format TVFs, heartbeat, RPC/TLS, selection and split lifecycle.libgoogle_cloud_cpp_oauth2.a.enableIcebergTest=true,enableIcebergEncryptionNativeRead=trueand a prepared deployment.Notes for Reviewers
Only membership is memoized; capabilities remain live. The planning scope coalesces selection and releases the list at planning completion/reset. Admission creates no hash ring. This also shares membership across plaintext default scans; no runtime distribution benchmark is claimed.
Fresh FE Checkstyle, clang-format 16.0.6, header hygiene and scoped clang-tidy pass. All eight PR C++ files are byte-identical to the pre-rebase head. A full native build and enabled encrypted SQL were not rerun.
Release note
Adds opt-in native reads for supported standard-encrypted HMS Iceberg v3 Parquet tables, requiring verified backend capabilities and authenticated private RPC. Encrypted writes remain unsupported.
Check List (For Author)
AI Disclosure