You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL Server outbox bulk copy: measure commit throughput and decide on BulkCopyTimeout #481
Two questions about SqlServerOutboxBatch, found while fixing the test timeout in #479.
Throughput. Committing 7,000 buffered outbox rows through its SqlBulkCopy took 4.8 seconds with two such commits running and nothing else (about 1,450 rows per second), and 15.9 seconds inside the full SQL Server test project. That was SQL Server 2022 CU14 in Docker on an ARM64 Mac, where the image runs emulated, so the absolute number is pessimistic, but CI on x64 exceeded 30 seconds for the same commit under contention. SqlBulkCopy normally moves far more than that. The table has check constraints and the test adds an AFTER INSERT trigger; the copy uses CheckConstraints | FireTriggers, EnableStreaming = true, and streams headers and body per row.
Timeout.Prepare creates the SqlBulkCopy without setting BulkCopyTimeout, so every application gets SqlClient's 30-second default regardless of the command timeout it configured.
Reproduction
At main ce69998c739493c704a5e22700e671bc6a2d47e9, tests/Relayer.Outbox.SqlServer.Tests/AdoNetEnlistmentTests.cs, Dapper_business_commands_and_outbox_rows_commit_atomically_in_one_batch, still commits 7,000 rows. Add a stopwatch around the commit for diagnosis. Open PR #482 reduces that test to 1,000 rows to address #479; after it merges, use 7,000 rows in the benchmark reproduction rather than reverting the test fix. This investigation is independently claimable and does not need to wait for #479.
Expected
A benchmark for the SQL Server outbox commit path against a raw SqlBulkCopy of the same rows, to say whether the per-row cost is Relayer's or the server's.
A decision on whether BulkCopyTimeout should follow the caller's configuration. If it stays at the native default, say so in the SQL Server outbox docs.
Activity
Measure large SQL Server outbox commits and document bulk-copy timeout (