Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/core/timeseries-collections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ command:
}
)

.. _time-series-fields:

When creating a time series collection, specify the following options:

.. list-table::
Expand Down
5 changes: 5 additions & 0 deletions source/core/timeseries/timeseries-granularity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,8 @@ a time. From ``"seconds"`` to ``"minutes"`` or from ``"minutes"`` to
``"hours"``. Other changes are not allowed. If you need to change the
``granularity`` from ``"seconds"`` to ``"hours"``, first increase the
``granularity`` to ``"minutes"`` and then to ``"hours"``.

.. note::

You cannot modify the ``granularity`` of a sharded time series
collection.
22 changes: 17 additions & 5 deletions source/core/timeseries/timeseries-limitations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ The maximum size of a measurement document is 4 MB.
Updates and Deletes
~~~~~~~~~~~~~~~~~~~

:ref:`Time series collections <manual-timeseries-collection>` only
support insert operations and read queries. Updates and manual delete operations
result in an error.
:ref:`Time series collections <manual-timeseries-collection>` support update
and delete operations with limitations. The following operations are not supported
on time series collections:

- :dbcommand:`findAndModify`.
- Updates that modify the ``timeField``.
- Updates with ``multi:false`` that modify the ``metaField``.
- Updates with ``upsert:true``.
- Updates or deletes in multi-document transactions.

MongoDB supports all other update and delete operations. For more information,
see :ref:`<collection-method>`.

To automatically delete old data, :ref:`set up automatic removal (TTL)
<set-up-automatic-removal>`.
Expand Down Expand Up @@ -117,11 +126,14 @@ Client-Side Field Level Encryption
</core/security-client-side-encryption>` is not supported for
:ref:`time series collections <manual-timeseries-collection>`.

.. _time-series-limitations-sharding:

Sharding
~~~~~~~~

:ref:`Time series collections <manual-timeseries-collection>` cannot
currently be sharded.
Starting in MongoDB 5.1, sharded time series collections are supported.
Copy link

@banarun banarun Nov 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add more details here. Some of the key things to highlight would be,

  1. The changes to the shardCollection command, which now accepts timeseries parameter.
  2. The sharding admin commands (like split, moveChunk) are not supported for time-series collection.
  3. The limitations on the shard key pattern (Can only use metaField and/or timeField in the shard key). Details here: https://docs.google.com/document/d/1ljVx7gni5dg6vuLSL2li14lq13T2RqENWEGKKeliCzw/edit#heading=h.1qvrx81umcnx


You cannot modify the ``granularity`` of a sharded time series collection.

Aggregation $out and $merge
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 3 additions & 0 deletions source/includes/5.1/5.1-release-notes-sharded-time-series.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MongoDB 5.1 provides support for sharded :ref:`time series collections
<manual-timeseries-collection>`. See :ref:`Time Series Limitations
<time-series-limitations-sharding>`.
2 changes: 2 additions & 0 deletions source/reference/command/findAndModify.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _find-and-modify:

=============
findAndModify
=============
Expand Down
4 changes: 4 additions & 0 deletions source/reference/method/db.collection.update.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _collection-update:

======================
db.collection.update()
======================
Expand Down Expand Up @@ -51,6 +53,8 @@ The :method:`db.collection.update()` method has the following form:
}
)

.. _update-parameters:

Parameters
~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions source/reference/method/js-collection.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _collection-method:

==================
Collection Methods
==================
Expand Down
29 changes: 22 additions & 7 deletions source/release-notes/5.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,28 @@ Starting in MongoDB 5.1, :expression:`$dateSubtract` and
:expression:`$dateAdd` report an error when an overflow is detected for
``amount`` values.

Time Series Collections
-----------------------

Geo Indexing for Time Series collections
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Starting in MongoDB 5.1, you can use :ref:`geo indexes
<timeseries-limitations-secondary-indexes>` on the ``metaField`` of time
series collections.

Updates and Deletes
~~~~~~~~~~~~~~~~~~~

Starting in MongoDB 5.1, time series collections support
:ref:`update and delete operations <updates-and-deletes>` with
limitations.

Sharded Time Series Collections
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/5.1/5.1-release-notes-sharded-time-series.rst

.. _5.1-rel-notes-sbe:

Slot-Based Query Execution Engine
Expand Down Expand Up @@ -135,13 +157,6 @@ Opcode Counters
Resharding Statistics
- :serverstatus:`shardingStatistics.resharding.lastOpEndingChunkImbalance`

Geo Indexing for Time Series collections
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Starting in MongoDB 5.1, you can use :ref:`geo indexes
<timeseries-limitations-secondary-indexes>` on the ``metaField`` of time
series collections.

Schema Validation Errors Contain Description Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down