-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding EMEA 2021-07-26
With the work done under SERVER-58650 , a part of the splitVector code - used by the chunk splitter - has been mechanically ported into the autoSplitVector without much context.
As a precondition to SERVER-55028 that is aimed to improve such function, it is recommendable to further simplify/clarify the auto split vector code.
Planned refactoring:
- Extract the logic to extend the chunk bounds into an independent function
- Extract the minKey == maxKey check into an independent function
- Bring out of from the collection lock scope the code that doesn't require it
- Avoid the confusing part adding/removing minKey to the split vector, but rather simply keep the last split point reference initialized to the first chunk's key
- Better document each unintuitive step/statement
- Simplify code but preserve the original semantic
- is depended on by
-
SERVER-55028 Improve the auto-splitter policy
- Closed