Repository navigation
DeltaLake: replace cached snapshot on update() so kernel sees fresh creds - #107480
Conversation
…reds The fresh snapshot rebuilt inside `update()` already captures the C++ S3 client's current creds via `createBuilder` keep it instead of discarding it when the version matches, so the next kernel op runs on a freshly-credentialed engine and doesn't outlive the STS TTL.
|
Workflow [PR], commit [8c375a0] Summary: ❌
AI ReviewSummaryThis PR rebuilds cached PR Metadata
Findings💡 Nits
Tests
Final VerdictStatus: Minimum required action: add focused coverage for the |
Compare a SipHash128 of the C++ S3 client's current credentials against the one captured when kernel_snapshot_state was built, and rebuild only the kernel engine + snapshot + scan when they differ. Schema, stats, and the snapshot LRU cache are preserved across rebuilds.
The previous wording change broke test_database_delta::test_complex_table_schema's contains_in_log assertion. Split the init and rebuild branches so the init path emits the original message verbatim.
Vended catalog credentials (Glue / Unity / REST) are static in the C++
S3 client until `credentials_refresh_callback` fires, but delta-kernel's
Rust object_store bypasses the ClickHouse error handlers that normally
invoke it. So an expired vended session surfaces as `DELTA_KERNEL_ERROR`
with `ExpiredToken` and never recovers.
Plumb the callback through `IObjectStorage::tryRefreshCredentialsViaCallback`
to `IKernelHelper::refreshCredentials`, and add a one-shot retry on
stale-token errors at both kernel touchpoints:
- `TableSnapshot::initOrUpdateSnapshot` (engine build)
- `Iterator::scanDataFunc` (per-batch listing, guarded by
`total_data_files == 0` so we don't replay already-emitted paths)
|
Hi @ahmadov @kssenii — a couple of suggestions to make this PR easier for reviewers and the changelog reader. Description (currently
Ignore this if the current title/body is intentional. |
Cherry pick #107480 to 26.3: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
…e() so kernel sees fresh creds
Cherry pick #107480 to 26.4: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
…e() so kernel sees fresh creds
Cherry pick #107480 to 26.5: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
…e() so kernel sees fresh creds
Backport #107480 to 26.5: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
Backport #107480 to 26.4: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
Backport #107480 to 26.3: DeltaLake: replace cached snapshot on update() so kernel sees fresh creds
Closes https://github.com/ClickHouse/support-escalation/issues/7739.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The fresh snapshot rebuilt inside
update()already captures the C++ S3 client's current creds viacreateBuilderkeep it instead of discarding it when the version matches, so the next kernel op runs on a freshly-credentialed engine and doesn't outlive the STS TTL.Note that besides DeltaLake, this also changes
AwsAuthSTSAssumeRoleCredentialsProvider::GetAWSCredentials/Reloadto honor and clearSetNeedRefresh()(matching the Web-Identity and SSO providers), which affects any S3 access using STS assume-role on auth retries. Describe the newIObjectStorage::tryRefreshCredentialsViaCallbackvirtual and the credentials-fingerprint rebuild path inTableSnapshot.Version info
26.6.1.1101(included in26.6and later)26.5.4.19,26.4.5.74,26.3.16.15