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

Figure out split triggering mechanism

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None

      Description

      Plan for 2.6:
      Wire existing logic to the write commands in mongos while preserving previous behaviour as much as possible.

      Plan for beyond 2.6:
      Move auto split mechanism to the shards. Preserve simple existing behavior as much as possible, at first.

      Eventually, a separate entity will be tasked to keep track of the document sizes being inserted. This entity will have no knowledge of the entire chunk ranges and config for a collection and will only know ranges being fed to it. Basically, the api would look something like:

      class AutoSplitTracker {
      public:
        bool newDoc(const BSONObj& minChunkKey, const BSONObj& maxChunkKey, const BSONObj& doc) {
          // Check inconsistency in mix/max pair with our own map and delete inconsistent entries.
          // Inconsistent entries are caused by the changes in chunk boundaries due to the chunks being merged or splitted.
       
          _map[minChunkKey].increment(doc.objsize());
       
          if (_map[minChunkKey].size() > splitThreshold) {
             // use splitVector to determine if we actually need to split
          }
        }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding Backlog - Sharding Team
              Reporter:
              ian.whalen Ian Whalen
              Participants:
              Votes:
              3 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: