fix(issue-41-phase2): separate finalization session in wire_push_stream
After the frame loop completes, close the object-storage session to release its connection back to the pool, then acquire a fresh session via AsyncSessionLocal() for all finalization writes (snapshot upserts, commit INSERTs, branch update). This prevents asyncpg idle-connection reaping from killing the connection between MinIO object writes and the DB finalization phase.
Tests: - test_push_session_phase2.py: 3 new tests (P2B-1 close called, P2B-2 source uses AsyncSessionLocal, P2B-3 push survives dead original session) - test_push_per_batch_commit_phase2.py: updated P2-1 through P2-4 to intercept fin_session via _async_session_factory wrapper instead of db_session directly - test_push_per_batch_commit.py: updated P1-1/P1-2/P1-3 commit count assertions to reflect that finalization commits now go to fin_session, deleted obsolete P1-6
0 comments
muse hub commit comment sha256:64894c3f121dac80b0069dc12142074caa05a2707c4a7ff6154432052908b48b --body "your comment"
No comments yet. Be the first to start the discussion.