fix(sharding): apply default mapping for any table#1077
Open
meskill wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
levkk
approved these changes
Jun 15, 2026
levkk
left a comment
Collaborator
There was a problem hiding this comment.
Kinda complicated, but I get it. I think we may want a more tight config for sharding here. name is really optional if the column is the same in all tables, for example. We may even want to provide some kind of config builder based on the schema and users' input.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There could be some discrepancies for sharding depending on configuration that is not very obvious.
Here is the before and after map.
[[sharded_tables]] name[[sharded_mappings]] table"users""users""users""users"I wanted to verify if that what do we actually want, or do we want to apply mapping directly to the sharded_table configuration and require specific table/mapping to be defined in order to it to be merged together.
I'd think about fix both cases in this pr and apply catch-all settings for any other specific configuration or add the validation for configuration to prevent misuse.