Potential stockout notifications may get lost when stock management service goes down

Description

When processing a stock event, it was discovered that the logic to determine if there is a stockout and to notify the corresponding stock card "editors" was performing rather slowly, and it was affecting requisition single approve. A short-term solution was to make the notification logic asynchronous, so the stock event processing would not wait for the notification code to finish. This asynchronous logic introduces a queue

This async code introduced a potential minor bug where stock card editors would not get notified of a stockout, since Spring would create a queue to process these potential notifications. This bug would occur if all of the following are true:

  • the stock management service is processing the notifications slowly enough to not be able to clear out the queue

  • an administrator stops the service before the queue is cleared out

  • any of the notification calls not yet processed would find a stockout and need to notify the stock card editors

A solution to this bug should be found in this ticket. Some possible solutions:

  • Store unprocessed queue items in a persistent store (database), so that if the service goes down, once it comes back up, Spring can continue processing

  • Provide an API endpoint that shows the size of the queue so that the administrator could take the service down once the queue is empty

    • This would not address the issue if the stock management service crashes

Environment

None

Activity

Show:
Artur Lebiedziński
updated the Workflow
February 8, 2023 at 1:27 PM
Workflow for Project OLMIS v7-19-2016
OLMIS-Core v.1 2023
Joanna Bebak
updated the Rank
March 10, 2020 at 10:09 AM
None
Ranked lower
Joanna Bebak
updated the Rank
February 10, 2020 at 1:58 PM
None
Ranked lower
Joanna Bebak
updated the Epic Link
February 10, 2020 at 1:56 PM
OLMIS-6732
OLMIS-3564
Joanna Bebak
updated the Epic Link
January 17, 2020 at 9:43 AM
OLMIS-3564
OLMIS-6732
Joanna Bebak
updated the Rank
January 16, 2020 at 8:09 AM
None
Ranked higher
Joanna Bebak
updated the Labels
November 26, 2019 at 12:44 PM
Angola-Request Performance Stub
Angola-Request Performance Stub Triaged
Joanna Bebak
updated the Rank
September 13, 2019 at 7:55 AM
None
Ranked higher
Ben Leibert
updated the Rank
March 6, 2019 at 10:54 PM
None
Ranked lower
Ben Leibert
updated the Sprint
March 6, 2019 at 10:54 PM
Ben Leibert
updated the Labels
March 6, 2019 at 10:53 PM
Performance Stub
Angola-Request Performance Stub
Sam Im
updated the RemoteIssueLink
January 11, 2019 at 9:32 PM
None
This issue links to "Page (Confluence)"
Sam Im
updated the RemoteIssueLink
January 9, 2019 at 11:15 PM
None
This issue links to "Page (Confluence)"
Mary Jo Kochendorfer
updated the Rank
September 5, 2018 at 10:05 PM
None
Ranked higher
Mary Jo Kochendorfer
updated the Rank
September 5, 2018 at 10:04 PM
None
Ranked higher
Mary Jo Kochendorfer
updated the Fix versions
February 6, 2018 at 1:19 AM
3.3
None
Sam Im
updated the Link
February 5, 2018 at 10:33 PM
None
This issue relates to OLMIS-3474
Sam Im
updated the Epic Link
January 24, 2018 at 9:51 PM
None
OLMIS-3564
Sam Im
updated the Epic Link
January 24, 2018 at 9:51 PM
None
OLMIS-3564
Mary Jo Kochendorfer
updated the Rank
December 22, 2017 at 9:44 PM
None
Ranked higher
Mary Jo Kochendorfer
updated the Rank
December 22, 2017 at 9:44 PM
None
Ranked higher
Mary Jo Kochendorfer
updated the Rank
December 22, 2017 at 9:43 PM
None
Ranked higher
Mary Jo Kochendorfer
updated the Rank
December 22, 2017 at 9:43 PM
None
Ranked higher
Mary Jo Kochendorfer
changed the Status
November 1, 2017 at 8:02 PM
Roadmap
To Do
Chongsun Ahn
updated the Link
October 31, 2017 at 5:11 AM
None
This issue relates to OLMIS-3346
Chongsun Ahn
created the Work item
October 31, 2017 at 5:11 AM
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Priority

Time Assistant

Created October 31, 2017 at 5:11 AM
Updated March 10, 2020 at 10:09 AM