[SERVER-29299] remove evalc.js and add currentOp to basicPlus.js's background operations. Created: 19/May/17  Updated: 30/Oct/23  Resolved: 18/Jul/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.4.7, 3.5.11

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
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
Backport Requested:
v3.4
Sprint: Query 2017-07-31
Participants:
Linked BF Score: 0

 Description   

This test was created to test a race condition between the currentOp and count commands. The potential for a race exists between currentOp and all commands, so we should remove this test and add a currentOp to the set of operations performed by a background thread during basicPlus.js

Original Description

jstests/core/evalc.js uses an assert.soon to wait for another thread to complete a ton of calls to db.currentOp() before finally inserting a sentinel.

The test mentions SERVER-1610, which appears to be some sort of race between an operation and the curOp command. This could perhaps be tested with an fsm test instead, since the failure scenario was a crash. This would also provide test coverage for related tickets SERVER-12497, SERVER-16506, and SERVER-19143, which all had failure scenarios that could be detected by the fsm framework. It looks like the fact that the count command was executed using db.eval() was important for triggering SERVER-12947, so we should probably include something like that in the new test.

Note we already have test coverage for the correctness of the currentOp output in jstests/core/currentOp_query.js



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

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-29299 Add currentOp as parallel op during basicPlus.js
Branch: v3.4
https://github.com/mongodb/mongo/commit/2a8317c052e8a5e44a8816796b6201f30bcd8bfa

Comment by Charlie Swanson [ 18/Jul/17 ]

updated original description to match what we actually did.

Comment by Githook User [ 18/Jul/17 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}

Message: SERVER-29299 Add currentOp as parallel op during basicPlus.js
Branch: master
https://github.com/mongodb/mongo/commit/4140c9b64962ecc4c1520f608e3c3085ec4529f8

Comment by Ian Whalen (Inactive) [ 14/Jul/17 ]

Leaving in Needs Triage pending review of all underlying build failures to see if they actually tie back to this solution.

Comment by Max Hirschhorn [ 22/May/17 ]

Perhaps we can add currentOp commands to the 'plus' part of basicPlus?

That's exactly what I'm thinking we should do. We'd want to add an EventGenerator method that runs the "currentOp" command.

Comment by Charlie Swanson [ 22/May/17 ]

Perhaps we can add currentOp commands to the 'plus' part of basicPlus? I'm not sure how any of that works, but I thought the point of 'basicPlus' was to run all the core tests (in parallel) while doing other things that might cause race conditions, deadlocks, etc.

Comment by Max Hirschhorn [ 20/May/17 ]

The concurrency tests don't run the entire variety of MongoDB commands that tests in the jstests/core/ directory do. Given the race conditions related to the "currentOp" command in SERVER-12497, SERVER-16506, and SERVER-19143, I think we would also benefit from running currentOp() repeatedly in the background during basicPlus.js to avoid losing coverage after rewriting the evalc.js test as an FSM workload.

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