-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forbedre ytelse på identpool (#3647)
* Add repository methods for counting and finding Idents Introduced new methods in `IdentRepository` to count and find `Ident` entities based on various parameters including `Rekvireringsstatus`, `Identtype`, `Syntetisk`, `Kjoenn`, and date range. Updated `DatabaseService` to utilize these new repository methods, enhancing the service's querying capabilities. * Refactor Ident fetching logic and add H2 support #deploy-testnav-ident-pool Revised methods for fetching and counting Idents in `DatabaseService` to improve query efficiency. Enabled H2 database console for local development and included sample data for testing. Adjusted security configurations to accommodate new endpoints and data sources. * Update tests to handle potential insufficient identifiers #deploy-testnav-ident-pool Modified the tests to ensure that identifier generation does not throw an exception when the desired amount of identifiers cannot be generated. Instead, the tests now assert that the resulting set size is less than the requested amount. * Configure HikariCP datasource properties #deploy-testnav-ident-pool Added HikariCP datasource configuration with minimum idle connections set to 10 and maximum pool size set to 100 to improve database connection management. This change is intended to optimize performance and resource utilization. * Create index for syntetisk in personidentifikator #deploy-testnav-ident-pool This commit adds a new SQL migration script (V1.3.1__IndeksSyntetisk.sql) that creates an index for the 'syntetisk' column in the 'personidentifikator' table. This change is aimed at improving query performance involving the 'syntetisk' column. * Update PostgreSQL version in config to 16 #deploy-testnav-ident-pool Changed the PostgreSQL version from 15 to 16 in the configuration file. This update ensures compatibility with the latest features and improvements provided by PostgreSQL 16. * Increase CPU request limit from 200m to 600m in config.yml #deploy-testnav-ident-pool Adjusting the CPU request limit ensures that the application has sufficient resources to handle increased load. This change aims to prevent potential performance issues under higher demand. * Add new records and tweak logging in PoolService #deploy-testnav-ident-pool Inserted additional `personidentifikator` entries to the H2 database initialization script and adjusted the sequence restart point. Enhanced logging in `PoolService` to include the count of generated identifiers and increased the number of attempts for synthetic identifier generation. * Refactor variable names in PoolService Changed variable names to improve code readability and consistency in the `allocateIdenter` method. Replaced `List<Ident>` with `var` keyword for type inference. These changes should help streamline future modifications and maintenance.
- Loading branch information
Showing
12 changed files
with
214 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
34 changes: 12 additions & 22 deletions
34
apps/testnav-ident-pool/src/main/resources/application-local.yml
This file contains 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
7 changes: 6 additions & 1 deletion
7
apps/testnav-ident-pool/src/main/resources/application-prod.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
|
||
spring: | ||
oauth2: | ||
tokenx: | ||
issuer-uri: ${TOKEN_X_ISSUER} | ||
jwk-set-uri: ${TOKEN_X_JWKS_URI} | ||
accepted-audience: ${TOKEN_X_CLIENT_ID} | ||
datasource: | ||
url: jdbc:postgresql://${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_HOST}:${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_PORT}/${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_DATABASE}?user=${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_USERNAME}&password=${NAIS_DATABASE_TESTNAV_IDENTPOOL_TESTNAV_IDENTPOOL_PASSWORD} | ||
driverClassName: org.postgresql.Driver | ||
hikari: | ||
maximum-pool-size: 3 | ||
minimum-idle: 1 | ||
minimum-idle: 1 |
Oops, something went wrong.