[SERVER-56933] listCollections output should allow user to recreate time-series collections Created: 13/May/21  Updated: 29/Oct/23  Resolved: 25/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-55203 Change the stable release tag to r5.0... Closed
Documented
is documented by DOCS-14497 Investigate changes in SERVER-56933: ... Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Execution Team 2021-05-31
Participants:
Linked BF Score: 174

 Description   

The "listCollections" output for time-series collections reports the view definition information, but not the "timeseries" fields that were used to create the collection.

Modify the output such that an identical collection can be created.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Louis Williams [ 22/Jun/21 ]

tim.fogarty, there seems to be some confusion about this change. The time-series collection is just a view that points to a buckets collection and the 'timeseries' options are stored durably with the buckets collection. To properly recreate a system.buckets collection, the 'timeseries' options are required. This commit allows tools to create a time-series collection using only the output for the time-series namespace instead of having to be aware of the system.buckets namespace.

Comment by Tim Fogarty [ 22/Jun/21 ]

This is great and includes all the changes we need for tools/mirror. Just wanted to point out that listCollections still includes the timeseries options on the system.buckets collection. My understanding is that we would need to remove that option in order to be able to properly recreate the system.buckets collection.

So if the goal is for listCollections to show the options you have to use to recreate the collection, then it currently does not do this for timeseries collections since it has the extra timeseries options.

Comment by Githook User [ 25/May/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-56933 Return options to create an identical time-series collection from listCollections

(cherry picked from commit 8d5547cdd6c45dd68c95dcf353e459e62da5222b)
Branch: v5.0
https://github.com/mongodb/mongo/commit/61710dae9c72f603f15882f3005b729c7f84bcf6

Comment by Githook User [ 24/May/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-56933 Return options to create an identical time-series collection from listCollections
Branch: master
https://github.com/mongodb/mongo/commit/8d5547cdd6c45dd68c95dcf353e459e62da5222b

Comment by Louis Williams [ 17/May/21 ]

I discussed with Geert (CC michael.gargiulo ), we agreed that "listCollections" should return all of the "timeseries" options necessary to create an identical time-series collection. Do not return the "viewOn" or "pipeline" fields.

Generated at Thu Feb 08 05:40:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.