[SERVER-35351] system.views is implicitly created with the wrong timestamp Created: 01/Jun/18  Updated: 29/Oct/23  Resolved: 12/Jun/18

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: None
Fix Version/s: 4.0.0-rc6, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-06-18
Participants:
Linked BF Score: 61

 Description   

Per daniel.gottlieb:

This seems to be a case of composing two separate write units of work into a big one. I believe the sequence for creating the first view on a database does:

1. Begin a transaction
2. Create the view (insert into _mdb_catalog, also creates an index on the view)
3. Set timestamp 1
4. Write creation into oplog with ts: 1
5. Insert new view into collection
6. Set timestamp 2
7. Write insert into oplog with ts: 2
8. Commit transaction

The collection is implicitly created here in the greater WUOW. CRUD op implicit collection creation happens here in its own WUOW.



 Comments   
Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'dgottlieb', 'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-35351: Have implicit creation of `system.views` in a separate WUOW.

(cherry picked from commit a6cc895fa631e29e8c7ee6ec61a6b7a21a370bf3)
Branch: v4.0
https://github.com/mongodb/mongo/commit/2c33be816fac4e37ed04b13f0cf5ef55e2eda4e7

Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'dgottlieb', 'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-35351: Have implicit creation of `system.views` in a separate WUOW.
Branch: master
https://github.com/mongodb/mongo/commit/a6cc895fa631e29e8c7ee6ec61a6b7a21a370bf3

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