[SERVER-10866] Figure out split triggering mechanism Created: 24/Sep/13  Updated: 06/Dec/22  Resolved: 28/Jul/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Ian Whalen (Inactive) Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-11683 Figure out mongod split triggering me... Closed
Related
related to SERVER-9287 Decision to split chunk should happen... Closed
Assigned Teams:
Sharding
Participants:

 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
    }
  }
}



 Comments   
Comment by Randolph Tan [ 28/Jul/17 ]

Actual work is now tracked in PM-33

Comment by auto [ 12/Nov/13 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-10866 Figure out split triggering mechanism

Enable update auto aplit test.
Branch: master
https://github.com/mongodb/mongo/commit/456a72d926b1e4d44635533bc1e6e5a152661b71

Comment by auto [ 30/Oct/13 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-10866 Figure out split triggering mechanism

Wire auto-split logic for update write commands.
Branch: master
https://github.com/mongodb/mongo/commit/bfea19f2b68ad5fe5426b70f452d985b8a24f036

Comment by auto [ 25/Oct/13 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-10866 Figure out split trigger mechanism

Implement auto-split for insert write commands on mongos. Note that this patch currently also take documents from the delete commands into account as well (this will be fixed in the next iteration). However, deletes will never trigger an auto-split request.
Branch: master
https://github.com/mongodb/mongo/commit/ff9f15747c7f9e3d20436a66b2d90384e06fd4f2

Generated at Thu Feb 08 03:24:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.