Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24071

Introduce ChunkRange class

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.6
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 14 (05/13/16)

      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.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: