Use the a mod number of shard function to route#137062
Use the a mod number of shard function to route#137062Tim-Brooks merged 46 commits intoelastic:mainfrom
Conversation
Using hash % number of shards to routing documents.
|
Work in progress. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
|
I'm going to figure out how to mute that rest compat test which is tightly coupled to shard number tomorrow. |
henningandersen
left a comment
There was a problem hiding this comment.
Looks good. I left a few detailed comments.
Additionally, I wonder if we need a minimal unit test of old and new index-routing behavior.
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataTests.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataTests.java
Show resolved
Hide resolved
|
This is ready for another review @henningandersen. I'm opening a rest api test fix on 8.x to fix the BWC test. |
Using hash % number of shards to routing documents. This commit introduces an index version to indicate which routing function an index is using. Since traditional split, clone, and shrink functions inherit index version this means that documents will still be routed the same after the shard is resized.
Using hash % number of shards to routing documents. This commit introduces an index version to indicate which routing function an index is using. Since traditional split, clone, and shrink functions inherit index version this means that documents will still be routed the same after the shard is resized.
Using hash % number of shards to routing documents.