Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-161

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • 11.0.1
    • 11.0.2
    • Multi-node K8s cluster backed by vSphere
      Dedicated and separate Postgres 10 database hosts for Okapi and Folio modules
      Dockerized Okapi v3.1.2

    • ACQ Sprint 92
    • 0
    • Core: Platform
    • Q2 2020
    • TAMU

    Description

      Upgraded release of mod-orders-storage from v10.0.2 to v11.0.1 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-orders-storage-11.0.1 /_/tenant failed with 400: [ " DO $do$\n BEGIN\n PERFORM rmb_internal_index(\n 'po_line', 'po_line_fundDistribution_code_idx_gin', 'ADD',\n 'CREATE INDEX IF NOT EXISTS po_line_fundDistribution_code_idx_gin ON diku_mod_orders_storage.po_line USING GIN '\n || $rmb$((lower(f_unaccent(jsonb->'fundDistribution'->>'code'))) public.gin_trgm_ops)$rmb$\n );\n END $do$;" ]
      

      mod-orders-storage logs:

      2020-07-06T18:45:19,720 ERROR [vert.x-worker-thread-0 ] PostgresClient ERROR: operator class "public.gin_trgm_ops" does not exist for access method "gin"
      
      Where: SQL statement "CREATE INDEX IF NOT EXISTS po_line_fundDistribution_code_idx_gin ON diku_mod_orders_storage.po_line USING GIN ((lower(f_unaccent(jsonb->'fundDistribution'->>'code'))) public.gin_trgm_ops)"
      
      PL/pgSQL function rmb_internal_index(text,text,text,text) line 22 at EXECUTE
      
      SQL statement "SELECT rmb_internal_index(
      
      'po_line', 'po_line_fundDistribution_code_idx_gin', 'ADD',
      
      'CREATE INDEX IF NOT EXISTS po_line_fundDistribution_code_idx_gin ON diku_mod_orders_storage.po_line USING GIN '
      
      || $rmb$((lower(f_unaccent(jsonb->'fundDistribution'->>'code'))) 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 po_line_fundDistribution_code_idx_gin ON diku_mod_orders_storage.po_line USING GIN ((lower(f_unaccent(jsonb->'fundDistribution'->>'code'))) public.gin_trgm_ops)"
      
      PL/pgSQL function rmb_internal_index(text,text,text,text) line 22 at EXECUTE
      
      SQL statement "SELECT rmb_internal_index(
      
      'po_line', 'po_line_fundDistribution_code_idx_gin', 'ADD',
      
      'CREATE INDEX IF NOT EXISTS po_line_fundDistribution_code_idx_gin ON diku_mod_orders_storage.po_line USING GIN '
      
      || $rmb$((lower(f_unaccent(jsonb->'fundDistribution'->>'code'))) 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-orders-storage-fat.jar:?]
      
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2023) ~[mod-orders-storage-fat.jar:?]
      
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:217) ~[mod-orders-storage-fat.jar:?]
      
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:421) ~[mod-orders-storage-fat.jar:?]
      
      at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:318) ~[mod-orders-storage-fat.jar:?]
      
      at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:294) ~[mod-orders-storage-fat.jar:?]
      
      at org.folio.rest.persist.PostgresClient.lambda$80(PostgresClient.java:3496) ~[mod-orders-storage-fat.jar:?]
      
      at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313) ~[mod-orders-storage-fat.jar:?]
      
      at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) ~[mod-orders-storage-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-orders-storage-fat.jar:?]
      
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
      
      2020-07-06T18:45:19,725 ERROR [vert.x-worker-thread-0 ] PostgresClient Rollback for: 1231774605
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                jroot Jason Root
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases