Skip to content

Add integration test for bucketed multi-database tenancy with partitioned documents#4155

Open
erdtsieck wants to merge 1 commit intoJasperFx:masterfrom
erdtsieck:feature/Add-bucketed-sharding-multi-tenancy-tests
Open

Add integration test for bucketed multi-database tenancy with partitioned documents#4155
erdtsieck wants to merge 1 commit intoJasperFx:masterfrom
erdtsieck:feature/Add-bucketed-sharding-multi-tenancy-tests

Conversation

@erdtsieck
Copy link
Contributor

@erdtsieck erdtsieck commented Mar 1, 2026

This adds an integration test that demonstrates how tenants are deterministically routed to one of multiple shard databases using a stable hash and virtual buckets, while documents are further distributed across hash-based table partitions within each database.

The test verifies that:
• multiple shard databases are created and migrated
• schema changes are applied to every shard
• tenant sessions are routed to the expected database
• bulk inserts, queries, and clean operations work across shards
• document partition tables are created as expected

This provides a concrete, executable example of combining database sharding and table partitioning in Marten without relying on master-table tenancy.

…oned documents

This adds an integration test that demonstrates how tenants are deterministically routed to one of multiple shard databases using a stable hash and virtual buckets, while documents are further distributed across hash-based table partitions within each database.

The test verifies that:
• multiple shard databases are created and migrated
• schema changes are applied to every shard
• tenant sessions are routed to the expected database
• bulk inserts, queries, and clean operations work across shards
• document partition tables are created as expected

This provides a concrete, executable example of combining database sharding and table partitioning in Marten without relying on master-table tenancy.
jeremydmiller added a commit that referenced this pull request Mar 9, 2026
PR #4155: Integration tests for bucketed multi-database tenancy with
hash-based document partitioning across shard databases.

PR #4003: Test for single-tenanted documents in multi-tenancy
partitioned ancillary stores.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jeremydmiller added a commit that referenced this pull request Mar 9, 2026
PR #4155: Integration tests for bucketed multi-database tenancy with
hash-based document partitioning across shard databases.

PR #4003: Test for single-tenanted documents in multi-tenancy
partitioned ancillary stores.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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