Skip to content

Add bulk COPY event append for high-throughput seeding#4212

Merged
jeremydmiller merged 3 commits intomasterfrom
feature/bulk-event-append
Mar 28, 2026
Merged

Add bulk COPY event append for high-throughput seeding#4212
jeremydmiller merged 3 commits intomasterfrom
feature/bulk-event-append

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

  • New BulkInsertEventsAsync API on IDocumentStore using PostgreSQL COPY ... FROM STDIN BINARY for maximum throughput event loading
  • Supports all combinations of Guid/string identity, single/conjoined tenancy, archived stream partitioning, and metadata columns
  • Intended for data seeding, migration from other event stores, load testing, and importing events from external systems
  • New documentation page at /events/bulk-appending with code samples

Test plan

  • 23 integration tests covering all configuration permutations
  • Documentation page passes markdownlint
  • Sidebar entry added to VitePress config

🤖 Generated with Claude Code

jeremydmiller and others added 3 commits March 27, 2026 12:17
Adds BulkInsertEventsAsync to IDocumentStore, using PostgreSQL COPY binary
import to bypass the normal append pipeline. Supports Guid/string stream
identity, conjoined tenancy, all optional metadata columns, and archived
stream partitioning. Intended for seeding, migration, and load testing.

Benchmarked at ~88K events/sec (10M events in 113s) on local PostgreSQL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ermutations

Tests now cover every combination of:
- Stream identity: AsGuid, AsString
- Tenancy: Single, Conjoined
- Metadata: each column in isolation (CorrelationId, CausationId, Headers,
  UserName), all columns combined, all columns with null values
- Archived stream partitioning: on/off with each identity and tenancy combo
- Batching: multiple COPY batches, batch size of 1
- Full combination: String + Conjoined + Archived + All Metadata
- Version/sequence correctness assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New docs page at /events/bulk-appending covering the BulkInsertEventsAsync
API: basic usage, multi-tenancy, metadata, batch size control, string
identity, supported configurations, limitations, and performance notes.

Includes compilable code samples in BulkAppendSamples.cs with region
markers for VitePress snippet integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 9e4e37a into master Mar 28, 2026
6 checks passed
@jeremydmiller jeremydmiller deleted the feature/bulk-event-append branch March 28, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant