Add indexes to BROKER_LINK table

Closes #45009

Signed-off-by: Ryan Emerson <remerson@ibm.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
This commit is contained in:
Ryan Emerson 2026-01-09 16:09:40 +00:00 committed by GitHub
parent 1aa1621eaa
commit f8b114bdd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,35 @@
// ------------------------ Breaking changes ------------------------ //
== Breaking changes
Breaking changes are identified as those that might require changes for existing users to their configurations or applications.
In minor or patch releases, {project_name} will only introduce breaking changes to fix bugs.
=== <TODO>
// ------------------------ Notable changes ------------------------ //
== Notable changes
Notable changes may include internal behavior changes that prevent common misconfigurations, bugs that are fixed, or changes to simplify running {project_name}.
It also lists significant changes to internal APIs.
=== New database indexes on the `BROKER_LINK` table
The `BROKER_LINK` table now contains two additional indexes `IDX_BROKER_LINK_USER_ID` and `IDX_BROKER_LINK_IDENTITY_PROVIDER` to improve performance.
If the table contains more than 300000 entries, {project_name} will skip the index creation by default during the automatic schema migration and instead log the SQL statement on the console during migration to be applied manually after {project_name}'s startup.
See the link:{upgradingguide_link}[{upgradingguide_name}] for details on how to configure a different limit.
// ------------------------ Deprecated features ------------------------ //
== Deprecated features
The following sections provide details on deprecated features.
=== <TODO>
// ------------------------ Removed features ------------------------ //
== Removed features
The following features have been removed from this release.
=== <TODO>

View File

@ -1,6 +1,10 @@
[[migration-changes]]
== Migration Changes
=== Migrating to 26.6.0
include::changes-26_6_0.adoc[leveloffset=2]
=== Migrating to 26.5.0
include::changes-26_5_0.adoc[leveloffset=2]

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ * Copyright 2025 Red Hat, Inc. and/or its affiliates
~ * and other contributors as indicated by the @author tags.
~ *
~ * Licensed under the Apache License, Version 2.0 (the "License");
~ * you may not use this file except in compliance with the License.
~ * You may obtain a copy of the License at
~ *
~ * http://www.apache.org/licenses/LICENSE-2.0
~ *
~ * Unless required by applicable law or agreed to in writing, software
~ * distributed under the License is distributed on an "AS IS" BASIS,
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ * See the License for the specific language governing permissions and
~ * limitations under the License.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet author="keycloak" id="26.6.0-45009-broker-link-user-id">
<preConditions onSqlOutput="TEST" onFail="MARK_RAN">
<not>
<indexExists tableName="BROKER_LINK" indexName="IDX_BROKER_LINK_USER_ID" />
</not>
</preConditions>
<createIndex tableName="BROKER_LINK" indexName="IDX_BROKER_LINK_USER_ID">
<column name="USER_ID" type="VARCHAR(255)" />
</createIndex>
</changeSet>
<changeSet author="keycloak" id="26.6.0-45009-broker-link-identity-provider">
<preConditions onSqlOutput="TEST" onFail="MARK_RAN">
<not>
<indexExists tableName="BROKER_LINK" indexName="IDX_BROKER_LINK_IDENTITY_PROVIDER" />
</not>
</preConditions>
<createIndex tableName="BROKER_LINK" indexName="IDX_BROKER_LINK_IDENTITY_PROVIDER">
<column name="REALM_ID" type="VARCHAR(36)" />
<column name="IDENTITY_PROVIDER" type="VARCHAR(255)" />
<column name="BROKER_USER_ID" type="VARCHAR(255)" />
</createIndex>
</changeSet>
</databaseChangeLog>

View File

@ -90,5 +90,6 @@
<include file="META-INF/jpa-changelog-26.3.0.xml"/>
<include file="META-INF/jpa-changelog-26.4.0.xml"/>
<include file="META-INF/jpa-changelog-26.5.0.xml"/>
<include file="META-INF/jpa-changelog-26.6.0.xml"/>
</databaseChangeLog>