We find ourselves writing a lot of functions, which have a ton of arguments like this. The reason for this is that all shard manipulation methods require a complete shard description for error checking.
Currently we have 4 different types which each represent and parse a chunk in a different way: Chunk, ChunkType, MoveChunkRequest, ChunkRange. We should unify all these into two structures, which inherit from each other:
class ChunkRange - only contains min and max, which are the bounds of the chunk
struct ChunkType : public ChunkRange - contains in addition the namespace, version, jumbo bit, shard and name of the chunk (which actually can be omitted since it's generated from the the min key).
This ticket is for the ChunkRange structure.
- related to
-
SERVER-24108 Pessimizing move warning in chunktests.cpp
- Closed