@@ -418,17 +418,38 @@ Still, you may want to split chunks manually if:
418
418
Use :func:`sh.status()` to determine the current chunks ranges across
419
419
the cluster.
420
420
421
- TODO expand this section
422
-
423
421
To split chunks manually, use either the :func:`sh.splitAt()` or
424
422
:func:`sh.splitFind()` helpers in the :program:`mongo` shell.
425
423
These helpers wrap the :dbcommand:`split` command.
426
424
427
- TODO: examples of using both helpers.
425
+ Use the following command to split the chunk that the document that
426
+ matches the ``{ "zipcode": 63109 }`` query statement:
427
+
428
+ .. code-block:: javascript
429
+
430
+ sh.splitFind( { "zipcode": 63109 } )
431
+
432
+ This will split the chunk that contains the *first* document returned
433
+ that matches this query into two equal components. MongoDB will split
434
+ the chunk so that documents that have half of the shard keys in will
435
+ be in one chunk and the documents that have other half of the shard
436
+ keys will be a second chunk. The query in :func:`sh.splitFind()` need
437
+ not contain the shard key, though it almost always makes sense to
438
+ query for the shard key in this case, and including the shard key will
439
+ expedite the operation.
440
+
441
+ However, the location of the document that this query finds with
442
+ respect to the other documents in the chunk does not affect how the
443
+ chunk splits. Use :func:`sh.splitAt()` to split a chunk in two using
444
+ the queried document as the partition point:
445
+
446
+ .. code-block:: javascript
447
+
448
+ sh.splitAt( { "zipcode": 63109 } )
428
449
429
450
.. note::
430
451
431
- You cannot merge chunks once you've split them.
452
+ You cannot merge or combine chunks once you've split them.
432
453
433
454
.. _sharding-balancing-modify-chunk-size:
434
455
@@ -528,8 +549,6 @@ block until the migration is complete.
528
549
Balancer Operations
529
550
-------------------
530
551
531
- TODO modify this section to include the helper functions in the shell.
532
-
533
552
This section provides an overview of common administrative procedures
534
553
related to balancing and the balancing process.
535
554
@@ -584,7 +603,9 @@ Here's what this tells you:
584
603
585
604
.. note::
586
605
587
- The following shell helper will quickyl tell you whether the balancer is running:
606
+ Use the :func:`sh.isBalancerRunning()` helper in the
607
+ :program:`mongo` shell to determine if the balancer is
608
+ running, as follows:
588
609
589
610
.. code-block:: javascript
590
611
0 commit comments