Details
-
Bug
-
Status: Closed (View Workflow)
-
P1
-
Resolution: Done
-
None
-
CP: Sprint 152
-
5
-
Core: Platform
-
Nolana (R3 2022) Bug Fix
-
Implementation coding issue
Description
Steps to Reproduce:
- Set environment variable DB_MAXSHAREDPOOLSIZE=4
- Set other environment variables as needed (PostgreSQL and Kafka)
- Start mod-inventory-storage-25.0.1: java -jar target/mod-inventory-storage-fat.jar
- Enable it for tenant diku with reference data using POST http://localhost:8081/_/tenant
- Enable it for tenant t2 with reference data using POST http://localhost:8081/_/tenant
- Disable it with purge option for tenant t2 using POST http://localhost:8081/_/tenant
- For tenant diku call GET /instance-formats?query=cql.allRecords=1%20sortby%20name
Expected Results:
GET succeeds
Actual Results:
GET fails:
09:43:49 [] [diku] [] [mod_inventory_storage] ERROR PostgresClient queryAndAnalyze: ERROR: function f_unaccent(text) does not exist (42883) - SELECT * FROM diku_mod_inventory_storage.instance_format WHERE true ORDER BY left(lower(f_unaccent(instance_format.jsonb->>'name')),600), lower(f_unaccent(instance_format.jsonb->>'name')) LIMIT 10 OFFSET 0 io.vertx.pgclient.PgException: ERROR: function f_unaccent(text) does not exist (42883)
Additional Information:
PostgresClient calls "SET ROLE" but doesn't call "SET SCHEMA":
https://github.com/folio-org/raml-module-builder/blob/v35.0.0/domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java#L3497-L3516
"SET SCHEMA" is needed to set the search path.
When enabling tenant t2 reference data is loaded for schema t2_mod_inventory_storage using database connections that are kept open in idle state and re-used for the GET request.
Workaround:
After disabling/purging a tenant restart all (at least all RMB based) containers/pods.
TestRail: Results
Attachments
Issue Links
- blocks
-
FOLIO-3630 "f_unaccent(text)" function not found in reference environments
-
- Closed
-
- relates to
-
CIRCSTORE-382 RMB 35.0.4, Vert.x 4.3.5
-
- Closed
-
-
RMB-664 PoC: implement one connection pool for all tenants
-
- Closed
-