@@ -805,13 +805,16 @@ that is not increasing in value. For example in some cases you could
805
805
reverse all the bits of your shard key, which preserves information
806
806
while avoiding the increasing sequence of values.
807
807
808
- :term:`BSON` :term:`ObjectIds <ObjectId>` increase in value with each
809
- insert. To more evenly distribute inserts based on this property, you
810
- might want at generation time to reverse the bits of the ObjectIds or to
811
- swap the first and last 16-bit words, to "shuffle" the inserts.
812
- Alternatively you might use UUIDs instead, but check that your UUID
813
- generator does not generate consistent increasing UUIDs, which would
814
- cause the same behavior.
808
+ :term:`BSON` :term:`ObjectIds <ObjectId>` are one case of a value that
809
+ monotonically increases during an insert. If you use :term:`ObjectId` as
810
+ a shard key, then you can do either of the following at generation time
811
+ to more evenly distribute inserts based on this property:
812
+
813
+ - Reverse the bits of the ObjectIds, or
814
+ - Swap the first and last 16-bit words, to "shuffle" the inserts.
815
+ - Use UUIDs instead, but check that your UUID generator does not
816
+ generate consistent increasing UUIDs, which would cause the same
817
+ behavior.
815
818
816
819
.. example:: The following example, in C++, swaps the leading and
817
820
trailing 16-bit word of object IDs generated so that they are no
0 commit comments