[SERVER-35317] restartCatalog problematically discards minVisibleSnapshot data Created: 31/May/18  Updated: 29/Oct/23  Resolved: 02/Jul/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.0.1

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
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-07-02
Participants:
Linked BF Score: 17

 Description   

Restarting the catalog destroys in memory catalog objects (Database, Collection, IndexCatalog[Entry]) and reconstructs them based on the state of the storage engine. However, because the catalog is not versioned, this process loses versioning information, in particular the "minimum visible snapshot" value. That value is used to prevent reading the catalog at too early of a time.

Typically with rollback, those values are get filled in to correct values when replication recovery plays forward from the stable timestamp. However the restart catalog command does not roll back data, and therefore does not perform any replication recovery.

This case is only problematic in testing, as the restartCatalog command is test-only.



 Comments   
Comment by Githook User [ 02/Jul/18 ]

Author:

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

Message: SERVER-35317: Disallow mmapv1 from running `restartCatalog`.
Branch: v4.0
https://github.com/mongodb/mongo/commit/77c1f02a1d15b75e4f38a62dfb85d5a05b1c821c

Comment by Githook User [ 02/Jul/18 ]

Author:

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

Message: SERVER-35317: Preserve minVisible values when refreshing the catalog.

Restarting the catalog throws away the "minVisibleSnapshot" info on all
collections. This is typically safe for rollback, the value is reinstantiated
when replication recovery rolls forward from the stable timestamp. However, it's
possible to read behind the stable timestamp. Currently only test commands can
do so, but the future may formally expose this case particularly for sharded
cluster snapshot reads.

(cherry picked from commit b3a542545c7367f96d57cab5e89dc389748c0e2c)
Branch: v4.0
https://github.com/mongodb/mongo/commit/53a0c9cba92239d3236016a1d1bf486e95ce860c

Comment by Githook User [ 02/Jul/18 ]

Author:

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

Message: SERVER-35317: Preserve minVisible values when refreshing the catalog.

Restarting the catalog throws away the "minVisibleSnapshot" info on all
collections. This is typically safe for rollback, the value is reinstantiated
when replication recovery rolls forward from the stable timestamp. However, it's
possible to read behind the stable timestamp. Currently only test commands can
do so, but the future may formally expose this case particularly for sharded
cluster snapshot reads.
Branch: master
https://github.com/mongodb/mongo/commit/b3a542545c7367f96d57cab5e89dc389748c0e2c

Comment by Githook User [ 27/Jun/18 ]

Author:

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

Message: Revert "SERVER-35317: Preserve minVisible values when refreshing the catalog."

This reverts commit dc849ad01396b513e61ae389b3bce4b28f3404be.
Branch: master
https://github.com/mongodb/mongo/commit/7bac7301b387e843e5672ad50d3ffcfcd807cb03

Comment by Githook User [ 27/Jun/18 ]

Author:

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

Message: SERVER-35317: Preserve minVisible values when refreshing the catalog.

Restarting the catalog throws away the "minVisibleSnapshot" info on all
collections. This is typically safe for rollback, the value is reinstantiated
when replication recovery rolls forward from the stable timestamp. However, it's
possible to read behind the stable timestamp. Currently only test commands can
do so, but the future may formally expose this case particularly for sharded
cluster snapshot reads.
Branch: master
https://github.com/mongodb/mongo/commit/dc849ad01396b513e61ae389b3bce4b28f3404be

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