Repository navigation
Domain APIs and Doobie related fix for Postgres 16 - #2931
Merged
Merged
Conversation
/obp/dynamic-endpoint/banks/BANK_ID/dynamic-resource-doc/REQUEST_URL, with SYS for the system space, matching the v7.0.0 Dynamic Entity URLs. A verb and URL are now unique within a space, not across every space, so a system doc and docs at two banks may each answer GET /names under their own /banks/X/. The index on (RequestUrl, RequestVerb) becomes (BankId, RequestUrl, RequestVerb), and the check before create looks in the doc's own space only (a bank-level doc whose URL another space used used to pass that check and then fail on the index with a database error). A system level doc now stores SYS as its bank id instead of NULL, as a Dynamic Entity does; NULLs never equal each other in a unique index on Postgres or H2, so with NULL the new index could not have kept two system docs off one URL. In memory the system space is still None, so the v4.0.0 responses for a system doc no longer carry "bank_id": null. The step Boot runs on every start (prepareDynamicEntitySpaceScopedIndexes, not an opt-in migration script) moves existing NULL bank ids to SYS and drops the old index before Schemifier creates the new one. The URL without a space still works while only one space has a doc there; when more than one does it answers 409 with OBP-40067 naming the spaces to call it under, and records an API Metric. A call to the URL without a space records the URL with its space. Tests: DynamicResourceDocSpaceUrlTest (system, bank A and bank B docs at one URL each answer under their space and the URL without a space gives 409; per space uniqueness; a system doc is stored as SYS, reads back as the system space and a second system doc at the same verb and URL is refused by the database.
|
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.



No description provided.