Uploaded image for project: 'mod-inventory-storage'
  1. mod-inventory-storage
  2. MODINVSTOR-540

ERROR: prepared statement "XYZ" already exists

    XMLWordPrintable

Details

    • CP: sprint 92, CP: sprint 94, CP: sprint 95
    • 0
    • Core: Platform
    • Q2 2020 Hot Fix #2

    Description

      While running the check-in-check-out performance test against the Goldenrod FOLIO, or a subset of it, check-in (POST /circulation/check-in-by-barcode) and retrieving loans (GET /circulation/loans), the following errors were logged:

      ERROR: prepared statement "0001B01" already exists.

      Steps to reproduce
      We haven't been able replicate the sequence of steps that would trigger this error, but we are able to see this error frequently when running the aforementioned tests. When this happened, subsequent actions to check in, get loans, or view items are blown up. mod-inventory-storage had to be restarted for FOLIO to work again.

      Expected Results
      No errors

      Actual Results
      Errors such as: ERROR: prepared statement "0001B01" already exists.
      When nagivate to Inventory page, clicking on an item in the results list will result in a pop-up with the same error message

      Additional Information
      It looks like this issue is triggered under load generated by a load test.

      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: duration: 38.110 ms
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: BEGIN
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:ERROR: prepared statement "0001B01" already exists
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:STATEMENT: SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>'barcode')) LIKE lower(f_unaccent('56711401')) LIMIT 1 OFFSET 0
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: ROLLBACK
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: SELECT count_estimate('SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>''barcode'')) LIKE lower(f_unaccent(''68325097''))')
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: duration: 42.969 ms
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: BEGIN
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:ERROR: prepared statement "0001B02" already exists
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:STATEMENT: SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>'barcode')) LIKE lower(f_unaccent('68325097')) LIMIT 1 OFFSET 0
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: ROLLBACK
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: SELECT count_estimate('SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>''barcode'')) LIKE lower(f_unaccent(''093046192''))')
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: duration: 57.072 ms
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: BEGIN
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:ERROR: prepared statement "0001B03" already exists
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:STATEMENT: SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>'barcode')) LIKE lower(f_unaccent('093046192')) LIMIT 1 OFFSET 0
      2020-07-16 21:45:55 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: ROLLBACK
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: SELECT count_estimate('SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>''barcode'')) LIKE lower(f_unaccent(''099799387''))')
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: duration: 66.179 ms
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: BEGIN
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:ERROR: prepared statement "0001B04" already exists
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:STATEMENT: SELECT jsonb,id FROM fs09000000_mod_inventory_storage.item WHERE lower(f_unaccent(item.jsonb->>'barcode')) LIKE lower(f_unaccent('099799387')) LIMIT 1 OFFSET 0
      2020-07-16 21:45:56 UTC:10.23.10.240(33686):fs09000000_mod_inventory_storage@folio:[20641]:LOG: statement: ROLLBACK
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                mtraneis Martin Tran
                Votes:
                1 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases