Review state control of mod-quick-marc
Description
Environment
Potential Workaround
is cloned by
Checklist
hideTestRail: Results
Activity

Laura Wrubel August 30, 2023 at 11:27 AM
Yes, calls 1 and 2 are to the same FOLIO record. They're made by background jobs that are unaware of each other. I had hoped that if a 500 (or some other non-success response) was returned, we could simply retry that call. That would allow us to get the updated ID and try the update again. But retrying those steps (5-7) has unexpected behavior in that the "successful" operation for A does not seem to actually be successful.
Pavlo Smahin August 29, 2023 at 1:32 PM
Calls 1 and 2 are to the same record?
If yes then it could be a problem because it returns some IDs from mod-source-record-storage that are used then for update. After the update, these IDs are changed to new ones in mod-source-record-storage. So, 1-2 get the same IDs, 3 makes an update (IDs changed), and 4 try to do an update with the same IDs.
So, I think that it may cause you problems.
If it doesn't help - then please create an issue for us with all the details and we will investigate it.

Laura Wrubel August 29, 2023 at 12:11 PMEdited
That sounds plausible to me that mod-source-record-storage is the source of the problem. The calls are:
A: GET /records-editor
B: GET /records-editor
A: PUT /records-editor, 202 response
B: PUT /records-editor, 500 response
B: after getting 500 in step 4, retries
B: GET /records-editor
B: Record retrieved has the MARC 856 added in step 4, and does NOT have the update from step 3. Also, record has updateStatus["recordState"]="ERROR"
B: PUT /records-editor, 202 response
Pavlo Smahin August 29, 2023 at 8:30 AMEdited
, I don't think it's due to optimistic locking. As I see from Laura's message the constraint is from mod-source-record-storage that doesn't have OL.
To investigate it more, I want to understand the sequence of calls.
, Is it GET, PUT, PUT, PUT... or is it GET, PUT, GET, PUT... ?

Khalilah Gambrell August 28, 2023 at 12:26 PM
Hey - do you think describes the effects optimistic locking? IF so, is there a way to show better error messaging? OR do you think this might have more to do with setup of the module?
Details
Assignee
Pavlo SmahinPavlo SmahinReporter
DenisDenisLabels
Priority
P3Story Points
2Development Team
SpitfireTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Reporter

Requirements
https://folio-org.atlassian.net/browse/FOLIO-3539