Skip to content

fix: part 4 #12432 — batch mybooks book lookups - #13597

Open
CipherZ3r0 wants to merge 1 commit into
internetarchive:masterfrom
CipherZ3r0:12432/batch-mybooks-lookups-pr-4
Open

fix: part 4 #12432 — batch mybooks book lookups#13597
CipherZ3r0 wants to merge 1 commit into
internetarchive:masterfrom
CipherZ3r0:12432/batch-mybooks-lookups-pr-4

Conversation

@CipherZ3r0

Copy link
Copy Markdown
Contributor

fix: part 4 #12432
follow after #13584

Technical

Batch initial book lookups and redirect resolution in mybooks.py using get_many() to eliminate the per-loan N+1 lookup pattern while preserving the existing redirect behavior.

Testing

  • 32/32 tests pass
  • Pre-commit hooks pass
  • Added coverage for missing keys, duplicates, redirects, multi-hop redirects, and mixed loan scenarios
  • Added integration coverage for batching behavior

Performance

Replaces per-loan get() calls with batched get_many() requests, including redirect resolution.

openlibrary/tests/fastapi/test_mybooks_integration.py file is generated by AI

Stakeholders

@RayBB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant