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

Introduce ChunkRange class

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.6
    • Component/s: Sharding
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: