[SERVER-56630] Unittest OpObserverImpl::onDelete/onUpdate paths for retryable findAndModify Created: 04/May/21  Updated: 29/Oct/23  Resolved: 22/Jun/21

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

Type: Task 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
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Repl 2021-06-14, Repl 2021-06-28
Participants:

 Description   

The contracts for what different inputs to OpObserverImpl generate what oplog entries could use some hardening. The following table can be used as a starting point for what a unittest can cover (note [oplogEntry.]`NeedsRetryImage` is the only output being asserted):

| featureFlag... | storeFindAndModify... | Pre/Post | Op     | NeedsRetryImage |
|----------------+-----------------------+----------+--------+-----------------|
| false          | false                 | Pre      | Update | boost::none     |
| false          | false                 | Pre      | Delete | "               |
| false          | false                 | Post     | Update | "               |
| false          | false                 | Post     | Delete | "               |
| false          | true                  | Pre      | Update | "               |
| false          | true                  | Pre      | Delete | "               |
| false          | true                  | Post     | Update | "               |
| false          | true                  | Post     | Delete | "               |
| true           | false                 | Pre      | Update | kPreImage       |
| true           | false                 | Pre      | Delete | kPreImage       |
| true           | false                 | Post     | Update | kPostImage      |
| true           | false                 | Post     | Delete | boost::none     |
| true           | true                  | Pre      | Update | boost::none     |
| true           | true                  | Pre      | Delete | "               |
| true           | true                  | Post     | Update | "               |
| true           | true                  | Post     | Delete | "               |

Other inputs to consider:

  • Whether a noop oplog entry containing an image should be generated for a given set of inputs
  • Adding a dimension to the matrix for when a collection is configured to always record preimages.
  • It's debatable if the feature flag code path is of interest. But when storeFindAndModifyImagesInOplog becomes the default with an FCV upgrade, that might be a corollary axis of input.


 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 [ 22/Jun/21 ]

Author:

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

Message: SERVER-56630: Unittest OpObserverImpl::onDelete for non-transaction calls.
Branch: master
https://github.com/mongodb/mongo/commit/648f561a5fceb30bf2d4188ab124c9c588be4c43

Comment by Githook User [ 22/Jun/21 ]

Author:

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

Message: SERVER-56630: Unittest OpObserverImpl::onInserts for non-transaction calls.
Branch: master
https://github.com/mongodb/mongo/commit/dbaefc90f2a1dc0e7fb87464d5e2405706a26124

Comment by Githook User [ 22/Jun/21 ]

Author:

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

Message: SERVER-56630: Unittest OpObserverImpl::onUpdate for non-transaction calls.
Branch: master
https://github.com/mongodb/mongo/commit/807f5130e28fc2295e6ed6bf382a8aff4b9f6fec

Comment by Githook User [ 03/Jun/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}

Message: SERVER-56630 Unittest OpObserverImpl and chunk migration for retryable findAndModify

(cherry picked from commit d78928f90492739ce5401d112b0fe89e278d3954)
(cherry picked from commit 68c6fbfe69283f70ff321cfaa7cb2a533747ac36)
(cherry picked from commit 252cccbb370d91800f6867fd698d9c7ba51935d1)
Branch: v5.0
https://github.com/mongodb/mongo/commit/537bacb720e2404aa4bd4277b602b196795d48e6

Comment by Githook User [ 03/Jun/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}

Message: SERVER-56630 Unittest OpObserverImpl and chunk migration for retryable findAndModify

(cherry picked from commit d78928f90492739ce5401d112b0fe89e278d3954)
(cherry picked from commit 68c6fbfe69283f70ff321cfaa7cb2a533747ac36)
Branch: master
https://github.com/mongodb/mongo/commit/252cccbb370d91800f6867fd698d9c7ba51935d1

Comment by Githook User [ 01/Jun/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}

Message: SERVER-56630 Unittest OpObserverImpl and chunk migration for retryable findAndModify

(cherry picked from commit 68c6fbfe69283f70ff321cfaa7cb2a533747ac36)
Branch: v4.2
https://github.com/mongodb/mongo/commit/5e07228002c112fcf4a9c9526eff5ff9ecc5616d

Comment by Githook User [ 26/May/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}

Message: SERVER-56630 Unittest OpObserverImpl and chunk migration for retryable findAndModify

(cherry picked from commit d78928f90492739ce5401d112b0fe89e278d3954)
Branch: v4.4
https://github.com/mongodb/mongo/commit/68c6fbfe69283f70ff321cfaa7cb2a533747ac36

Comment by Githook User [ 18/May/21 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@10gen.com', 'username': 'jasonjhchan'}

Message: SERVER-56630 Unittest OpObserverImpl and chunk migration for retryable findAndModify
Branch: v4.0
https://github.com/mongodb/mongo/commit/d78928f90492739ce5401d112b0fe89e278d3954

Comment by Daniel Gottlieb (Inactive) [ 14/May/21 ]

We should also add unittests for chunk migration with these new retryable write oplog entries. Or ticket that out separately if convenient.

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