Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadingRoomCache failover in multiple record situtation #389

Closed
ctgraham opened this issue Jan 29, 2025 · 1 comment
Closed

ReadingRoomCache failover in multiple record situtation #389

ctgraham opened this issue Jan 29, 2025 · 1 comment
Assignees

Comments

@ctgraham
Copy link
Contributor

Describe the bug

The api/reading-rooms endpoint does not gracefully handle multiple records in the ReadingRoomCache. The initial case of multiple records in this table was probably the result of a race condition.

To reproduce

Steps to reproduce the behavior:

  1. Insert two records in process_request_readingroomcache in request broker's db.
  2. GET api/reading-rooms
  3. See error {"detail":"get() returned more than one ReadingRoomCache -- it returned 2!"}, UI renders no reading rooms.

Expected behavior

Exception is caught, best cached record is selected, and cache is scheduled to be cleared and rebuilt.

Error message or screenshots

n/a

Impact on your work

Presently, once multiple records are inserted, only manual intervention can clear them.

Additional context

PR incoming.

@ctgraham ctgraham self-assigned this Jan 29, 2025
ctgraham added a commit to ulsdevteam/request_broker that referenced this issue Jan 30, 2025
ctgraham added a commit to ulsdevteam/request_broker that referenced this issue Jan 31, 2025
helrond added a commit that referenced this issue Feb 4, 2025
#389: gracefully handled multiple ReadingRoomCache records
helrond added a commit that referenced this issue Feb 4, 2025
#389: gracefully handled multiple ReadingRoomCache records
@helrond
Copy link
Member

helrond commented Feb 4, 2025

Closed by 030a994

@helrond helrond closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants