[SERVER-51330] StorageTimestampTests depends on oplog batch writer thread scheduling Created: 02/Oct/20 Updated: 29/Oct/23 Resolved: 05/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Sprint: | Execution Team 2020-10-19 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 16 | ||||||||
| Description |
|
The SecondarySetWildcardIndexMultikeyOnInsert test case tries to "coerce" the oplog batch writer into interleaving operations in a certain way:
Unfortunately, the batch applier splits up operations across many threads based on a hash of _id and a runtime-randomized seed, so this coercion is fruitless. If op1 and op2 end up in the same batch, they will be inserted in the same transaction, which will return this error from WiredTiger: "commit timestamp <op1> older than the first commit timestamp <op2>", and trigger this fatal assertion in MongoDB. This test needs to be rewritten so that it does not batch out-of-order operations together or depend on thread synchronization. Bonus! Because of the way the hash seed is randomized to split up operations to 16 different threads, the probability of this test putting op2 and op1 in the same batch is 1/16. So theoretically this test will fail 6.25% of the time it is run. |
| Comments |
| Comment by Githook User [ 18/Mar/21 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit a589011c8a802cad912d33b125bc9028fd23acad) |
| Comment by Githook User [ 05/Oct/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |
| Comment by Louis Williams [ 02/Oct/20 ] |
|
daniel.gottlieb suggested modifying the test to use updates instead of inserts. This would guarantee that the writes are not batched together in the same WUOW. Additionally, "The test was designed to allow for false negatives (didn't catch the bug when it should have) but not false positives" |