[SERVER-15192] Make all logOp listeners rollback-safe Created: 09/Sep/14  Updated: 21/Jul/17  Resolved: 25/Feb/15

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.0.4, 3.1.0

Type: Task Priority: Major - P3
Reporter: Mathias Stearn Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-17250 logOp rollback when legacy insert cre... Closed
Duplicate
is duplicated by SERVER-17265 thread convoys from WiredTigerRecover... Closed
Related
related to SERVER-15774 findAndModify triggers rollback invar... Closed
related to SERVER-16322 Make sure that RecoveryUnit::commit()... Closed
related to SERVER-17303 concurrent findAndModify ops with ups... Closed
related to SERVER-17198 logOp rollback in findAndModify when ... Closed
related to SERVER-13896 Replace logOp() with a more operation... Closed
is related to SERVER-18822 Sharded clusters with WiredTiger prim... Closed
is related to SERVER-30240 remove incorrect paragraph from getNe... Closed
Tested
Backwards Compatibility: Fully Compatible
Backport Completed:
Participants:

 Description   

For now I'll make it a fatal error to rollback once you got to logOp, since today, once you get there, you shouldn't need to rollback.

We will want to fix the listeners soon since the plan is that rollbacks will be able to happen at any time, but that can happen outside of the critical path of enabling rollback. The tricky listeners will be the role-graph adjuster and the sharding tracker of deletes for migrations.



 Comments   
Comment by Githook User [ 21/Jul/17 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-30240 Remove obsolete comment in oplog.cpp.

This comment was obsoleted by SERVER-15192.
Branch: master
https://github.com/mongodb/mongo/commit/405b07f373d900e810965a838f1c4bbaf8b16dcb

Comment by Githook User [ 08/Jun/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15192 Roll up of patches required to make logOp rollback safe in v3.0.

This rolls up commits with the following summaries from the master development
branch into the v3.0 branch.

  • Make AuthzManager logOp listener rollback-safe
  • Make MigrateFromStatus logOp listener rollback-safe
  • Make dbhash and storedFuncMod logOp listeners rollback-safe
  • Remove RollBackPreventer since all logOp listeners are now rollback-safe
  • Do not perform a query while committing.
  • Terminate server if RecoveryUnit::Change throws on commit or rollback.
    Branch: v3.0
    https://github.com/mongodb/mongo/commit/9e1657ebd156ed70f44a4585d2330510d75e2ae5
Comment by Githook User [ 24/Feb/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-15192 terminate server if RecoveryUnit::Change throws on commit or rollback
Branch: master
https://github.com/mongodb/mongo/commit/2d6aefaed7315d918fc558f65edc422eefb4cffa

Comment by Githook User [ 24/Feb/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-15192 Make all logOp listeners rollback-safe

Do not perform a query while committing.
Branch: master
https://github.com/mongodb/mongo/commit/e8f7cf2c7cd209d1281eb67d2d19cf3518435bc9

Comment by Andy Schwerin [ 19/Feb/15 ]

renctan will be fixing the implementation of logOpForSharding

  1. to not read database data during commit()
  2. to only register a RecoveryUnit::Change when the operation being logged affects a chunk that is migrating.
Comment by Githook User [ 18/Feb/15 ]

Author:

{u'username': u'alabid', u'name': u'alabid', u'email': u'alabidan@gmail.com'}

Message: SERVER-15192 Remove RollBackPreventer since all logOp listeners are now rollback-safe
Branch: master
https://github.com/mongodb/mongo/commit/c56d5c791b95558acda08afdbca44d11bfea930e

Comment by Githook User [ 18/Feb/15 ]

Author:

{u'username': u'alabid', u'name': u'alabid', u'email': u'alabidan@gmail.com'}

Message: SERVER-15192 Make dbhash and storedFuncMod logOp listeners rollback-safe
Branch: master
https://github.com/mongodb/mongo/commit/ffb3d64e1ae2f3dc84b3bbcb5d23ef85f87a9415

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'alabid', u'name': u'alabid', u'email': u'alabidan@gmail.com'}

Message: SERVER-15192 Make MigrateFromStatus logOp listener rollback-safe
Branch: master
https://github.com/mongodb/mongo/commit/dbdb362027d61abbb396dcc091ddd8dd8e8ece22

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'alabid', u'name': u'alabid', u'email': u'alabidan@gmail.com'}

Message: SERVER-15192 Make AuthzManager logOp listener rollback-safe

The initial version of this commit was initially reverted because
boost::optional<bool> gives spurious warnings due to a GCC bug that
should have been fixed in GCC 4.8.5. This commit makes no
use of boost::optional.
Branch: master
https://github.com/mongodb/mongo/commit/45aba2114c18968422b285ce87709043a9455b3c

Comment by Githook User [ 12/Feb/15 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: Revert "SERVER-15192 Make AuthzManager logOp listener rollback-safe"

This reverts commit 295cb7943e21a22f9f3a95006de21b07b254afd2.
Branch: master
https://github.com/mongodb/mongo/commit/bc6725d28dd9339dcb3e07e14cfbe868eb4cd563

Comment by Githook User [ 11/Feb/15 ]

Author:

{u'username': u'alabid', u'name': u'alabid', u'email': u'alabidan@gmail.com'}

Message: SERVER-15192 Make AuthzManager logOp listener rollback-safe
Branch: master
https://github.com/mongodb/mongo/commit/295cb7943e21a22f9f3a95006de21b07b254afd2

Comment by Andy Schwerin [ 06/Feb/15 ]

Proposed solution is for logOpForSharding and AuthorizationManager::logOp to register commit listeners to do their work only on commit, and to only register those listeners when there will be work to do.

Comment by Igor Canadi [ 23/Sep/14 ]

Is it expected that RocksDB fails with this error when running jstests/core/apitest_dbcollection.js?

Comment by Githook User [ 12/Sep/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-15192 Temporarily disallow rollback of logOp

Since there are currently logOp listeners that are not rollback safe we are
temporarily disallowing rollback of all operations once they get to the
logOp. This will work since (today) we only call logOp once we know an
operation will succeed and commit.
Branch: master
https://github.com/mongodb/mongo/commit/a2aff0106af5f8d5832b30bed5f761602ab169a9

Comment by Andy Schwerin [ 09/Sep/14 ]

redbeard0531, if it's convenient, consider doing this in conjunction with SERVER-13896, which is to make a sane operation observer interface, instead of having logop listeners decode oplog entries by hand.

Generated at Thu Feb 08 03:37:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.