Repository navigation
Dequeue transferred records using an explicit database handle - #421
srikar-naidu wants to merge 2 commits into
Conversation
|
👋 Hi @srikar-naidu, thanks for contributing! For the review process to begin, please verify that the following is satisfied:
📢✨ Before we assign a reviewer:
Also check that issue requirements are satisfied & you ran Pull requests that don't follow the guidelines will be closed. Reviewer assignment can take up to 2 weeks. 📎 We couldn't find an issue linked to this pull request. Please edit the description and link one under References, for example |
|
Just a note, postgres CI failure is unrelated. I've addressed it and we'll wrangle the rebasing this week. I'll let you know. Thank you! |
472eee2 to
c046879
Compare
|
HI @srikar-naidu, you can rebase on top of |
Pass the context database through dequeue SQL, counter updates, and legacy ordering. Restore routed default handles after context pickling. Keep FSIC helper routing for Task 6 (learningequality#367), as specified by Task 5.
253ba8f to
9b951c7
Compare
Summary
Passes a required database handle through dequeue and legacy self-referential ordering, so SQL, transactions, and instance counter updates use the selected database.
Adds
SessionContext.db, defaults it to routed access, and restores the default handle after unpickling. The receiver operation passes this handle to dequeue.Closes #366 and #365.
TODO
Reviewer guidance
This PR targets
dequeue-records-366.Following Task 5,
DatabaseMaxCounter.update_fsics()remains unchanged for #367. The pinned tests mock that helper while checking dequeue SQL, counters, ordering, and rollback underassert_no_default_db_queries()with routers disabled. Full pinned FSIC routing therefore still depends on #367. If that work should be included here, I can adjust the scope.Verification completed locally:
TransferSessiontests on Windows. Both passed on rerun.Issues addressed
Addresses #366, with FSIC helper routing deferred to #367 as specified in Task 5.
Documentation
Updated the
SessionContextand dequeue docstrings. No separate documentation files were added.AI usage
I used Codex as a coding assistant for implementation, test generation, and running checks. I provided the issue requirements and maintainer’s instructions, discussed the proposed approach, and evaluated the scope decision around FSIC routing. I chose to keep that work in #367 according to Task 5 and document the limitation for the reviewer. I also used the lessons and review feedback from my previous contribution to guide this PR.