fix: per-batch session.commit() in wire_push_stream to prevent connection timeout
- Add await session.commit() inside _flush_batch after each batch's DB writes (both the all-skipped early-return path and the new-objects path) - Fold background job enqueuing into the branch-update transaction so the final phase makes exactly one commit instead of two - Add TDD test file tests/test_push_per_batch_commit.py (P1-1 through P1-6) verifying commit count per batch, durability under mid-push failure, and idempotency on second push
Root cause: single asyncpg transaction held open for entire push duration; for large repos (4000+ objects, ~2 min) asyncpg reaps the idle connection during MinIO PUTs and the final commit() hits ConnectionDoesNotExistError.
sha256:af0265f72a2cc8625621c96e405f2d3cbf5ebd9ac157717e643ea92fbc790ddf
sha
+52
~1
symbols
sha256:8736004f167ee493a634a5099aa5a1cc0246f09df2e39d19767ef1da650567fd
snapshot
+52
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
53 symbols
+
test_p1_1_commit_called_per_batch
function
async_function test_p1_1_commit_called_per_batch L213–249
+
test_p1_2_one_full_batch_two_commits
function
async_function test_p1_2_one_full_batch_two_commits L257–287
+
test_p1_3_partial_second_batch_three_commits
function
async_function test_p1_3_partial_second_batch_three_commits L295–325
+
test_p1_4_batch_0_durable_after_batch_1_fails
function
async_function test_p1_4_batch_0_durable_after_batch_1_fails L333–398
+
test_p1_5_second_push_idempotent
function
async_function test_p1_5_second_push_idempotent L406–436
+
test_p1_6_no_minio_io_in_final_commit_transaction
function
async_function test_p1_6_no_minio_io_in_final_commit_transaction L444–489
← Older
Oldest on task/phase1-per-batch-commit
All commits
Newer →
Latest on task/phase1-per-batch-commit
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:af0265f72a2cc8625621c96e405f2d3cbf5ebd9ac157717e643ea92fbc790ddf --body "your comment"
No comments yet. Be the first to start the discussion.