mikebridge opened a new pull request, #44835: URL: https://github.com/apache/superset/pull/44835
### SUMMARY Second PR in the stack replacing #44808 (semantic-view metadata refresh). **It's stacked on #44834**, so until that merges this diff includes #44834's commit. Please review only the top commit, `77c80d62`. It's **default-off**, and there's no user-facing action yet; the refresh command/API and UI come in the next two PRs. This is the host side of the SDK contract: - **Scoped shared catalog snapshot:** Redis publication and invalidation per connection scope, with a finite TTL and a writer fence, so a late or stale writer can't overwrite a newer publication. - **Rotating cache identity:** every successful publication rotates the snapshot's cache token, including when discovery content is unchanged. - **Cache keys follow metadata:** the captured token is part of **both the compatibility and the query-result cache keys**. This fixes the issue raised on #44808: a same-name metric whose definition changes can no longer reuse a pre-sync result. - **Bounded cold reads:** readers that find no valid snapshot while another worker is refreshing wait and re-read within the request's deadline, instead of failing. - **One request budget:** a single deadline is shared across a request's store calls and the provider's upstream fetches. - **Independent compatibility invalidation**, plus read-only cache timing inspection (created, observed, expiry). ### TESTING INSTRUCTIONS - `pytest tests/unit_tests/semantic_layers/ tests/unit_tests/coordination/test_deadline_backend.py`: 808 passed locally, with 100% line and branch coverage on the semantic-layer package. - Real-Redis tests are env-gated (9 cases: two-process alternating reads, stale-writer fence, tenant scopes, owner-failure outcomes, TTL replacement). They passed locally against an isolated Redis. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: default-off configuration (see `docs/developer_docs/semantic-metadata-store.md`) - [ ] Changes UI - [ ] Includes DB Migration - [x] Introduces new feature or API - [ ] Removes existing feature or API Draft because: 1. It stacks on #44834. 2. It will be updated to #44834's pending review follow-ups (explicit deadlines on the store and adapter methods). 3. Production enablement waits for the next PR, which authorizes the request context before any catalog acquisition. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
