-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Time series updates for sharding support and updates / deletes #6085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time series updates for sharding support and updates / deletes #6085
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the docs. I just added some suggestions for details for sharding time-series collection.
Sharding | ||
~~~~~~~~ | ||
|
||
:ref:`Time series collections <manual-timeseries-collection>` cannot | ||
currently be sharded. | ||
Starting in MongoDB 5.1, sharded time series collections are supported. |
There was a problem hiding this comment.
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,
- The changes to the
shardCollection
command, which now acceptstimeseries
parameter. - The sharding admin commands (like split, moveChunk) are not supported for time-series collection.
- The limitations on the shard key pattern (Can only use
metaField
and/ortimeField
in the shard key). Details here: https://docs.google.com/document/d/1ljVx7gni5dg6vuLSL2li14lq13T2RqENWEGKKeliCzw/edit#heading=h.1qvrx81umcnx
6c700e6
to
6a39d6a
Compare
6a39d6a
to
9ed1574
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback @banarun. I've updated to include additional detail per your suggestions. Could you please take a look?
Cheers
@@ -0,0 +1,3 @@ | |||
Required. The name of the field which contains the date in each | |||
time series document. Documents in a time series collection must | |||
have a valid BSON date as the value for the ``timeField``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as existing copy; shouldn't need review.
metadata should rarely, if ever, change. | ||
|
||
The name of the specified field may not be ``_id`` or the same as | ||
the ``timeseries.timeField``. The field can be of any type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as existing copy; shouldn't need review.
from the same source. | ||
|
||
If you do not specify ``timeseries.metaField``, consider the time | ||
span between all measurements that are inserted in the collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as existing copy; shouldn't need review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a couple of minor comments.
Are we using this ticket to also track the upgrade/downgrade produce? If yes, I think there are some FCV implications that we need to mention in the docs.
````````````````````````````````````` | ||
|
||
When sharding time series collections, you can only specify the | ||
``metaField``, ``timeField``, or both in the shard key. No other fields, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also add metaField (or sub-fields of a metaField)
to clarify that the field need not be just the metaField
?
<sharding-hashed-sharding>` or a :ref:`ranged shard key | ||
<sharding-ranged>`. | ||
|
||
- ``timeField`` can only be a :ref:`ranged shard key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeField
can only be at the end of the shard key pattern.
This update covers the changes in:
Staging links: