sririshindra opened a new pull request, #4981: URL: https://github.com/apache/polaris/pull/4981
<!-- ๐ Describe what changes you're proposing, especially breaking or user-facing changes. ๐ See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more. --> Events that are not scoped to a catalog (principal, principal-role, policy, credential, transaction, config, rate-limiting, etc.) previously persisted the magic string `"__realm__"` in the `events.catalog_id` column because that column was `NOT NULL`. This replaces the sentinel with a proper SQL `NULL`. ## Changes - Removed the `REALM_SCOPED` constant from `EventEntity`; `catalogId` is now `@Nullable` end to end (entity, listener, `ModelEvent`). - Added relational-JDBC schema v5 for Postgres/H2/CockroachDB with a nullable `events.catalog_id`, and bumped `DatabaseType.getLatestSchemaVersion()` to 5. - Kept a narrow, version-gated compatibility shim in `JdbcBasePersistenceImpl.writeEvents` that still writes the legacy `"__realm__"` sentinel when `schemaVersion < 5` (Polaris has no automated schema migrations), and coalesces the sentinel back to `null` on read in `ModelEvent.fromResultSet`. - Updated `CHANGELOG.md` and the relational-jdbc metastore docs with the one-time operator migration SQL for existing v3/v4 deployments. ## Checklist - [x] ๐ก๏ธ Don't disclose security issues! (contact [email protected]) - [x] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes #4674 - [x] ๐งช Added/updated tests with good coverage, or manually tested (and explained how) - [x] ๐ก Added comments for complex logic - [x] ๐งพ Updated `CHANGELOG.md` (if needed) - [x] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed) -- 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]
