[SERVER-58130] Changing time-series collection validator is acknowledged by server without errors Created: 28/Jun/21  Updated: 29/Oct/23  Resolved: 28/Sep/21

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

Type: Bug Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: neweng, time-series
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14823 Investigate changes in SERVER-58130: ... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v5.0
Steps To Reproduce:

With a mongosh connect to a server that supports timeseries collections and run something similar to the following commands (output provided for context):

> db.createCollection("timeseries_123", { timeseries: { timeField: "a" } });
{ ok: 1 }
> // expecting the next command to return an Error
> db.runCommand({ collMod: "timeseries_123", validator: { required: ["a"] } });
{ ok: 1 }
> // this one just confirms that validator is not actually set which is expected
> db.getCollectionInfos().find(coll => coll.name === 'timeseries_123')
{
  name: 'timeseries_123',
  type: 'timeseries',
  options: {
    timeseries: {
      timeField: 'a',
      granularity: 'seconds',
      bucketMaxSpanSeconds: 3600
    }
  },
  info: { readOnly: false }
}

Sprint: Execution Team 2021-09-20, Execution Team 2021-10-04
Participants:

 Description   

Trying to change time-series collection validator with collMod command currently returns ok: 1 even though the change doesn't seem to be applied. An expected behavior would be to get an error similar to the view collection, something like "option not supported on a time-series collection: validator"



 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 Githook User [ 29/Sep/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-58130 Disable incompatible collMod options for time-series collections

(cherry picked from commit 1f4dbc3e2981b5f32e468f0c6bbf392bd6489a2e)
Branch: v5.0
https://github.com/mongodb/mongo/commit/da865718d9fee2b9a323fc7ca31b91fb44a766cc

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-58130 Disable incompatible collMod options for time-series collections
Branch: master
https://github.com/mongodb/mongo/commit/1f4dbc3e2981b5f32e468f0c6bbf392bd6489a2e

Comment by Yuhong Zhang [ 27/Sep/21 ]

We expanded the scope of the ticket to "disallowing all incompatible collMod options for time-series collections". 

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