Repository navigation
Order JDBC principal session rows by primary key - #4069
Open
AlexanderReaper7 wants to merge 1 commit into
Open
AlexanderReaper7 wants to merge 1 commit into
AlexanderReaper7 wants to merge 1 commit into
Conversation
Keep each session's attribute rows adjacent for SessionResultSetExtractor. Add a PostgreSQL regression that compares principal lookups with findById after attributes are added in later saves. Closes spring-projectsgh-3452 Signed-off-by: Alexander Öberg <stativetroller7@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default principal-name query can return a session's attribute rows in separate groups.
SessionResultSetExtractorcombines only adjacent rows, so a later group creates a partial session that replaces the earlier one in the result map.Add
ORDER BY S.PRIMARY_IDto keep every session's rows adjacent. A PostgreSQL integration test saves 120 sessions, adds an attribute to every third session in a later save, runsANALYZE, and checks every listed session's attribute names and values againstfindById. Without the ordering, the regression fails because a listed session contains onlylaterinstead of all five stored attributes. With the ordering, it passes.Closes #3452
Targets
3.5.x, the oldest supported maintenance branch listed in the open milestones, as required by CONTRIBUTING.adoc.Validation ran in Docker with Temurin 17.0.20.1 and the repository's PostgreSQL 14.5 container:
checkstyleMain,checkstyleIntegrationTestandcheckFormatpass.Other database integration suites and the full multi-module build were not run.