Uploaded image for project: 'mod-inventory'
  1. mod-inventory
  2. MODINV-212

Searches returning more than 50 instances hang

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      Core: F - Sprint 84
    • Development Team:
      Prokopovych

      Description

      mod-inventory hangs when processing an Instance query resulting in more than 50 Instances being returned from Inventory storage.

      The bug seems related to recent optimizations of the handling of instance relationships (ie preceding/succeeding titles) in mod-inventory. In that process, a query for relationships is sent to Inventory storage, OR'ing instance IDs; the more instances in the original result, the longer the query string for relationships - resulting in a "414 URI To Long" at around 50 instances.

      The bug was introduced with this commit, I believe: https://github.com/folio-org/mod-inventory/commit/5933b0fff96e4238a1e98eafba540e9a61a59706

      This query works:

      curl -v -H "X-Okapi-Tenant: $tenant" -H "X-Okapi-Token: $token"  $protocol://$host/instance-storage/instance-relationships?query=%28subInstanceId==%2804804fce-a79d-4981-8bee-558c6bab04d7+or+0411aba2-9c13-418e-8ae9-008d9327ab90+or+54296789-8ab4-42d4-9fdc-1fe7eff83009+or+b500db33-6f19-47dd-89cc-38f122062690+or+0bd033eb-627a-497f-afe4-b319c9fcf263+or+233d46cb-a9f0-49e7-b2e7-0d4c9e555216+or+bc920e97-43ef-452e-9fcf-369fc7300e52+or+840160e1-c936-465b-9960-5dbc3b5e6543+or+987caf28-bef8-4855-bb68-c41e4edbe54c+or+65d6a0c4-064c-49e4-807c-db5de4b29b4a+or+96805a82-4b2b-4149-b289-42b73c125036+or+ab5183d3-4b3f-4a95-87c2-e96eb4c4bb4c+or+422d5a84-b044-4d3a-ad4b-9661d507a8b3+or+4176ee62-7cbf-49a9-9bb7-c3bfc678993e+or+af911207-3723-4b92-b7ac-2f4a23430f02+or+168ba00c-1cc0-43fd-9bf9-c5f6c95d7bb0+or+abba1ec9-c4a4-4479-82e7-870bca13cb59+or+aef9d97d-975a-4154-ab3a-c6188095ce7c+or+1d3c6ac7-6c80-4d01-b316-77ce25cdb500+or+727029a3-6bf4-4578-af8d-2c6769d79791+or+a2bd3888-f019-4aef-950f-171867ed874c+or+bfb3c5af-703f-42b7-8813-3ed01cfbab54+or+b516b243-2118-44de-8e64-0d0d71e36652+or+8042b362-3605-4117-bbb8-56faebc75868+or+60ef62ed-2a56-4941-9e3e-44420a8dfa1f+or+d3df9d05-434e-4f33-9baa-dc3496137aa3+or+586b00c5-5b8d-4072-b672-1e842e9b1718+or+58a9fef2-7ff9-416e-8ffa-6af046f3d95e+or+486431e4-7e2d-4407-920e-ce3dd9f8263b+or+2c409b92-b94c-45d3-a3da-32e995a7bcb1+or+2d55a4e0-0c57-47c7-a6af-71562beda363+or+8c4b3513-49c6-4320-adb2-84d565318e29+or+11ac1305-317c-4680-9ce9-86fb59641024+or+42e3d002-7fe7-470c-bf51-00a2d03b2520+or+b4d0e218-21ea-42e4-83be-4d44619c16d0+or+30b47efa-861d-4c51-b426-932894428be2+or+ccdc7e37-7e16-49cd-bef6-97a47aa84eac+or+4203589b-b041-45d5-952a-88d49ff5f941+or+54e6f4e7-b019-4c71-ab02-686c771fb495+or+4b800a57-6b62-4653-b99f-3333f795b444+or+05429df5-2df3-4197-823b-9670c29f3066+or+52a53b04-af3b-48e4-8888-56e828724d2b+or+37327ed2-3502-4535-95be-0ebf82c39522+or+7b3bdec3-0b29-4ac4-930d-35cfcdb8d4e2+or+8049440a-a96c-47aa-bdad-724a5f810284+or+409b41fd-85fb-4df6-84b1-fbc30d999727+or+119bb978-63a4-4d40-8050-62f819fa0fba+or+ab7b47ea-6b4a-4823-8b0e-2cf8da4edc6e+or+02046a54-33f2-4681-93a3-9255cf8e864a%29+or+superInstanceId==%2804804fce-a79d-4981-8bee-558c6bab04d7+or+0411aba2-9c13-418e-8ae9-008d9327ab90+or+54296789-8ab4-42d4-9fdc-1fe7eff83009+or+b500db33-6f19-47dd-89cc-38f122062690+or+0bd033eb-627a-497f-afe4-b319c9fcf263+or+233d46cb-a9f0-49e7-b2e7-0d4c9e555216+or+bc920e97-43ef-452e-9fcf-369fc7300e52+or+840160e1-c936-465b-9960-5dbc3b5e6543+or+987caf28-bef8-4855-bb68-c41e4edbe54c+or+65d6a0c4-064c-49e4-807c-db5de4b29b4a+or+96805a82-4b2b-4149-b289-42b73c125036+or+ab5183d3-4b3f-4a95-87c2-e96eb4c4bb4c+or+422d5a84-b044-4d3a-ad4b-9661d507a8b3+or+4176ee62-7cbf-49a9-9bb7-c3bfc678993e+or+af911207-3723-4b92-b7ac-2f4a23430f02+or+168ba00c-1cc0-43fd-9bf9-c5f6c95d7bb0+or+abba1ec9-c4a4-4479-82e7-870bca13cb59+or+aef9d97d-975a-4154-ab3a-c6188095ce7c+or+1d3c6ac7-6c80-4d01-b316-77ce25cdb500+or+727029a3-6bf4-4578-af8d-2c6769d79791+or+a2bd3888-f019-4aef-950f-171867ed874c+or+bfb3c5af-703f-42b7-8813-3ed01cfbab54+or+b516b243-2118-44de-8e64-0d0d71e36652+or+8042b362-3605-4117-bbb8-56faebc75868+or+60ef62ed-2a56-4941-9e3e-44420a8dfa1f+or+d3df9d05-434e-4f33-9baa-dc3496137aa3+or+586b00c5-5b8d-4072-b672-1e842e9b1718+or+58a9fef2-7ff9-416e-8ffa-6af046f3d95e+or+486431e4-7e2d-4407-920e-ce3dd9f8263b+or+2c409b92-b94c-45d3-a3da-32e995a7bcb1+or+2d55a4e0-0c57-47c7-a6af-71562beda363+or+8c4b3513-49c6-4320-adb2-84d565318e29+or+11ac1305-317c-4680-9ce9-86fb59641024+or+42e3d002-7fe7-470c-bf51-00a2d03b2520+or+b4d0e218-21ea-42e4-83be-4d44619c16d0+or+30b47efa-861d-4c51-b426-932894428be2+or+ccdc7e37-7e16-49cd-bef6-97a47aa84eac+or+4203589b-b041-45d5-952a-88d49ff5f941+or+54e6f4e7-b019-4c71-ab02-686c771fb495+or+4b800a57-6b62-4653-b99f-3333f795b444+or+05429df5-2df3-4197-823b-9670c29f3066+or+52a53b04-af3b-48e4-8888-56e828724d2b+or+37327ed2-3502-4535-95be-0ebf82c39522+or+7b3bdec3-0b29-4ac4-930d-35cfcdb8d4e2+or+8049440a-a96c-47aa-bdad-724a5f810284+or+409b41fd-85fb-4df6-84b1-fbc30d999727+or+119bb978-63a4-4d40-8050-62f819fa0fba+or+ab7b47ea-6b4a-4823-8b0e-2cf8da4edc6e+or+02046a54-33f2-4681-93a3-9255cf8e864a%29%29
      

      whereas this, looking up relationships for one additional instance id fails with a 414

      curl -v -H "X-Okapi-Tenant: $tenant" -H "X-Okapi-Token: $token"  $protocol://$host/instance-storage/instance-relationships?query=%28subInstanceId==%2804804fce-a79d-4981-8bee-558c6bab04d7+or+0411aba2-9c13-418e-8ae9-008d9327ab90+or+54296789-8ab4-42d4-9fdc-1fe7eff83009+or+b500db33-6f19-47dd-89cc-38f122062690+or+0bd033eb-627a-497f-afe4-b319c9fcf263+or+233d46cb-a9f0-49e7-b2e7-0d4c9e555216+or+bc920e97-43ef-452e-9fcf-369fc7300e52+or+840160e1-c936-465b-9960-5dbc3b5e6543+or+987caf28-bef8-4855-bb68-c41e4edbe54c+or+65d6a0c4-064c-49e4-807c-db5de4b29b4a+or+96805a82-4b2b-4149-b289-42b73c125036+or+ab5183d3-4b3f-4a95-87c2-e96eb4c4bb4c+or+422d5a84-b044-4d3a-ad4b-9661d507a8b3+or+4176ee62-7cbf-49a9-9bb7-c3bfc678993e+or+af911207-3723-4b92-b7ac-2f4a23430f02+or+168ba00c-1cc0-43fd-9bf9-c5f6c95d7bb0+or+abba1ec9-c4a4-4479-82e7-870bca13cb59+or+aef9d97d-975a-4154-ab3a-c6188095ce7c+or+1d3c6ac7-6c80-4d01-b316-77ce25cdb500+or+727029a3-6bf4-4578-af8d-2c6769d79791+or+a2bd3888-f019-4aef-950f-171867ed874c+or+bfb3c5af-703f-42b7-8813-3ed01cfbab54+or+b516b243-2118-44de-8e64-0d0d71e36652+or+8042b362-3605-4117-bbb8-56faebc75868+or+60ef62ed-2a56-4941-9e3e-44420a8dfa1f+or+d3df9d05-434e-4f33-9baa-dc3496137aa3+or+586b00c5-5b8d-4072-b672-1e842e9b1718+or+58a9fef2-7ff9-416e-8ffa-6af046f3d95e+or+486431e4-7e2d-4407-920e-ce3dd9f8263b+or+2c409b92-b94c-45d3-a3da-32e995a7bcb1+or+2d55a4e0-0c57-47c7-a6af-71562beda363+or+8c4b3513-49c6-4320-adb2-84d565318e29+or+11ac1305-317c-4680-9ce9-86fb59641024+or+42e3d002-7fe7-470c-bf51-00a2d03b2520+or+b4d0e218-21ea-42e4-83be-4d44619c16d0+or+30b47efa-861d-4c51-b426-932894428be2+or+ccdc7e37-7e16-49cd-bef6-97a47aa84eac+or+4203589b-b041-45d5-952a-88d49ff5f941+or+54e6f4e7-b019-4c71-ab02-686c771fb495+or+4b800a57-6b62-4653-b99f-3333f795b444+or+05429df5-2df3-4197-823b-9670c29f3066+or+52a53b04-af3b-48e4-8888-56e828724d2b+or+37327ed2-3502-4535-95be-0ebf82c39522+or+7b3bdec3-0b29-4ac4-930d-35cfcdb8d4e2+or+8049440a-a96c-47aa-bdad-724a5f810284+or+409b41fd-85fb-4df6-84b1-fbc30d999727+or+119bb978-63a4-4d40-8050-62f819fa0fba+or+ab7b47ea-6b4a-4823-8b0e-2cf8da4edc6e+or+02046a54-33f2-4681-93a3-9255cf8e864a+or+d9a51a14-150e-45b7-9302-d824cc9f753e%29+or+superInstanceId==%2804804fce-a79d-4981-8bee-558c6bab04d7+or+0411aba2-9c13-418e-8ae9-008d9327ab90+or+54296789-8ab4-42d4-9fdc-1fe7eff83009+or+b500db33-6f19-47dd-89cc-38f122062690+or+0bd033eb-627a-497f-afe4-b319c9fcf263+or+233d46cb-a9f0-49e7-b2e7-0d4c9e555216+or+bc920e97-43ef-452e-9fcf-369fc7300e52+or+840160e1-c936-465b-9960-5dbc3b5e6543+or+987caf28-bef8-4855-bb68-c41e4edbe54c+or+65d6a0c4-064c-49e4-807c-db5de4b29b4a+or+96805a82-4b2b-4149-b289-42b73c125036+or+ab5183d3-4b3f-4a95-87c2-e96eb4c4bb4c+or+422d5a84-b044-4d3a-ad4b-9661d507a8b3+or+4176ee62-7cbf-49a9-9bb7-c3bfc678993e+or+af911207-3723-4b92-b7ac-2f4a23430f02+or+168ba00c-1cc0-43fd-9bf9-c5f6c95d7bb0+or+abba1ec9-c4a4-4479-82e7-870bca13cb59+or+aef9d97d-975a-4154-ab3a-c6188095ce7c+or+1d3c6ac7-6c80-4d01-b316-77ce25cdb500+or+727029a3-6bf4-4578-af8d-2c6769d79791+or+a2bd3888-f019-4aef-950f-171867ed874c+or+bfb3c5af-703f-42b7-8813-3ed01cfbab54+or+b516b243-2118-44de-8e64-0d0d71e36652+or+8042b362-3605-4117-bbb8-56faebc75868+or+60ef62ed-2a56-4941-9e3e-44420a8dfa1f+or+d3df9d05-434e-4f33-9baa-dc3496137aa3+or+586b00c5-5b8d-4072-b672-1e842e9b1718+or+58a9fef2-7ff9-416e-8ffa-6af046f3d95e+or+486431e4-7e2d-4407-920e-ce3dd9f8263b+or+2c409b92-b94c-45d3-a3da-32e995a7bcb1+or+2d55a4e0-0c57-47c7-a6af-71562beda363+or+8c4b3513-49c6-4320-adb2-84d565318e29+or+11ac1305-317c-4680-9ce9-86fb59641024+or+42e3d002-7fe7-470c-bf51-00a2d03b2520+or+b4d0e218-21ea-42e4-83be-4d44619c16d0+or+30b47efa-861d-4c51-b426-932894428be2+or+ccdc7e37-7e16-49cd-bef6-97a47aa84eac+or+4203589b-b041-45d5-952a-88d49ff5f941+or+54e6f4e7-b019-4c71-ab02-686c771fb495+or+4b800a57-6b62-4653-b99f-3333f795b444+or+05429df5-2df3-4197-823b-9670c29f3066+or+52a53b04-af3b-48e4-8888-56e828724d2b+or+37327ed2-3502-4535-95be-0ebf82c39522+or+7b3bdec3-0b29-4ac4-930d-35cfcdb8d4e2+or+8049440a-a96c-47aa-bdad-724a5f810284+or+409b41fd-85fb-4df6-84b1-fbc30d999727+or+119bb978-63a4-4d40-8050-62f819fa0fba+or+ab7b47ea-6b4a-4823-8b0e-2cf8da4edc6e+or+02046a54-33f2-4681-93a3-9255cf8e864a+or+d9a51a14-150e-45b7-9302-d824cc9f753e%2%29
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bohdan-suprun Bohdan Suprun
                Reporter:
                nielserik Niels Erik Gilvad Nielsen
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases