Upgrade issue between Q1 and Q2: "public.gin_trgm_ops" does not exist

Description

Upgraded release of mod-configuration from v5.3.0 to v5.4.0 for an existing Diku tenant with data.

The request sent to Okapi was this, with reference and sample data set to true:

curl -w '\n' -D - -X POST -H "Content-type: application/json" \ -d @upgrade.json \ $OKAPI_URL/_/proxy/tenants/$TENANT_ID/install?deploy=false\&preRelease=false\&tenantParameters=loadSample%3Dtrue%2CloadReference%3Dtrue

Also tried, after rolling back the DB instances, with sample and reference data set to false, with the same error.

Okapi returned the following error during the tenant API call:

POST request for mod-configuration-5.4.0 /_/tenant failed with 400: [ " DO $do$\n BEGIN\n PERFORM rmb_internal_index(\n 'config_data', 'config_data_value_idx_gin', 'ADD',\n 'CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON diku_mod_configuration.config_data USING GIN '\n || $rmb$((lower(f_unaccent(jsonb->>'value'))) public.gin_trgm_ops)$rmb$\n );\n END $do$;" ]

mod-configuration logs:

06 Jul 2020 19:59:57:182 ERROR PostgresClient [5825469eqId] ERROR: operator class "public.gin_trgm_ops" does not exist for access method "gin" Where: SQL statement "CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON diku_mod_configuration.config_data USING GIN ((lower(f_unaccent(jsonb->>'value'))) public.gin_trgm_ops)" PL/pgSQL function rmb_internal_index(text,text,text,text) line 22 at EXECUTE SQL statement "SELECT rmb_internal_index( 'config_data', 'config_data_value_idx_gin', 'ADD', 'CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON diku_mod_configuration.config_data USING GIN ' || $rmb$((lower(f_unaccent(jsonb->>'value'))) public.gin_trgm_ops)$rmb$ )" PL/pgSQL function inline_code_block line 3 at PERFORM org.postgresql.util.PSQLException: ERROR: operator class "public.gin_trgm_ops" does not exist for access method "gin" Where: SQL statement "CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON diku_mod_configuration.config_data USING GIN ((lower(f_unaccent(jsonb->>'value'))) public.gin_trgm_ops)" PL/pgSQL function rmb_internal_index(text,text,text,text) line 22 at EXECUTE SQL statement "SELECT rmb_internal_index( 'config_data', 'config_data_value_idx_gin', 'ADD', 'CREATE INDEX IF NOT EXISTS config_data_value_idx_gin ON diku_mod_configuration.config_data USING GIN ' || $rmb$((lower(f_unaccent(jsonb->>'value'))) public.gin_trgm_ops)$rmb$ )" PL/pgSQL function inline_code_block line 3 at PERFORM at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2310) ~[mod-configuration-server-fat.jar:?] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2023) ~[mod-configuration-server-fat.jar:?] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:217) ~[mod-configuration-server-fat.jar:?] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:421) ~[mod-configuration-server-fat.jar:?] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:318) ~[mod-configuration-server-fat.jar:?] at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:294) ~[mod-configuration-server-fat.jar:?] at org.folio.rest.persist.PostgresClient.lambda$80(PostgresClient.java:3496) ~[mod-configuration-server-fat.jar:?] at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313) ~[mod-configuration-server-fat.jar:?] at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) ~[mod-configuration-server-fat.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [mod-configuration-server-fat.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] 06 Jul 2020 19:59:57:187 ERROR PostgresClient [5825474eqId] Rollback for: 1124490533

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Julian Ladisch July 16, 2020 at 10:09 AM

Closing as done because Jason has successfully tested this and the mod-pubsub issue has a separate Jira.

jroot July 14, 2020 at 7:21 PM

However, mod-pubsub is preventing a full system upgrade. See Slack convo here: https://folio-project.slack.com/archives/GEJ46791U/p1594752023294700

jroot July 14, 2020 at 7:18 PM

I was able to successfully upgrade this module now from Q1 to Q2 with mod-cal and mod-orders RMB updates.

Jakub Skoczen July 14, 2020 at 1:05 PM

When the PR is merged please make the configuration release for Q2 2020.

jroot July 8, 2020 at 3:41 PM

Please see the discussions here, in the Comments section: https://folio-org.atlassian.net/browse/MODORDSTOR-161

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Core: Platform

Fix versions

Release

Q2 2020

Affected Institution

TAMU

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created July 8, 2020 at 2:41 PM
Updated October 11, 2022 at 12:31 PM
Resolved July 14, 2020 at 6:02 PM
TestRail: Cases
TestRail: Runs

Flag notifications