[MODINV-752] Mod inventory fails to fetch individual bound-with items with more than 100 bound instances Created: 06/Oct/22  Updated: 28/Oct/23  Resolved: 03/Nov/22

Status: Closed
Project: mod-inventory
Components: None
Affects versions: None
Fix versions: 19.0.1, 20.0.0

Type: Bug Priority: P2
Reporter: Theodor Tolstoy (One-Group.se) Assignee: Niels Erik Nielsen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File image-2022-10-06-16-08-55-613.png    
Issue links:
Relates
relates to MODINV-753 Release 19.0.1 - Nolana R3 2022 Bug Fix Closed
relates to UIIN-2478 Inventory. Error in Cornell's environ... Closed
Sprint: Sif Sprint 151, Sif Sprint 152
Development Team: Sif
Release: Nolana (R3 2022) Bug Fix
RCA Group: TBD

 Description   

Overview:
Steps to Reproduce:

  1. Log into some FOLIO environment 
  2. Create a Bound-with structure in Inventory where one item is "bound" to more than 100 titles (the item that made FOLIO crash had 360+ Instances attached).
  3. Locate this item in the Inventory UI, and click the item.

Expected Results:

The Item details window is displayed

Actual Results:

The UI hangs, since the call to GET /inventory/items/{uuid} times out (HTTP 504)

Looking at the logs the underlying GET  request gets a Entity too large (or equivalent) error.

 
Additional Information:
Looking at the source code for fetching the bound-with titles, it seems mod-inventory is creating a GET request with 360 uuids, which makes the request fail due to the request gets larger than the allowed size. 

String boundWithPartsByItemIdsQuery = String.format("itemId==(%s)",        itemIds.stream()          .map(String::toString)          .collect(Collectors.joining(" or "))); 

Interested parties:



 Comments   
Comment by Kyle Banerjee [ 06/Oct/22 ]

This use case is not as unusual as it sounds as bound pamphlets and microfilms often have large number of boundwiths

Comment by Ann-Marie Breaux (Inactive) [ 10/Oct/22 ]

Hi Charlotte Whitt There's no dev team on this bug. Could you review and assign? Thank you!

Comment by Ann-Marie Breaux (Inactive) [ 21/Oct/22 ]

Hi Charlotte Whitt  Would this bug belong to Prokopovych or some other dev team? It probably should get moved into the proper MOD project. Thank you!

Comment by Niels Erik Nielsen [ 03/Nov/22 ]

Hi Marc Johnson, would you like me to roll release 19.0.1 with this fix, tagged for Nolana R3 BugFix,  I suppose?

Comment by Marc Johnson [ 03/Nov/22 ]

Niels Erik Nielsen

would you like me to roll release 19.0.1 with this fix, tagged for Nolana R3 BugFix, I suppose?

Sure. Given this was intended for back porting, the issue should NOT be closed, it should be in the status awaiting release. And there should be a release issue for 19.0.1.

Does this issue also occur on the mainline (for the next feature release for Orchid)?

Comment by Marc Johnson [ 03/Nov/22 ]

Theodor Tolstoy (One-Group.se)

Create a Bound-with structure in Inventory where one item is "bound" to more than 100 titles (the item that made FOLIO crash had 360+ Instances attached)

Out of curiosity, what kinds of items are bound together in quantities of 360+?

Comment by Niels Erik Nielsen [ 03/Nov/22 ]

Kyle Banerjee added a comment - 06/Oct/22 3:52 PM
This use case is not as unusual as it sounds as bound pamphlets and microfilms often have large number of boundwiths

 

Comment by Marc Johnson [ 03/Nov/22 ]

Thanks Niels Erik Nielsen I missed that comment.

I think this reminds me why I find bound with to be such a strange modelling of the domain.

Comment by Theodor Tolstoy (One-Group.se) [ 03/Nov/22 ]

Marc Johnson  another reason is that other systems have functional limitations that encourage libraries from over-using the boundwith structure for other purposes than initially intended.

Comment by Marc Johnson [ 03/Nov/22 ]

Theodor Tolstoy (One-Group.se)

another reason is that other systems have functional limitations that encourage libraries from over-using the boundwith structure for other purposes than initially intended.

I love these kinds of answers, because that tells me this isn't necessarily an underlying domain challenge and rather an implementation challenge.

I might hope that building and implementing FOLIO might be an opportunity to try to remove those limitations, rather than carry over those from past systems.

Comment by Theodor Tolstoy (One-Group.se) [ 03/Nov/22 ]

Marc Johnson  this irony of it is that for that to happen, FOLIO needs to have other areas build out/completed as well. But I completely agree.

Comment by Marc Johnson [ 04/Nov/22 ]

Theodor Tolstoy (One-Group.se)

this irony of it is that for that to happen, FOLIO needs to have other areas build out/completed as well

Oh yeah, I'm sure folks are using features inappropriately as workarounds for features that haven't been built yet.

Comment by Niels Erik Nielsen [ 04/Nov/22 ]

The real-life existence of bound-withs shows that the basic data design of Inventory is incomplete (or flawed, to be harsh). The current  structure of instances-holdingsRecords-items  presumes that a title can manifests as multiple circulatable "items" – which is obviously true – but that a circulatable item can only contain one title – which is not true; because, bound-withs. 

Implementing bound-withs as an add-on to that data structure – rather than refactoring the basic data design to inherently accommodate for the concept of bound-withs – is a half-measure, and thus likely to be strange one way or the other.

Comment by Marc Johnson [ 04/Nov/22 ]

Niels Erik Nielsen

The real-life existence of bound-withs shows that the basic data design of Inventory is incomplete (or flawed, to be harsh).

It is indeed incomplete (like pretty much any software that is built incrementally).

I certainly wasn't aware of the notion of bound withs when I was involved in the early days of development on inventory. I don't recall conversations about them at the time. It's hard to design for expectations / needs that folks don't describe.

The current structure of instances-holdingsRecords-items presumes that a title can manifests as multiple circulatable "items" – which is obviously true – but that a circulatable item can only contain one title – which is not true; because, bound-withs.

Indeed, IIRC I was an advocate for changing the fundamental model of inventory in a similar manner to this.

Implementing bound-withs as an add-on to that data structure – rather than refactoring the basic data design to inherently accommodate for the concept of bound-withs – is a half-measure, and thus likely to be strange one way or the other.

That is one of the reasons I argued against going this route and why I stepped away from the current implementation of bound withs.

I am a little surprised by this comment, from my recollection of the working group around bound withs, I thought you were an advocate of this approach.

Generated at Thu Feb 08 22:22:48 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.